summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'tty-3.8-rc1' of ↵Linus Torvalds2012-12-111-13/+11Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull TTY/Serial merge from Greg Kroah-Hartman: "Here's the big tty/serial tree set of changes for 3.8-rc1. Contained in here is a bunch more reworks of the tty port layer from Jiri and bugfixes from Alan, along with a number of other tty and serial driver updates by the various driver authors. Also, Jiri has been coerced^Wconvinced to be the co-maintainer of the TTY layer, which is much appreciated by me. All of these have been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fixed up some trivial conflicts in the staging tree, due to the fwserial driver having come in both ways (but fixed up a bit in the serial tree), and the ioctl handling in the dgrp driver having been done slightly differently (staging tree got that one right, and removed both TIOCGSOFTCAR and TIOCSSOFTCAR). * tag 'tty-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (146 commits) staging: sb105x: fix potential NULL pointer dereference in mp_chars_in_buffer() staging/fwserial: Remove superfluous free staging/fwserial: Use WARN_ONCE when port table is corrupted staging/fwserial: Destruct embedded tty_port on teardown staging/fwserial: Fix build breakage when !CONFIG_BUG staging: fwserial: Add TTY-over-Firewire serial driver drivers/tty/serial/serial_core.c: clean up HIGH_BITS_OFFSET usage staging: dgrp: dgrp_tty.c: Audit the return values of get/put_user() staging: dgrp: dgrp_tty.c: Remove the TIOCSSOFTCAR ioctl handler from dgrp driver serial: ifx6x60: Add modem power off function in the platform reboot process serial: mxs-auart: unmap the scatter list before we copy the data serial: mxs-auart: disable the Receive Timeout Interrupt when DMA is enabled serial: max310x: Setup missing "can_sleep" field for GPIO tty/serial: fix ifx6x60.c declaration warning serial: samsung: add devicetree properties for non-Exynos SoCs serial: samsung: fix potential soft lockup during uart write tty: vt: Remove redundant null check before kfree. tty/8250 Add check for pci_ioremap_bar failure tty/8250 Add support for Commtech's Fastcom Async-335 and Fastcom Async-PCIe cards tty/8250 Add XR17D15x devices to the exar_handle_irq override ...
| * MMC: sdio, use kref from tty_portJiri Slaby2012-11-161-12/+11Star
| | | | | | | | | | | | | | | | | | | | | | | | | | After commit "TTY: move tty buffers to tty_port", the tty buffers are not freed in some drivers. This is because tty_port_destructor is not called whenever a tty_port is freed. This was an assumption I counted with but was unfortunately untrue. So fix the drivers to fulfil this assumption. Here it is enough to switch to refcounting in tty_port. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * MMC: sdio_uart, remove unused member from sdio_uart_portJiri Slaby2012-11-161-1/+0Star
| | | | | | | | | | | | | | | | | | tty from struct sdio_uart_port is unused. Proper refcounted tty in tty_port->tty is used instead. So remove the member from that structure. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mmc: card: Add RPMB support in IOCTL interfaceLoic Pallardy2012-12-061-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | RPMB partition is accessing though /dev/block/mmcXrpmb device User callers can read and write entire data frame(s) as defined by JEDEC Standard JESD84-A441, using standard IOCTL interface. Signed-off-by: Alex Macro <alex.macro@stericsson.com> Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* | mmc: card: Do not scan RPMB partitionsLoic Pallardy2012-12-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not scan rpmb partitions for "soft" partitions, since the rpmb partition contains protected data. Silences the following message during boot: mmcblkXRPMB: unknown partition table Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* | mmc: core: Fix some driver hangs when dealing with broken devicesTrey Ramsay2012-12-061-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are infinite loops in the mmc code that can be caused by bad hardware. The code will loop forever if the device never comes back from program mode, R1_STATE_PRG, and it is not ready for data, R1_READY_FOR_DATA. A long timeout is added to prevent the code from looping forever. The timeout will occur if the device never comes back from program state or the device never becomes ready for data. It's not clear whether the timeout will do more than log a pr_err() and then start a fresh hang all over again. We may need to extend this patch later to perform some kind of reset of the device (is that possible?) or rejection of new I/O to the device. Signed-off-by: Trey Ramsay <tramsay@linux.vnet.ibm.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* | mmc: queue: amend buffer swap for non-blocking transferSeungwon Jeon2012-12-061-7/+10
|/ | | | | | | | | | | In case both 'req' and 'mq->mqrq_prev->req' are null, there is no request to be processed. That means there is no need to switch buffer. Switching buffer is required only after finishing 'issue_fn'. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Reviewed-by: Per Forlin <per.forlin@stericsson.com> Tested-by: Johan Rudholm <johan.rudholm@stericsson.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* Merge 3.6-rc6 into tty-nextGreg Kroah-Hartman2012-09-171-1/+25
|\ | | | | | | | | | | This pulls in the fixes in 3.6-rc6 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: card: Skip secure erase on MoviNAND; causes unrecoverable corruption.Ian Chen2012-09-041-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For several MoviNAND eMMC parts, there are known issues with secure erase and secure trim. For these specific MoviNAND devices, we skip these operations. Specifically, there is a bug in the eMMC firmware that causes unrecoverable corruption when the MMC is erased with MMC_CAP_ERASE enabled. References: http://forum.xda-developers.com/showthread.php?t=1644364 https://plus.google.com/111398485184813224730/posts/21pTYfTsCkB#111398485184813224730/posts/21pTYfTsCkB Signed-off-by: Ian Chen <ian.cy.chen@samsung.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Cc: stable <stable@vger.kernel.org> [3.0+] Signed-off-by: Chris Ball <cjb@laptop.org>
* | TTY: use tty_port_register_deviceJiri Slaby2012-08-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we have no way to assign tty->port while performing tty installation. There are two ways to provide the link tty_struct => tty_port. Either by calling tty_port_install from tty->ops->install or tty_port_register_device called instead of tty_register_device when the device is being set up after connected. In this patch we modify most of the drivers to do the latter. When the drivers use tty_register_device and we have tty_port already, we switch to tty_port_register_device. So we have the tty_struct => tty_port link for free for those. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge tty-next into 3.6-rc1Greg Kroah-Hartman2012-08-061-27/+9Star
|\| | | | | | | | | | | | | | | | | | | This handles the merge issue in: arch/um/drivers/line.c arch/um/drivers/line.h And resolves the duplicate patches that were in both trees do to the tty-next branch not getting merged into 3.6-rc1. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: block: replace __blk_end_request() with blk_end_request()Subhash Jadavani2012-07-111-27/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For completing any block request, MMC block driver is calling: spin_lock_irq(queue) __blk_end_request() spin_unlock_irq(queue) But if we analyze the sources of latency in kernel using ftrace, __blk_end_request() function at times may take up to 6.5ms with spinlock held and irq disabled. __blk_end_request() calls couple of functions and ftrace output shows that blk_update_bidi_request() function is almost taking 6ms. There are 2 function to end the current request: ___blk_end_request() and blk_end_request(). Both these functions do same thing except that blk_end_request() function doesn't take up the spinlock while calling the blk_update_bidi_request(). This patch replaces all __blk_end_request() calls with blk_end_request() and __blk_end_request_all() calls with blk_end_request_all(). Testing done: 20 process concurrent read/write on sd card and eMMC. Ran this test for almost a day on multicore system and no errors observed. This change is not meant for improving MMC throughput; it's basically about becoming fair to other threads/interrupts in the system. By holding spin lock and interrupts disabled for longer duration, we won't allow other threads/interrupts to run at all. Actually slight performance degradation at file system level can be expected as we are not holding the spin lock during blk_update_bidi_request() which means our mmcqd thread may get preempted for other high priority thread or any interrupt in the system. These are performance numbers (100MB file write) with eMMC running in DDR mode: Without this patch: Name of the Test Value Unit LMDD Read Test 53.79 MBPS LMDD Write Test 18.86 MBPS IOZONE Read Test 51.65 MBPS IOZONE Write Test 24.36 MBPS With this patch: Name of the Test Value Unit LMDD Read Test 52.94 MBPS LMDD Write Test 16.70 MBPS IOZONE Read Test 52.08 MBPS IOZONE Write Test 23.29 MBPS Read numbers are fine. Write numbers are bit down (especially LMDD write), may be because write requests normally have large transfer size and which means there are chances that while mmcq is executing blk_update_bidi_request(), it may get interrupted by interrupts or other high priority thread. Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* | tty: move the termios object into the ttyAlan Cox2012-07-161-10/+10
|/ | | | | | | | | | | | This will let us sort out a whole pile of tty related races. The alternative would be to keep points and refcount the termios objects. However 1. They are tiny anyway 2. Many devices don't use the stored copies 3. We can remove a pty special case Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mmc: block: fix the data timeout issue with ACMD22Subhash Jadavani2012-06-261-13/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | If multi block write operation fails for SD card, during error handling we send the SD_APP_SEND_NUM_WR_BLKS (ACMD22) to know how many blocks were already programmed by card. But mmc_sd_num_wr_blocks() function which sends the ACMD22 calculates the data timeout value from csd.tacc_ns and csd.tacc_clks parameters which will be 0 for block addressed (>2GB cards) SD card. This would result in timeout_ns and timeout_clks being 0 in the mmc_request passed to host driver. This means host controller would program its data timeout timer value with 0 which could result in DATA TIMEOUT errors from controller. To fix this issue, mmc_sd_num_wr_blocks() should instead just call the mmc_set_data_timeout() to calculate the data timeout value. mmc_set_data_timeout() function ensures that non zero timeout value is set even for block addressed SD cards. Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Reviewed-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: block: Allow disabling 512B sector size emulationSaugata Das2012-05-171-2/+17
| | | | | | | | | | | | | | | | This patch adds support for large sector size of 4KB by disabling emulation. This patch passes eMMC DATA_SECTOR_SIZE as the logical block size during mmc_blk_alloc_req. In order to use this patch for 4KB sector size, ensure that USE_NATIVE_SECTOR is enabled, partition table is 4KB sector size aligned and file system block and sector size are 4KB multiples. Signed-off-by: Saugata Das <saugata.das@linaro.org> Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: card: Avoid null pointer dereferencePhilippe De Swert2012-05-101-1/+2
| | | | | | | | | | After the null check on md the code jumped to cmd_done, which then will dereference md in mmc_blk_put. This patch avoids the possible null pointer dereference in that case. Signed-off-by: Philippe De Swert <philippedeswert@gmail.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: queue: remove redundant memsetsVenkatraman S2012-05-091-2/+0Star
| | | | | | | | | Not needed to memset, as they are pointers and are assigned to proper values in the next line anyway. Signed-off-by: Venkatraman S <svenkatr@ti.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: queue: rename mmc_request functionVenkatraman S2012-05-091-2/+2
| | | | | | | | | | The name mmc_request is used for both the issue function and a data structure, which creates conflicts in symbol lookups in editors. Rename the function to mmc_request_fn. Signed-off-by: Venkatraman S <svenkatr@ti.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: remove MMC bus legacy suspend/resume methodChuanxiao Dong2012-04-211-1/+1
| | | | | | | | | | | | | | | | MMC bus is using legacy suspend/resume method, which is not compatible if runtime pm callbacks are used. In this scenario, MMC bus suspend/resume callbacks cannot be called when system entering S3. So change to use the new defined dev_pm_ops for system sleeping mode. Tested on AM335x Platform. Solves major issue/crash reported at http://www.mail-archive.com/linux-omap@vger.kernel.org/msg65425.html Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Tested-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Ulf Hansson <ulf.hansson@stericsson.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: fixes for eMMC v4.5 sanitize operationAdrian Hunter2012-04-211-16/+38
| | | | | | | | | | | | | | eMMC v4.5 sanitize operation erases all copies of unmapped data. However trim or erase operations must be used first to unmap the required sectors. That was not being done. Fixes apply to linux 3.2 on. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: <stable@vger.kernel.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: fixes for eMMC v4.5 discard operationAdrian Hunter2012-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | eMMC v4.5 discard operation is significantly different from the existing trim operation because it is not guaranteed to work with the new sanitize operation. Consequently mmc_can_trim() is separated from mmc_can_discard(). Also the new discard operation does not result in the sectors being set to all-zeros, so discard_zeroes_data must not be set. In addition, the new discard has the same timeout as trim, but from v4.5 trim is defined to use the hc timeout. The timeout calculation is adjusted accordingly. Fixes apply to linux 3.2 on. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: <stable@vger.kernel.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: block: Remove use of mmc_blk_set_blksizeUlf Hansson2012-04-061-26/+1Star
| | | | | | | | | | | | | According to the specifications for SD and (e)MMC default blocksize (named BLOCKLEN in Spec.) must always be 512 bytes. Since we hardcoded to always use 512 bytes, we do not explicitly have to set it. Future improvements should potentially make it possible to use a greater blocksize than 512 bytes, but until then let's skip this. Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Reviewed-by: Subhash Jadavani <subhashj@codeauora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* Merge tag 'mmc-merge-for-3.4-rc1' of ↵Linus Torvalds2012-03-291-5/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc Pull MMC updates from Chris Ball: Core: * Support for MMC 4.5 Data Tag feature -- we tag REQ_META, so devices that support Data Tag will provide increased throughput for metadata. * Faster detection of card removal on I/O errors. Drivers: * dw_mmc now supports eMMC Power Off Notify, has PCI support, and implements pre_req and post_req for asynchronous requests. * omap_hsmmc now supports device tree. * esdhc now has power management support. * sdhci-tegra now supports Tegra30 devices. * sdhci-spear now supports hibernation. * tmio_mmc now supports using a GPIO for card detection. * Intel PCH now supports 8-bit bus transfers. * tag 'mmc-merge-for-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (53 commits) mmc: sh_mmcif: simplify bitmask macros mmc: sh_mobile_sdhi: support modular mmc-core with non-standard hotplug mmc: sh_mobile_sdhi: add a callback for board specific init code mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function mmc: sh_mobile_sdhi: do not manage PM clocks manually mmc: tmio_mmc: remove unused sdio_irq_enabled flag mmc: tmio_mmc: power status flag doesn't have to be exposed in platform data mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper mmc: tmio: calculate the native hotplug condition only once mmc: simplify mmc_cd_gpio_request() by removing two parameters mmc: sdhci-pci: allow 8-bit bus width for Intel PCH mmc: sdhci: check interrupt flags in ISR again mmc: sdhci-pci: Add MSI support mmc: core: warn when card doesn't support HPI mmc: davinci: Poll status for small size transfers mmc: davinci: Eliminate spurious interrupts mmc: omap_hsmmc: Avoid a regulator voltage change with dt mmc: omap_hsmmc: Convert hsmmc driver to use device tree mmc: sdhci-pci: add SDHCI_QUIRK2_HOST_OFF_CARD_ON for Medfield SDIO ...
| * mmc: MMC-4.5 Data Tag SupportSaugata Das2012-03-261-5/+16
| | | | | | | | | | | | | | | | | | | | MMC-4.5 data tag feature will be used to store the file system meta-data in the tagged region of eMMC. This will improve the write and subsequent read transfer time for the meta data. Signed-off-by: Saugata Das <saugata.das@linaro.org> Tested-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* | Remove all #inclusions of asm/system.hDavid Howells2012-03-281-1/+0Star
|/ | | | | | | | | Remove all #inclusions of asm/system.h preparatory to splitting and killing it. Performed with the following command: perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *` Signed-off-by: David Howells <dhowells@redhat.com>
* Merge branch 'for-linus' of ↵Linus Torvalds2012-03-211-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs pile 1 from Al Viro: "This is _not_ all; in particular, Miklos' and Jan's stuff is not there yet." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (64 commits) ext4: initialization of ext4_li_mtx needs to be done earlier debugfs-related mode_t whack-a-mole hfsplus: add an ioctl to bless files hfsplus: change finder_info to u32 hfsplus: initialise userflags qnx4: new helper - try_extent() qnx4: get rid of qnx4_bread/qnx4_getblk take removal of PF_FORKNOEXEC to flush_old_exec() trim includes in inode.c um: uml_dup_mmap() relies on ->mmap_sem being held, but activate_mm() doesn't hold it um: embed ->stub_pages[] into mmu_context gadgetfs: list_for_each_safe() misuse ocfs2: fix leaks on failure exits in module_init ecryptfs: make register_filesystem() the last potential failure exit ntfs: forgets to unregister sysctls on register_filesystem() failure logfs: missing cleanup on register_filesystem() failure jfs: mising cleanup on register_filesystem() failure make configfs_pin_fs() return root dentry on success configfs: configfs_create_dir() has parent dentry in dentry->d_parent configfs: sanitize configfs_create() ...
| * debugfs-related mode_t whack-a-moleAl Viro2012-03-211-1/+1
| | | | | | | | | | | | all of those should be umode_t... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | Merge tag 'tty-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/ttyLinus Torvalds2012-03-201-7/+3Star
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull TTY/serial patches from Greg KH: "tty and serial merge for 3.4-rc1 Here's the big serial and tty merge for the 3.4-rc1 tree. There's loads of fixes and reworks in here from Jiri for the tty layer, and a number of patches from Alan to help try to wrestle the vt layer into a sane model. Other than that, lots of driver updates and fixes, and other minor stuff, all detailed in the shortlog." * tag 'tty-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (132 commits) serial: pxa: add clk_prepare/clk_unprepare calls TTY: Wrong unicode value copied in con_set_unimap() serial: PL011: clear pending interrupts serial: bfin-uart: Don't access tty circular buffer in TX DMA interrupt after it is reset. vt: NULL dereference in vt_do_kdsk_ioctl() tty: serial: vt8500: fix annotations for probe/remove serial: remove back and forth conversions in serial_out_sync serial: use serial_port_in/out vs serial_in/out in 8250 serial: introduce generic port in/out helpers serial: reduce number of indirections in 8250 code serial: delete useless void casts in 8250.c serial: make 8250's serial_in shareable to other drivers. serial: delete last unused traces of pausing I/O in 8250 pch_uart: Add module parameter descriptions pch_uart: Use existing default_baud in setup_console pch_uart: Add user_uartclk parameter pch_uart: Add Fish River Island II uart clock quirks pch_uart: Use uartclk instead of base_baud mpc5200b/uart: select more tolerant uart prescaler on low baudrates tty: moxa: fix bit test in moxa_start() ...
| * TTY: remove re-assignments to tty_driver membersJiri Slaby2012-03-081-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All num, magic and owner are set by alloc_tty_driver. No need to re-set them on each allocation site. pti driver sets something different to what it passes to alloc_tty_driver. It is not a bug, since we don't use the lines parameter in any way. Anyway this is fixed, and now we do the right thing. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * TTY: use tty_standard_installJiri Slaby2012-02-031-6/+3Star
| | | | | | | | | | | | | | | | | | Use the helper in the rest of the tty drivers. This is a simple replacement. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mmc: block: Init ro_lock sysfs attr to fix lockdep warningsRabin Vincent2012-02-141-0/+1
|/ | | | | | | | | Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com> Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* Merge tag 'mmc-merge-for-3.3-rc1' of ↵Linus Torvalds2012-01-143-55/+198
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc MMC highlights for 3.3: Core: * Support for the HS200 high-speed eMMC mode. * Support SDIO 3.0 Ultra High Speed cards. * Kill pending block requests immediately if card is removed. * Enable the eMMC feature for locking boot partitions read-only until next power on, exposed via sysfs. Drivers: * Runtime PM support for Intel Medfield SDIO. * Suspend/resume support for sdhci-spear. * sh-mmcif now processes requests asynchronously. * tag 'mmc-merge-for-3.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (58 commits) mmc: fix a deadlock between system suspend and MMC block IO mmc: sdhci: restore the enabled dma when do reset all mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation mmc: host: Adds support for eMMC 4.5 HS200 mode mmc: core: HS200 mode support for eMMC 4.5 mmc: dw_mmc: fixed wrong bit operation for SDMMC_GET_FCNT() mmc: core: Separate the timeout value for cache-ctrl mmc: sdhci-spear: Fix compilation error mmc: sdhci: Deal with failure case in sdhci_suspend_host mmc: dw_mmc: Clear the DDR mode for non-DDR mmc: sd: Fix SDR12 timing regression mmc: sdhci: Fix tuning timer incorrect setting when suspending host mmc: core: Add option to prevent eMMC sleep command mmc: omap_hsmmc: use threaded irq handler for card-detect. mmc: sdhci-pci: enable runtime PM for Medfield SDIO mmc: sdhci: Always pass clock request value zero to set_clock host op mmc: sdhci-pci: remove SDHCI_QUIRK2_OWN_CARD_DETECTION mmc: sdhci-pci: get gpio numbers from platform data mmc: sdhci-pci: add platform data mmc: sdhci: prevent card detection activity for non-removable cards ...
| * mmc: card: Kill block requests if card is removedSujit Reddy Thumma2012-01-122-1/+21
| | | | | | | | | | | | | | | | | | | | | | Kill block requests when the host realizes that the card is removed from the slot and is sure that subsequent requests are bound to fail. Do this silently so that the block layer doesn't output unnecessary error messages. Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: boot partition ro lock supportJohan Rudholm2012-01-121-8/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | Enable boot partitions to be read-only locked until next power on via a sysfs entry. There will be one sysfs entry for each boot partition: /sys/block/mmcblkXbootY/ro_lock_until_next_power_on Each boot partition is locked by writing 1 to its file. Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com> Signed-off-by: John Beckett <john.beckett@stericsson.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: core: check for zero length ioctl dataJohan Rudholm2012-01-121-37/+45
| | | | | | | | | | | | | | | | | | | | | | If the read or write buffer size associated with the command sent through the mmc_blk_ioctl is zero, do not prepare data buffer. This enables a ioctl(2) call to for instance send a MMC_SWITCH to set a byte in the ext_csd. Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: mmc_test: align max_seg_sizePer Forlin2012-01-121-0/+1
| | | | | | | | | | | | | | | | | | If max_seg_size is unaligned, mmc_test_map_sg() may create sg element sizes that are not aligned with 512 byte. Fix, align max_seg_size at mmc_test_area_init(). Signed-off-by: Per Forlin <per.forlin@stericsson.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: card: Use manufacturer ID symbols in card quirks.Chris Ball2012-01-121-9/+18
| | | | | | | | | | | | | | | | No functional change; adds macros for card manufacturer IDs. Signed-off-by: Chris Ball <cjb@laptop.org> Cc: Andrei E. Warkentin <andrey.warkentin@gmail.com> Cc: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
* | switch debugfs to umode_tAl Viro2012-01-041-1/+1
|/ | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mmc: core: Add quirk for long data read timeStefan Nilsson XK2011-12-101-0/+8
| | | | | | | | | | | | | | | | Adds a quirk that sets the data read timeout to a fixed value instead of relying on the information in the CSD. The timeout value chosen is 300ms since that has proven enough for the problematic cards found, but could be increased if other cards require this. This patch also enables this quirk for certain Micron cards known to have this problem. Signed-off-by: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com> Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Cc: <stable@kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: core: add workaround for controllers with broken multiblock readsPaul Walmsley2011-10-271-7/+14
| | | | | | | | | | | | | | | | | | Due to hardware bugs, some MMC host controllers don't support multiple-block reads[1]. To resolve, add a new MMC capability flag, MMC_CAP2_NO_MULTI_READ, which can be set by affected host controller drivers. When this capability is set, all reads will be issued one sector at a time. 1. See for example Advisory 2.1.1.128 "MMC: Multiple Block Read Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_ Revision F (October 2010) (SPRZ278F), available from http://focus.ti.com/lit/er/sprz278f/sprz278f.pdf Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Dave Hylands <dhylands@gmail.com> Tested-by: Steve Sakoman <sakoman@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: core: Add cache control for eMMC4.5 deviceSeungwon Jeon2011-10-261-6/+8
| | | | | | | | | | This patch adds cache feature of eMMC4.5 Spec. If device supports cache capability, host can utilize some specific operations. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: core: new discard feature support at eMMC v4.5Kyungmin Park2011-10-261-1/+3
| | | | | | | | | MMC v4.5 supports the DISCARD feature (CMD38). It's different from trim and there's no check bit. Currently it's only supported at v4.5. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: core: mmc sanitize feature support for v4.5Kyungmin Park2011-10-262-2/+9
| | | | | | | | | In the v4.5, there's no secure erase & trim support. Instead it supports the sanitize feature. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: replace printk with appropriate display macroGirish K S2011-10-264-29/+29
| | | | | | | | All the files using printk function for displaying kernel messages in the mmc driver have been replaced with corresponding macro. Signed-off-by: Girish K S <girish.shivananjappa@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: Add module.h to drivers/mmc users assuming implicit presence.Paul Gortmaker2011-10-261-0/+1
| | | | | | | | | We are cleaning up the implicit presence of module.h; these guys are some of the people who just assume it will be there. Call it out explitly for those that really need it. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: core: general purpose MMC partition support.Namjae Jeon2011-10-261-14/+17
| | | | | | | | | | | | | | | | | | It allows gerneral purpose partitions in MMC Device. And I try to simply make mmc_blk_alloc_parts using mmc_part structure suggested by Andrei Warkentin. After patching, we see general purpose partitions like this: > cat /proc/partitions 179 0 847872 mmcblk0 179 192 4096 mmcblk0gp3 179 160 4096 mmcblk0gp2 179 128 4096 mmcblk0gp1 179 96 1052672 mmcblk0gp0 179 64 1024 mmcblk0boot1 179 32 1024 mmcblk0boot0 Signed-off-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Andrei Warkentin <awarkentin@vmware.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: block: support no access to boot partitionsAdrian Hunter2011-10-261-1/+1
| | | | | | | | | Intel Medfield platform blocks access to eMMC boot partitions which results in switch errors. Since there is no access, mmcboot0/1 devices should not be created. Add a host capability to reflect that. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: block: fix boot partition switch error pathAdrian Hunter2011-10-261-3/+13
| | | | | | | | | | In the case of a switch error, do not update partition config as though the switch succeeded, and ensure blk_end_request is called on the failed request. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Andrei Warkentin <andrey.warkentin@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: block: add eMMC hardware reset supportAdrian Hunter2011-10-261-59/+142
| | | | | | | | | | | For cards that support hardware reset (just eMMC), try a reset and retry before returning an I/O error. However this is not done for ECC errors and is never done twice for the same operation type (READ, WRITE, DISCARD, SECURE DISCARD) until that type of operation again succeeds. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: mmc-test: add eMMC hardware reset testAdrian Hunter2011-10-261-0/+30
| | | | | | | | MMC core provides a checking function that checks if the reset has happended. Add a test to use that function. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>