aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
Commit message (Collapse)AuthorAgeFilesLines
* mmc: core: Update the ext-csd.rev check for eMMC5.1Yuvaraj Kumar C D2016-10-201-1/+1
| | | | | | | | | | | | With the new eMMC5.1 spec, there is a new EXT_CSD register with the revision number(EXT_CSD_REV) 7. This patch updates the check for ext-csd.rev number as 7. Change-Id: Ib09a32f0d96e4d1912afd6bc34435965a4ef3a9d Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* Revert "[espresso] mmc: disable MMC_CAP_ERASE for espresso"Andreas Blaesius2016-09-241-4/+0
| | | | | | | | | | | | This reverts commit e52a59ac9551a05be05cdb67540628ce6d457d78. - "moviNAND VHX 4.41 DISCARD feature" is added to our kernel which should prevent MAG2GA eMMC from damage (official Samsung patch) - without TRIM emmc lifetime is shorter, it's now possible again on supported eMMC Change-Id: I1c11936a9732eb16f3fac6539f3b7d8967a2f895
* mmc: core: Detect eMMC v4.5 ext_csd entriesKyungmin Park2016-09-221-1/+1
| | | | | | | | | | | | | | The eMMC v4.5 Spec is released now: EXT_CSD_REV Extended CSD Revision 255-7 Reserved 6 Revision 1.6 (for MMC v4.5) 5 Revision 1.5 (for MMV v4.41) ... Change-Id: I7ddb56c66a2bc0be2ec886b8f8cfc25ad3b5743b Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* block: separate priority boosting from REQ_METAChristoph Hellwig2016-06-051-0/+3
| | | | | | | | | | | | Add a new REQ_PRIO to let requests preempt others in the cfq I/O schedule, and lave REQ_META purely for marking requests as metadata in blktrace. All existing callers of REQ_META except for XFS are updated to also set REQ_PRIO for now. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
* mmc: omap44XX: Fix Errata FSMR: Fix FSM reset timeViswanath Puttagunta2016-05-021-8/+3
| | | | | | | | | | | MMC FSM is expected to take a maximum time of 100us to get reset. Change-Id: Ia3407cf77671bc8a5cd10375acbb2fb1c95befa4 Signed-off-by: Viswanath Puttagunta <vishp@ti.com> Conflicts: drivers/mmc/host/omap_hsmmc.c
* mmc: omap44XX: Fix errata FSMR: Finite State Machine resetViswanath Puttagunta2016-05-021-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Errata Description: After the SYSCTL.SRC or SYSCTL.SRD bit is set to reset the Clock or Data finite state machine, there is a delay before which the reset process actually starts. So, if we just wait for SRC/SRC bit to get cleared immediately after software sets the bit, then then we might exit out of loop even before the reset process even starts. Applies to: OMAP4430 Series greater than ES1.0 OMAP4460 All series OMAP4470 All series Workaround: First wait for the SYSCTL.SRC/SRD bit to get set, and then wait for the bit to get reset. Change-Id: Id026a99d4b5f7a36d68ddb33fcfd26e24fc1f0af Signed-off-by: Viswanath Puttagunta <vishp@ti.com> Conflicts: drivers/mmc/host/omap_hsmmc.c
* mmc: core: new discard feature support at eMMC v4.5Kyungmin Park2016-05-013-1/+21
| | | | | | | | | | | 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> Change-Id: I186661b21505c0d8bcff576667326d8c86c4407d
* Add moviNAND VHX 4.41 DISCARD featureAndreas Blaesius2016-05-011-0/+10
| | | | Applied on GT-P3110_JB_Opensource.
* [espresso] mmc: disable MMC_CAP_ERASE for espressoKetut Putu Kumajaya2016-04-301-0/+4
| | | | Change-Id: Id8d3f807cfb5f7344a80a6a15e422d8472444d42
* mmc: Make sure host is disabled on suspendDmitry Shmidt2016-03-111-0/+1
| | | | | Change-Id: Ie0bf2004e173cef8dad66722a152658d7727ab65 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* Merge remote-tracking branch 'linux-stable/linux-3.0.y' into ↵Ziyan2015-10-258-14/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | p-android-omap-3.0-dev-espresso Conflicts: Makefile arch/arm/include/asm/hardware/cache-l2x0.h arch/arm/kernel/smp.c arch/arm/mach-omap2/board-4430sdp.c arch/arm/mach-omap2/board-omap4panda.c arch/arm/mach-omap2/opp.c arch/ia64/include/asm/futex.h drivers/bluetooth/ath3k.c drivers/bluetooth/btusb.c drivers/firmware/efivars.c drivers/gpu/drm/i915/intel_lvds.c drivers/gpu/drm/radeon/radeon_atombios.c drivers/gpu/drm/radeon/radeon_irq_kms.c drivers/hwmon/fam15h_power.c drivers/mfd/twl6030-irq.c drivers/mmc/core/sdio.c drivers/net/tun.c drivers/net/usb/ipheth.c drivers/net/usb/usbnet.c drivers/usb/core/hub.c drivers/usb/host/xhci-mem.c drivers/usb/host/xhci.h drivers/usb/musb/omap2430.c drivers/usb/serial/ftdi_sio.c drivers/usb/serial/ftdi_sio_ids.h drivers/usb/serial/option.c drivers/usb/serial/qcserial.c drivers/usb/serial/ti_usb_3410_5052.c drivers/usb/serial/ti_usb_3410_5052.h drivers/video/omap2/dss/hdmi.c fs/splice.c include/asm-generic/pgtable.h include/net/sch_generic.h kernel/cgroup.c kernel/futex.c kernel/time/timekeeping.c net/ipv4/route.c net/ipv4/syncookies.c net/ipv4/tcp_ipv4.c net/wireless/util.c security/commoncap.c sound/soc/soc-dapm.c
| * mmc: core: Fix bit width test failing on old eMMC cardsPhilip Rakity2013-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 836dc2fe89c968c10cada87e0dfae6626f8f9da3 upstream. PARTITION_SUPPORT needs to be set before doing the compare on version number so the bit width test does not get invalid data. Before this patch, a Sandisk iNAND eMMC card would detect 1-bit width although the hardware supports 4-bit. Only affects old emmc devices - pre 4.4 devices. Reported-by: Elad Yi <elad.yi@gmail.com> Signed-off-by: Philip Rakity <prakity@yahoo.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: sdhci-s3c: fix the wrong number of max bus clocksJaehoon Chung2012-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 5feb54a1ab91a237e247c013b8c4fb100ea347b1 upstream. We can use up to four bus-clocks; but on module remove, we didn't disable the fourth bus clock. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org> Cc: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.Al Cooper2012-10-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 4188bba0e9e7ba58d231b528df495666f2742b74 upstream. The driver should not try to switch to 1.8V when the SD 3.0 host controller does not have any UHS capabilities bits set (SDR50, DDR50 or SDR104). See page 72 of "SD Specifications Part A2 SD Host Controller Simplified Specification Version 3.00" under "1.8V Signaling Enable". Instead of setting SDR12 and SDR25 in the host capabilities data structure for all V3.0 host controllers, only set them if SDR104, SDR50 or DDR50 is set in the host capabilities register. This will prevent the switch to 1.8V later. Signed-off-by: Al Cooper <acooper@gmail.com> Acked-by: Arindam Nath <arindam.nath@amd.com> Acked-by: Philip Rakity <prakity@marvell.com> Acked-by: Girish K S <girish.shivananjappa@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: sd: Handle SD3.0 cards not supporting UHS-I bus speed modeSubhash Jadavani2012-10-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit f2815f68dabbb373fd1c9f0fd4a609d486697c2b upstream. Here is Essential conditions to indicate Version 3.00 Card (SD_SPEC=2 and SD_SPEC3=1) : (1) The card shall support CMD6 (2) The card shall support CMD8 (3) The card shall support CMD42 (4) User area capacity shall be up to 2GB (SDSC) or 32GB (SDHC) User area capacity shall be more than or equal to 32GB and up to 2TB (SDXC) (5) Speed Class shall be supported (SDHC or SDXC) So even if SD card doesn't support any of the newly defined UHS-I bus speed mode, it can advertise itself as SD3.0 cards as long as it supports all the essential conditions of SD3.0 cards. Given this, these type of cards should atleast run in High Speed mode @50MHZ if it supports HS. But current initialization sequence for SD3.0 cards is such that these non-UHS-I SD3.0 cards runs in Default Speed mode @25MHz. This patch makes sure that these non-UHS-I SD3.0 cards run in High Speed Mode @50MHz. Tested this patch with SanDisk Extreme SDHC 8GB Class 10 card. Reported-by: "Hiremath, Vaibhav" <hvaibhav@ti.com> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci-esdhc: break out early if clock is 0Shawn Guo2012-10-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 74f330bceaa7b88d06062e1cac3d519a3dfc041e upstream. Since commit 30832ab56 ("mmc: sdhci: Always pass clock request value zero to set_clock host op") was merged, esdhc_set_clock starts hitting "if (clock == 0)" where ESDHC_SYSTEM_CONTROL has been operated. This causes SDHCI card-detection function being broken. Fix the regression by moving "if (clock == 0)" above ESDHC_SYSTEM_CONTROL operation. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: mxs-mmc: fix deadlock in SDIO IRQ caseLauri Hintsala2012-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 1af36b2a993dddfa3d6860ec4879c9e8abc9b976 upstream. Release the lock before mmc_signal_sdio_irq is called by mxs_mmc_irq_handler. Backtrace: [ 79.660000] ============================================= [ 79.660000] [ INFO: possible recursive locking detected ] [ 79.660000] 3.4.0-00009-g3e96082-dirty #11 Not tainted [ 79.660000] --------------------------------------------- [ 79.660000] swapper/0 is trying to acquire lock: [ 79.660000] (&(&host->lock)->rlock#2){-.....}, at: [<c026ea3c>] mxs_mmc_enable_sdio_irq+0x18/0xd4 [ 79.660000] [ 79.660000] but task is already holding lock: [ 79.660000] (&(&host->lock)->rlock#2){-.....}, at: [<c026f744>] mxs_mmc_irq_handler+0x1c/0xe8 [ 79.660000] [ 79.660000] other info that might help us debug this: [ 79.660000] Possible unsafe locking scenario: [ 79.660000] [ 79.660000] CPU0 [ 79.660000] ---- [ 79.660000] lock(&(&host->lock)->rlock#2); [ 79.660000] lock(&(&host->lock)->rlock#2); [ 79.660000] [ 79.660000] *** DEADLOCK *** [ 79.660000] [ 79.660000] May be due to missing lock nesting notation [ 79.660000] [ 79.660000] 1 lock held by swapper/0: [ 79.660000] #0: (&(&host->lock)->rlock#2){-.....}, at: [<c026f744>] mxs_mmc_irq_handler+0x1c/0xe8 [ 79.660000] [ 79.660000] stack backtrace: [ 79.660000] [<c0014bd0>] (unwind_backtrace+0x0/0xf4) from [<c005f9c0>] (__lock_acquire+0x1948/0x1d48) [ 79.660000] [<c005f9c0>] (__lock_acquire+0x1948/0x1d48) from [<c005fea0>] (lock_acquire+0xe0/0xf8) [ 79.660000] [<c005fea0>] (lock_acquire+0xe0/0xf8) from [<c03a8460>] (_raw_spin_lock_irqsave+0x44/0x58) [ 79.660000] [<c03a8460>] (_raw_spin_lock_irqsave+0x44/0x58) from [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4) [ 79.660000] [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4) from [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8) [ 79.660000] [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8) from [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254) [ 79.660000] [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254) from [<c006bff8>] (handle_irq_event+0x3c/0x5c) [ 79.660000] [<c006bff8>] (handle_irq_event+0x3c/0x5c) from [<c006e6d0>] (handle_level_irq+0x90/0x110) [ 79.660000] [<c006e6d0>] (handle_level_irq+0x90/0x110) from [<c006b930>] (generic_handle_irq+0x38/0x50) [ 79.660000] [<c006b930>] (generic_handle_irq+0x38/0x50) from [<c00102fc>] (handle_IRQ+0x30/0x84) [ 79.660000] [<c00102fc>] (handle_IRQ+0x30/0x84) from [<c000f058>] (__irq_svc+0x38/0x60) [ 79.660000] [<c000f058>] (__irq_svc+0x38/0x60) from [<c0010520>] (default_idle+0x2c/0x40) [ 79.660000] [<c0010520>] (default_idle+0x2c/0x40) from [<c0010a90>] (cpu_idle+0x64/0xcc) [ 79.660000] [<c0010a90>] (cpu_idle+0x64/0xcc) from [<c04ff858>] (start_kernel+0x244/0x2c8) [ 79.660000] BUG: spinlock lockup on CPU#0, swapper/0 [ 79.660000] lock: c398cb2c, .magic: dead4ead, .owner: swapper/0, .owner_cpu: 0 [ 79.660000] [<c0014bd0>] (unwind_backtrace+0x0/0xf4) from [<c01ddb1c>] (do_raw_spin_lock+0xf0/0x144) [ 79.660000] [<c01ddb1c>] (do_raw_spin_lock+0xf0/0x144) from [<c03a8468>] (_raw_spin_lock_irqsave+0x4c/0x58) [ 79.660000] [<c03a8468>] (_raw_spin_lock_irqsave+0x4c/0x58) from [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4) [ 79.660000] [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4) from [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8) [ 79.660000] [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8) from [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254) [ 79.660000] [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254) from [<c006bff8>] (handle_irq_event+0x3c/0x5c) [ 79.660000] [<c006bff8>] (handle_irq_event+0x3c/0x5c) from [<c006e6d0>] (handle_level_irq+0x90/0x110) [ 79.660000] [<c006e6d0>] (handle_level_irq+0x90/0x110) from [<c006b930>] (generic_handle_irq+0x38/0x50) [ 79.660000] [<c006b930>] (generic_handle_irq+0x38/0x50) from [<c00102fc>] (handle_IRQ+0x30/0x84) [ 79.660000] [<c00102fc>] (handle_IRQ+0x30/0x84) from [<c000f058>] (__irq_svc+0x38/0x60) [ 79.660000] [<c000f058>] (__irq_svc+0x38/0x60) from [<c0010520>] (default_idle+0x2c/0x40) [ 79.660000] [<c0010520>] (default_idle+0x2c/0x40) from [<c0010a90>] (cpu_idle+0x64/0xcc) [ 79.660000] [<c0010a90>] (cpu_idle+0x64/0xcc) from [<c04ff858>] (start_kernel+0x244/0x2c8) Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: sdhci-pci: CaFe has broken card detectionDaniel Drake2012-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 55fc05b7414274f17795cd0e8a3b1546f3649d5e upstream. At http://dev.laptop.org/ticket/11980 we have determined that the Marvell CaFe SDHCI controller reports bad card presence during resume. It reports that no card is present even when it is. This is a regression -- resume worked back around 2.6.37. Around 400ms after resuming, a "card inserted" interrupt is generated, at which point it starts reporting presence. Work around this hardware oddity by setting the SDHCI_QUIRK_BROKEN_CARD_DETECTION flag. Thanks to Chris Ball for helping with diagnosis. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: sdio: avoid spurious calls to interrupt handlersNicolas Pitre2012-06-012-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit bbbc4c4d8c5face097d695f9bf3a39647ba6b7e7 upstream. Commit 06e8935feb ("optimized SDIO IRQ handling for single irq") introduced some spurious calls to SDIO function interrupt handlers, such as when the SDIO IRQ thread is started, or the safety check performed upon a system resume. Let's add a flag to perform the optimization only when a real interrupt is signaled by the host driver and we know there is no point confirming it. Reported-by: Sujit Reddy Thumma <sthumma@codeaurora.org> Signed-off-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: unbreak sdhci-esdhc-imx on i.MX25Eric Bénard2012-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit b89152824f993a9572b47eb31f4579feadeac34c upstream. This was broken by me in 37865fe91582582a6f6c00652f6a2b1ff71f8a78 ("mmc: sdhci-esdhc-imx: fix timeout on i.MX's sdhci") where more extensive tests would have shown that read or write of data to the card were failing (even if the partition table was correctly read). Signed-off-by: Eric Bénard <eric@eukrea.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: atmel-mci: correct data timeout computationLudovic Desroches2012-04-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 66292ad92c6d3f2f1c137a1c826b331ca8595dfd upstream. The HSMCI operates at a rate of up to Master Clock divided by two. Moreover previous calculation can cause overflows and so wrong timeouts. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: sdhci-esdhc-imx: fix for mmc cards on i.MX5Sascha Hauer2012-03-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 5b6b0ad6e572b32a641116aaa5f897ffebe31e44 upstream. On i.MX53 we have to write a special SDHCI_CMD_ABORTCMD to the SDHCI_TRANSFER_MODE register during a MMC_STOP_TRANSMISSION command. This works for SD cards. However, with MMC cards the MMC_SET_BLOCK_COUNT command is used instead, but this needs the same handling. Fix MMC cards by testing for the MMC_SET_BLOCK_COUNT command aswell. Tested on a custom i.MX53 board with a Transcend MMC+ card and eMMC. The kernel started used MMC_SET_BLOCK_COUNT in 3.0, so this is a regression for these boards introduced in 3.0; it should go to 3.0/3.1/3.2-stable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: core: check for zero length ioctl dataJohan Rudholm2012-02-291-37/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 4d6144de8ba263eb3691a737c547e5b2fdc45287 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | OMAP_HSMMC: Migration to IRQ threaded handlerNaga Venkata Srikanth V2012-12-141-26/+7
| | | | | | | | | | | | | | | | | | Changed the mmc card detect request_irq() to request_threaded_irq(). Removed sceduled work in the ISR and replaced with thread. Change-Id: I02c1fb0353bd3a7ce939a80e0f8cd57c4aafec8c Signed-off-by: Naga Venkata Srikanth V <vnv.srikanth@samsung.com> Signed-off-by: Oleg_Kosheliev <oleg.kosheliev@ti.com>
* | omap-hsmmc: Implementation of i761 errataSemen Protsenko2012-07-091-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Errata description: Due to a bad behavior of an internal signal, the Card Error interrupt bit MMCHS_STAT[28] CERR may not be set sometimes when an error occurred in the card response. Workaround: After responses of type R1/R1b for all cards and responses of type R5/R5b/R6 for SD and SDIO cards, software must read two registers: MMCHS_RSP10 and MMCHS_CSRE. When a MMCHS_CSRE[i] bit is set to 1, if the corresponding bit at the same position in the response MMCHS_RSP10[i] is set to 1, the host controller indicates a card error and software should proceed in the same way as if a CERR interrupt would have been detected in the MMCHS_STAT register. Note: This errata is applicable for omap44xx. Change-Id: Ib024bfb0624df04b7d6c61c129cbd9a34f919814 Signed-off-by: Semen Protsenko <semen.protsenko@ti.com>
* | mmc: new api mmc_release_host_sync()Viswanath Puttagunta2012-06-215-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current mmc API to release a specific mmc host mmc_release_host() does not call host specific disable() function immediately, but schedules it to be called with some delay. Sometimes, during suspend/resume operations, this is causing host->disable() function not to be called before suspend and so the resources associated with host are not released resulting in clocks not being released. The new API mmc_release_host_sync() calls mmc_host_disable() immediately instead of calling mmc_host_lazy_diable(). Change-Id: I64f3c8a96c29d9f4cff0382a3fe131faf48f2da1 Signed-off-by: Viswanath Puttagunta <vishp@ti.com> Signed-off-by: Leonid Iziumtsev <x0153368@ti.com>
* | OMAP4: DPLL cascading: The HSMMC output clock handling to support DPLL cascadingMadhusudhan Chikkature2012-06-181-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | The HSMMC1 output clock will change from 96MHz to 49MHz upon entry to DPLL cascading mode. This patch modifies the MMC1 divisor to handle the change in clock frequency. [Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>: Ported and adapted to p-android-omap-3.0] Change-Id: Ia52425132bfcc80489b39cb5562dc86cc483cb83 Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com> Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
* | omap-hsmmc: Prevent possible race conditionSemen Protsenko2012-06-151-13/+6
| | | | | | | | | | | | | | | | | | Making mmc_host_enable() and mmc_host_disable() invocations exclusive to prevent race condition that occurs on specific board configurations based on Blaze platform when repeated suspend/resume performed. Change-Id: Ia709c2e0a4e19a0abb1cfbe7651c838b7c13fc1c Signed-off-by: Semen Protsenko <semen.protsenko@ti.com>
* | Merge latest changes from google kernel/common.gitRoman Shaposhnikov2012-06-133-42/+57
| | | | | | | | | | | | | | Kernel version updated to 3.0.31 Change-Id: Ifbd7150801f3beeec9cbaa566f249d8019ef9348 Signed-off-by: Roman Shaposhnikov <x0166637@ti.com>
* | SDIO: Add support for CCCR version 3.0 and SDIO revision 3.0Pradeep Gurumath2012-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | Add CCCR structure version 3 define in sdio.h and using it for check in API sdio_read_cccr Also added SDIO Revision number 3.0 in sdio.h which is referenced by the TI WiLink driver Change-Id: I309439a00d67b1ca97b11c332bc0ca5a54415356 Signed-off-by: Pradeep Gurumath <pradeepgurumath@ti.com> Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
* | mmc: omap: Increase number of blks we can handleViswanath Puttagunta2012-03-021-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The above block layer is doing a "min" of max_req_size and max_blk_count*512 before submitting each request. As a result, the maximum size of request we are getting is only 120*512 = 60KB even though each line in the ADMA table can handle can handle that data alone. So, we increase the max_blk_count we can handle. Also, note that worst case is when above block layer gives us 512 segments, in which there are 511 single block entries, but one large block that is of size mmc->max_req_size - (511*512) bytes. In this case, we use the reserved 512 table entries to break up the large request. Also adjust the max_segs accordingly. Change-Id: I733effdebea94f51a49bbf323950529afbb00dc4 Signed-off-by: Viswanath Puttagunta <vishp@ti.com>
* | Re-Merge branch 'android-omap-3.0' into p-android-omap-3.0Dan Murphy2012-02-171-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/mach-omap2/Kconfig arch/arm/mach-omap2/omap_twl.c drivers/mmc/host/omap_hsmmc.c drivers/usb/gadget/android.c drivers/video/hdmi_ti_4xxx_ip.c drivers/video/omap2/dss/hdmi.c fs/proc/base.c include/video/hdmi_ti_4xxx_ip.h sound/soc/codecs/twl6040.c sound/soc/omap/sdp4430.c Signed-off-by: Dan Murphy <dmurphy@ti.com>
| * \ Merge branch 'linux-omap-3.0' into android-omap-3.0Erik Gilling2012-01-271-5/+2
| |\ \
| | * | mmc: omap_hsmmc: Prevent calling mmc_host_lazy_disable() on suspend pathDmitry Shmidt2012-01-261-5/+2
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
| * | | Merge branch 'android-3.0' into android-omap-3.0Erik Gilling2012-01-091-17/+7
| |\ \ \
| | * | | mmc: Set suspend/resume bus operations if CONFIG_PM_RUNTIME is usedDmitry Shmidt2011-12-191-17/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
| | * | | Merge commit 'v3.0.8' into android-3.0Colin Cross2011-10-276-33/+57
| | |\ \ \
* | | | | | Merge branch 'android-omap-3.0' into p-android-omap-3.0Dan Murphy2012-02-161-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/mach-omap2/Kconfig arch/arm/mach-omap2/clock44xx_data.c arch/arm/mach-omap2/omap_twl.c drivers/gpu/pvr/ion.c drivers/gpu/pvr/ion.h drivers/gpu/pvr/mm.c drivers/gpu/pvr/omap4/syslocal.h drivers/gpu/pvr/sgxfeaturedefs.h drivers/mmc/host/omap_hsmmc.c drivers/usb/gadget/android.c drivers/video/hdmi_ti_4xxx_ip.c drivers/video/omap2/dss/dispc.c drivers/video/omap2/dss/hdmi.c fs/proc/base.c include/video/hdmi_ti_4xxx_ip.h sound/soc/codecs/twl6040.c sound/soc/omap/sdp4430.c Change-Id: Ia1edb1885eff7554aead12780898502df08b7c83 Signed-off-by: Dan Murphy <dmurphy@ti.com>
* | | | | | mmc: omap: align adma and dma table entriesVenkatraman S2012-02-151-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mmc->max_segs to core layer was set to 1024, but adma table entry could only hold 512 entries. Increase adma table entry size to 1024 from 512 to avoid mismatch. Also set max_blk_count, max_req_size to what adma can handle. Change-Id: I8e08ee39bfa966bdf8a6c4374aea82b34fedcc62 Signed-off-by: Viswanath Puttagunta <vishp@ti.com>
* | | | | | Merge branch 'linux-3.0.18' into p-android-omap-3.0Dan Murphy2012-02-029-15/+26
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/mach-omap2/smartreflex.c drivers/i2c/busses/i2c-omap.c drivers/usb/host/ehci.h drivers/usb/musb/musb_core.c fs/proc/base.c Signed-off-by: Dan Murphy <dmurphy@ti.com>
| * | | | | mmc: sd: Fix SDR12 timing regressionAlexander Elbs2012-01-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit dd8df17fe83483d7ea06ff229895e35a42071599 upstream. This patch fixes a failure to recognize SD cards reported on a Dell Vostro with O2 Micro SD card reader. Patch 49c468f ("mmc: sd: add support for uhs bus speed mode selection") caused the problem, by setting the SDHCI_CTRL_HISPD flag even for legacy timings. Signed-off-by: Alexander Elbs <alex@segv.de> Acked-by: Philip Rakity <prakity@marvell.com> Acked-by: Arindam Nath <arindam.nath@amd.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | | | mmc: sdhci: Fix tuning timer incorrect setting when suspending hostAaron Lu2012-01-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit c6ced0db08010ed75df221a2946c5228454b38d5 upstream. When suspending host, the tuning timer shoule be deactivated. And the HOST_NEEDS_TUNING flag should be set after tuning timer is deactivated. Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Aaron Lu <aaron.lu@amd.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | | | mmc: core: Fix voltage select in DDR modeGirish K S2012-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 913047e9e5787a90696533a9f109552b7694ecc9 upstream. This patch fixes the wrong comparison before setting the interface voltage in DDR mode. The assignment to the variable ddr before comaprison is either ddr = MMC_1_2V_DDR_MODE; or ddr == MMC_1_8V_DDR_MODE. But the comparison is done with the extended csd value if ddr == EXT_CSD_CARD_TYPE_DDR_1_2V. Signed-off-by: Girish K S <girish.shivananjappa@linaro.org> Acked-by: Subhash Jadavani <subhashj@codeaurora.org> Acked-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | | | ARM: 7220/1: mmc: mmci: Fixup error handling for dmaUlf Hansson2012-01-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 3b6e3c73851a9a4b0e6ed9d378206341dd65e8a5 upstream. When getting a cmd irq during an ongoing data transfer with dma, the dma job were never terminated. This is now corrected. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Per Forlin <per.forlin@stericsson.com> Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | | | ARM: 7214/1: mmc: mmci: Fixup handling of MCI_STARTBITERRUlf Hansson2012-01-061-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit b63038d6f4ca5d1849ce01d9fc5bb9cb426dec73 upstream. The interrupt was previously enabled and then correctly cleared. Now we also handle it correctly. Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | | | mmc: vub300: fix type of firmware_rom_wait_states module parameterRusty Russell2012-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 61074287c2965edf0fc75b54ae8f4ce99f182669 upstream. You didn't mean this to be a bool. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Tony Olech <tony.olech@elandigitalsystems.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | | | mmc: mxcmmc: fix falling back to PIOSascha Hauer2011-12-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit e58f516ff4730c4047c3f104b061f7a03e9a263c upstream. When we can't configure the dma channel we want to fall back to PIO. We do this by setting host->do_dma to zero. This does not work as do_dma is used to see whether dma can be used for the current transfer. Instead, we have to set host->dma to NULL. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | | | mmc: core: ext_csd.raw_* used in comparison but never setAndrei Warkentin2011-11-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 5238acbe36dd5100fb6b035a995ae5fc89dd0708 upstream. f39b2dd9d ("mmc: core: Bus width testing needs to handle suspend/resume") added code to only compare read-only ext_csd fields in bus width testing code, yet it's comparing some fields that are never set. The affected fields are ext_csd.raw_erased_mem_count and ext_csd.raw_partition_support. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com> Acked-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | | | mmc: core: Fix hangs related to insert/remove of cardsUlf Hansson2011-11-115-5/+9
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 7f7e4129c23f0419257184dff6fec89d2d5a8964 upstream. During a rescan operation mmc_attach(sd|mmc|sdio) functions are called. The error handling in these function can trigger a detach of the bus, which also meant a power off. This is not notified by the rescan operation which then continues to the next attach function. If a power off has been done, the framework must never send any new commands to the host driver, without first doing a new power up. This will most likely trigger any host driver to hang. Moving power off out of detach and instead handle power off separately when it is actually needed, solves the issue. Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | | | MMC: increased write data timeout for SD cards to 500msAndrii Guriev2011-12-301-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to SD Specifications version 3.01 application note, the recommended write timeout for SD hosts is atleast 500 ms. Change-Id: I3c00b588c1c875d04ad1b5c40fc4270dc54611dc Signed-off-by: Andrii Guriev <x0160204@ti.com> Signed-off-by: Viswanath Puttagunta <vishp@ti.com>