aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'b9a7985' into HEADKalimochoAz2012-10-144-10/+11
|\ | | | | | | | | Conflicts: kernel/time/timekeeping.c
| * 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>
* | Merge branch 'linux-3.0.y' into HEADKalimochoAz2012-08-301-0/+1
|\ \ | |/ | | | | | | Conflicts: drivers/net/tun.c
| * 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: Make sure host is disabled on suspendDmitry Shmidt2012-08-301-0/+1
| | | | | | | | | | Change-Id: Ie0bf2004e173cef8dad66722a152658d7727ab65 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* | Merge remote-tracking branch 'google/android-samsung-3.0-jb' into HEADKalimochoAz2012-07-201-6/+6
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/mach-s5pv210/mach-herring.c drivers/media/video/samsung/fimc/fimc_dev.c include/trace/events/cpufreq_interactive.h
| * \ Merge remote-tracking branch 'common/android-3.0' into ↵JP Abgrall2012-05-081-2/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android-samsung-30-wip-mergedown * common/android-3.0: (49 commits) Linux 3.0.31 hfsplus: Fix potential buffer overflows sched: Fix nohz load accounting -- again! wl1251: fix crash on remove due to leftover work item wl1251: fix crash on remove due to premature kfree rtlwifi: Fix oops on unload mac80211: fix AP mode EAP tx for VLAN stations ipw2200: Fix race condition in the command completion acknowledge i2c: pnx: Disable clk in suspend libata: skip old error history when counting probe trials hwmon: (coretemp) fix oops on cpu unplug hwmon: (coretemp) Increase CPU core limit efivars: Improve variable validation efi: Validate UEFI boot variables efivars: fix warnings when CONFIG_PSTORE=n efivars: String functions efi: Add new variable attributes SCSI: libsas: fix false positive 'device attached' conditions SCSI: libsas: fix sas_find_bcast_phy() in the presence of 'vacant' phys ARM: 7403/1: tls: remove covert channel via TPIDRURW ...
| | * \ Merge commit 'v3.0.31' into android-3.0Todd Poynor2012-05-081-2/+1
| | |\ \
| * | \ \ Merge remote-tracking branch 'common/android-3.0' into ↵JP Abgrall2012-04-2412-55/+82
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android-samsung-30-wip-mergedown * common/android-3.0: (1178 commits) cpufreq: interactive: remove unused target_validate_time_in_idle cpufreq: interactive: Boost frequency on touchscreen input cpufreq: Separate speed target revalidate time and initial set time cpufreq: interactive: based hispeed bump on target freq, not actual cpufreq: interactive: adjust code and documentation to match cpufreq: interactive: configurable delay before raising above hispeed sync: add poll support sw_sync: add fill_driver_data support sync: add ioctl to get fence data sw_sync: add debug support sync: add debugfs support sync: add timestamps to sync_pts sw_sync: add cpu based sync driver sync: Add synchronization framework Linux 3.0.28 Bluetooth: Fix l2cap conn failures for ssp devices TOMOYO: Fix mount flags checking order. iommu/amd: Make sure IOMMU interrupts are re-enabled on resume cred: copy_process() should clear child->replacement_session_keyring ASoC: ak4642: fixup: mute needs +1 step ... Conflicts: mm/compaction.c Change-Id: I3dc59225d2435eddbed0c639155179e580891ac8 Signed-off-by: JP Abgrall <jpa@google.com>
| | * | | Merge linux-stable 3.0.28 into android-3.0Todd Poynor2012-04-1912-55/+82
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iee820738e53627f5d0447a87ceff34443aa72786 Signed-off-by: Todd Poynor <toddpoynor@google.com>
| * | | | | mmc: sdhci: Skip rest of suspend if mmc_suspend_host() failsDmitry Shmidt2012-03-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
| * | | | | mmc: sdhci: Allow mmc_suspend_host/mmc_resume_host for sdio devicesDmitry Shmidt2012-02-271-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* | | | | | Merge branch 'linux-3.0.y' into HEADKalimochoAz2012-06-132-5/+8
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | |
| * | | | | 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>
* | | | | Merge branch 'linux-3.0.y' into HEADKalimochoAz2012-05-071-2/+1
|\ \ \ \ \ | |/ / / /
| * | | | 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>
* | | | Merge branch 'linux-3.0.y' into icsKalimochoAz2012-04-181-1/+8
|\ \ \ \ | |/ / /
| * | | 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>
* | | | Merge branch 'ics.googleupdate.4.0.4' into cm.icsKalimochoAz2012-04-011-17/+7
|\ \ \ \ | | |/ / | |/| | | | | | | | | | Conflicts: fs/proc/base.c
| * | | Revert "Revert "mmc: Set suspend/resume bus operations if CONFIG_PM_RUNTIME ↵Todd Poynor2012-01-241-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is used"" This reverts commit c96f99d7907853ffb7e29915954dfc38b912fa2c. Change-Id: I1953ba2fda5519023f3d173492b0ea6ce8e33c49 Signed-off-by: Todd Poynor <toddpoynor@google.com>
| * | | Revert "mmc: Set suspend/resume bus operations if CONFIG_PM_RUNTIME is used"Ken Sumrall2012-01-181-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ea693bf7f87603b072f4ceea6684221fa0b8e863. We are reverting this change to see if it clears up some filesystem corruption we are seeing.
| * | | Merge remote branch 'common/android-3.0' into android-samsung-30-wip-mergedownJP Abgrall2011-12-201-17/+7
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/android-3.0: Revert "usb: gadget: rndis: don't use dev_get_stats" net: wireless: bcmdhd: Enable wlan access on resume for all sdio functions net: wireless: bcmdhd: Fix P2P interface removal net: wireless: bcm4329: Fix pno_enable if disassociated net: wireless: bcmdhd: Fix proper scan command even if request is NULL net: wireless: bcmdhd: Decrease event wake_lock timeout to 1500 ms net: wireless: bcmdhd: Fix getting arp_hostip table net: wireless: bcmdhd: Allow to push more packets to FW for Tx net: wireless: bcmdhd: Fix scan crash in ibss mode net: wireless: bcmdhd: Add FW reloading in case of FW hang net: wireless: bcmdhd: Update to Version 5.90.125.94.1 net: wireless: bcmdhd: Use CONFIG_DHD_USE_STATIC_BUF for preallocated memory wireless: Protect regdomain change by mutex mmc: Set suspend/resume bus operations if CONFIG_PM_RUNTIME is used usb: gadget: android: Don't allow changing the functions list if enabled usb: gadget: android: Cancel pending ctrlrequest before disabling ARM: idle: call idle notifiers before stopping nohz tick usb: gadget: android: Reset next_string_id before enable Bluetooth: Keep master role when SCO or eSCO is active
| | * | 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 branch 'linux-3.0.y' into cm.icsKalimochoAz2012-03-121-2/+3
|\ \ \ \ | | |_|/ | |/| |
| * | | 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>
* | | | Merge branch 'linux-3.0.y' into cm.icsKalimochoAz2012-03-011-37/+45
|\ \ \ \ | |/ / /
| * | | 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>
* | | | Merge branch 'linux-3.0.update' into cm.ics.newKalimochoAz2012-02-119-15/+26
|\ \ \ \ | |/ / / | | / / | |/ / |/| |
| * | 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:S3C: Turn interrupts on on resume when flag is setRom Lemarchand2011-11-171-0/+10
| | | | | | | | | | | | | | | | | | | | | When the appropriate flag is set, turn SD controller interrupts on on resume. Change-Id: Icba8b2e9a209d1c39aadbc3cf361e85d2424ab5d Signed-off-by: Rom Lemarchand <rlemarchand@sta.samsung.com>
* | | MMC: S3C: Add support for extra MMC quirkRom Lemarchand2011-11-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Adding support for the extra MMC quirk that leaves clocks running when the device is idle. Change-Id: I7c1fe3e9caa9aaa85bd81d1b9a913be52b2a9646 Signed-off-by: Rom Lemarchand <rlemarchand@sta.samsung.com>
* | | MMC: host: add a quirk to keep the clocks on when idlingRom Lemarchand2011-11-171-2/+4
| | | | | | | | | | | | | | | | | | | | | Add an extra quirk to keep the clocks running when the device is idle. Change-Id: I620f515088385b4b031daa9051c6f1ef380ea4a6 Signed-off-by: Rom Lemarchand <rlemarchand@sta.samsung.com>
* | | mmc: sdhci-s3c: fix NULL ptr access in sdhci_s3c_removeMarek Szyprowski2011-11-171-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If not all clocks have been defined in platform data, the driver will cause a null pointer dereference when it is removed. This patch fixes this issue. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Chris Ball <cjb@laptop.org> Change-Id: I72365e728b4ded3a850fecf5f138186cc1f1ffe2 Signed-off-by: Choi jonghwan <jhbird.choi@samsung.com>
* | | mmc: sdhci-s3c: Add MMC_PM_IGNORE_PM_NOTIFY for builtin deviceDmitry Shmidt2011-11-171-0/+5
| | | | | | | | | | | | | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> Change-Id: I9b787bcbc72b4f05ff3e8679dbefa2be5a6bd73f
* | | S5PC11X: SDHCI: Fix compile warnning.Choi jonghwan2011-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | Fix compile warnning. Change-Id: Ie220b10ecfd4bba306df7def5f4ec56ac6b2486f Signed-off-by: Choi jonghwan <jhbird.choi@samsung.com>
* | | S5PC11X: MMC: set MMC_PM_KEEP_POWER flag for SDIO device.w12.lee2011-11-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set MMC_PM_KEEP_POWER flag for SDIO device before suspending. So, SDIO device can restore its informations on resume. It can resolve wlan resuming issue. Change-Id: Ic61a8cfb78a15b774bde6f68fd9adcaa43041b40 Signed-off-by: w12.lee <w12.lee@samsung.com>
* | | mmc: sdhci: Skip mmc suspend/resume ops for SDIO device,w12.lee2011-11-171-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enable/disable sdc irq instead of request/free, mask all sdc interrupts on suspend merged from project kernel/tegra by Change-Id: I40e12bf414cb4b107c687aa7256b4b8f3e2cd926 Change-Id: If8706a6f469df11036c80811b16162db3a0bb988 Signed-off-by: w12.lee <w12.lee@samsung.com>
* | | sdhci: enable t-flash.Seungwon2011-11-161-1/+1
| | |
* | | sdhci: add support for S5PV210Seungwon2011-11-163-12/+160
| | | | | | | | | | | | Change-Id: I6f4b192af48f0e285076481b0aad984b86a572fe