summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-pci.c
Commit message (Collapse)AuthorAgeFilesLines
* mmc: sdhci: convert reset into a library functionRussell King2014-05-221-0/+1
| | | | | | | | | | | | | Rather than having platform_reset_enter/platform_reset_exit methods, turn the core of the reset handling into a library function which platforms can call at the appropriate moment in their (new) reset method. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Markus Pargmann <mpa@pengutronix.de> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
* mmc: sdhci: convert generic bus width setup to library functionRussell King2014-05-221-4/+2Star
| | | | | | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Markus Pargmann <mpa@pengutronix.de> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
* mmc: sdhci: add support for realtek rts5250Micky Ching2014-02-221-0/+20
| | | | | | | | Add support for realtek rts5250 pci card reader. The card reader has some problems with DDR50 mode, so add a new quirks2 for broken ddr50. Signed-off-by: Micky Ching <micky_ching@realsil.com.cn> Signed-off-by: Chris Ball <chris@printf.net>
* mmc: sdhci-pci: Fix possibility of chip->fixes being nullAdrian Hunter2014-01-231-1/+2
| | | | | | | | It is possible for chip->fixes to be null. Check before dereferencing it. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: stable <stable@vger.kernel.org> # 3.11+ Signed-off-by: Chris Ball <chris@printf.net>
* mmc: sdhci-pci: Fix BYT sd card getting stuck in runtime suspendAdrian Hunter2014-01-201-0/+10
| | | | | | | | | | | | | | | | | | | | | A host controller for a SD card may need a GPIO for card detect in order to wake up from runtime suspend when a card is inserted. If that GPIO is not configured, then the host controller will not wake up. Fix that for the affected devices by not enabling runtime PM unless the GPIO is successfully set up. This affects BYT sd card host controller which had runtime PM enabled from v3.11. For completeness, the MFD sd card host controller is flagged also. The original patch before rebasing (see link below) was tested on v3.11.10 and v3.12.4 although the patch applied with some offsets and fuzz. The original patch is here: http://marc.info/?l=linux-mmc&m=138676702327057 Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: stable <stable@vger.kernel.org> # 3.11+ Signed-off-by: Chris Ball <chris@printf.net>
* mmc: sdhci-pci: add broken HS200 quirk for Intel MerrifieldDavid Cohen2014-01-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to unknown hw issue so far, Merrifield is unable to enable HS200 support. This patch adds quirk to avoid SDHCI to initialize with error below: [ 53.850132] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.12.0-rc6-00037-g3d7c8d9-dirty #36 [ 53.850150] Hardware name: Intel Corporation Merrifield/SALT BAY, BIOS 397 2013.09.12:11.51.40 [ 53.850167] 00000000 00000000 ee409e48 c18816d2 00000000 ee409e78 c123e254 c1acc9b0 [ 53.850227] 00000000 00000000 c1b14148 000003de c16c03bf c16c03bf ee75b480 ed97c54c [ 53.850282] ee75b480 ee409e88 c123e292 00000009 00000000 ee409ef8 c16c03bf c1207fac [ 53.850339] Call Trace: [ 53.850376] [<c18816d2>] dump_stack+0x4b/0x79 [ 53.850408] [<c123e254>] warn_slowpath_common+0x84/0xa0 [ 53.850436] [<c16c03bf>] ? sdhci_send_command+0xb4f/0xc50 [ 53.850462] [<c16c03bf>] ? sdhci_send_command+0xb4f/0xc50 [ 53.850490] [<c123e292>] warn_slowpath_null+0x22/0x30 [ 53.850516] [<c16c03bf>] sdhci_send_command+0xb4f/0xc50 [ 53.850545] [<c1207fac>] ? native_sched_clock+0x2c/0xb0 [ 53.850575] [<c14c1f93>] ? delay_tsc+0x73/0xb0 [ 53.850601] [<c14c1ebe>] ? __const_udelay+0x1e/0x20 [ 53.850626] [<c16bdeb3>] ? sdhci_reset+0x93/0x190 [ 53.850654] [<c16c05b0>] sdhci_finish_data+0xf0/0x2e0 [ 53.850683] [<c16c130f>] sdhci_irq+0x31f/0x930 [ 53.850713] [<c12cb080>] ? __buffer_unlock_commit+0x10/0x20 [ 53.850740] [<c12cbcd7>] ? trace_buffer_unlock_commit+0x37/0x50 [ 53.850773] [<c1288f3c>] handle_irq_event_percpu+0x5c/0x220 [ 53.850800] [<c128bc96>] ? handle_fasteoi_irq+0x16/0xd0 [ 53.850827] [<c128913a>] handle_irq_event+0x3a/0x60 [ 53.850852] [<c128bc80>] ? unmask_irq+0x30/0x30 [ 53.850878] [<c128bcce>] handle_fasteoi_irq+0x4e/0xd0 [ 53.850895] <IRQ> [<c1890b52>] ? do_IRQ+0x42/0xb0 [ 53.850943] [<c1890a31>] ? common_interrupt+0x31/0x38 [ 53.850973] [<c12b00d8>] ? cgroup_mkdir+0x4e8/0x580 [ 53.851001] [<c1208d32>] ? default_idle+0x22/0xf0 [ 53.851029] [<c1209576>] ? arch_cpu_idle+0x26/0x30 [ 53.851054] [<c1288505>] ? cpu_startup_entry+0x65/0x240 [ 53.851082] [<c18793d5>] ? rest_init+0xb5/0xc0 [ 53.851108] [<c1879320>] ? __read_lock_failed+0x18/0x18 [ 53.851138] [<c1bf6a15>] ? start_kernel+0x31b/0x321 [ 53.851164] [<c1bf652f>] ? repair_env_string+0x51/0x51 [ 53.851190] [<c1bf6363>] ? i386_start_kernel+0x139/0x13c [ 53.851209] ---[ end trace 92777f5fe48d33f2 ]--- [ 53.853449] mmcblk0: error -84 transferring data, sector 11142162, nr 304, cmd response 0x0, card status 0x0 [ 53.853476] mmcblk0: retrying using single block read [ 55.937863] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock [ 56.207951] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock [ 66.228785] mmc0: Timeout waiting for hardware interrupt. [ 66.230855] ------------[ cut here ]------------ Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Reviewed-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Acked-by: Dong Aisheng <b29396@freescale.com> Cc: stable <stable@vger.kernel.org> # [3.13] Signed-off-by: Chris Ball <chris@printf.net>
* mmc: sdhci-pci: add support of O2Micro/BayHubTech SD hostsAdam Lee2014-01-131-60/+45Star
| | | | | | | | | | | | | Add O2Micro/BayHubTech SD Host DeviceId 8520 support. Add O2Micro/BayHubTech SD Host DeviceId 8420 & 8421 support. Add O2Micro/BayHubTech SD Host DeviceId 8620 & 8621 support. These card readers are used in laptops like Lenovo ThinkPad W540, Dell Latitude E5440, Dell Latitude E6540. Signed-off-by: Peter Guo <peter.guo@bayhubtech.com> Signed-off-by: Adam Lee <adam.lee@canonical.com> Signed-off-by: Chris Ball <chris@printf.net>
* mmc: sdhci-pci: break out definitions to header fileAdam Lee2014-01-131-73/+1Star
| | | | | | | | Break out definitions in sdhci-pci.c to sdhci-pci.h, for introducing module files like sdhci-pci-xxx.c Signed-off-by: Adam Lee <adam.lee@canonical.com> Signed-off-by: Chris Ball <chris@printf.net>
* mmc: sdhci-pci: Add SDIO/MMC device ID support for Intel ClovertrailEric Ernst2013-10-311-0/+46
| | | | | | | | | This patch adds intel_mid clovertrail SDIO and eMMC device IDs to the sdhci-pci driver. Signed-off-by: Eric Ernst <eric.ernst@linux.intel.com> Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: add Intel Merrifield supportDavid Cohen2013-10-211-0/+30
| | | | | | | | Implement initial SDHCI Intel Merrifield support. This patch is based on previous one from Yunpeng Gao <yunpeng.gao@intel.com>. Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: add another device idAdrian Hunter2013-07-051-0/+9
| | | | | | | Add another PCI device id for an eMMC host controller. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: add support for eMMC hardware reset for BYT eMMC.Adrian Hunter2013-07-051-2/+30
| | | | | | | Add support for eMMC hardware reset for BYT eMMC. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: support runtime PM for BYT SD cardsAdrian Hunter2013-05-261-0/+2
| | | | | | | Add support for runtime PM for BYT SD cards. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: add more device idsAdrian Hunter2013-05-261-0/+54
| | | | | | | Add three more PCI device ids. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: core: fix init controller performance regression, updated patchAdrian Hunter2013-04-151-0/+1
| | | | | | | | | Add MMC_CAP2_NO_PRESCAN_POWERUP to sdhci-pci.c also, use mmc_power_off() for MMC_CAP2_NO_PRESCAN_POWERUP. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> [cjb: previously applied v1 of this patch instead of v4] Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci: Constify sdhci_ops structs where possibleLars-Peter Clausen2013-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Basically all drivers can have sdhci_ops struct const, but almost none do. This patch constifies all sdhci_ops struct declarations where possible. The patch was auto-generated with the following coccinelle semantic patch: // <smpl> @r1@ identifier ops; identifier fld; @@ ops.fld = ...; @disable optional_qualifier@ identifier ops != r1.ops; @@ static +const struct sdhci_ops ops = { ... }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdio: bind acpi with sdio function deviceAaron Lu2013-03-221-0/+1
| | | | | | | | | | | | | ACPI spec 5 defined the _ADR encoding for sdio bus as: High word - slot number (0 based) Low word - function number This patch adds support for binding sdio function device with acpi node, and if successful, involve acpi into its power management. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci: rename platform_8bit_width to platform_bus_widthSascha Hauer2013-02-241-2/+2
| | | | | | | | | | | | The 8bit in the function name is misleading. When set, it will be used to set the bus width, regardless of whether 8bit or another bus width is requested, so change the function name to platform_bus_width. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* Merge tag 'driver-core-3.8-rc1' of ↵Linus Torvalds2012-12-111-7/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg Kroah-Hartman: "Here's the large driver core updates for 3.8-rc1. The biggest thing here is the various __dev* marking removals. This is going to be a pain for the merge with different subsystem trees, I know, but all of the patches included here have been ACKed by their various subsystem maintainers, as they wanted them to go through here. If this is too much of a pain, I can pull all of them out of this tree and just send you one with the other fixes/updates and then, after 3.8-rc1 is out, do the rest of the removals to ensure we catch them all, it's up to you. The merges should all be trivial, and Stephen has been doing them all in linux-next for a few weeks now quite easily. Other than the __dev* marking removals, there's nothing major here, some firmware loading updates and other minor things in the driver core. All of these have (much to Stephen's annoyance), been in linux-next for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fixed up trivial conflicts in drivers/gpio/gpio-{em,stmpe}.c due to gpio update. * tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (93 commits) modpost.c: Stop checking __dev* section mismatches init.h: Remove __dev* sections from the kernel acpi: remove use of __devinit PCI: Remove __dev* markings PCI: Always build setup-bus when PCI is enabled PCI: Move pci_uevent into pci-driver.c PCI: Remove CONFIG_HOTPLUG ifdefs unicore32/PCI: Remove CONFIG_HOTPLUG ifdefs sh/PCI: Remove CONFIG_HOTPLUG ifdefs powerpc/PCI: Remove CONFIG_HOTPLUG ifdefs mips/PCI: Remove CONFIG_HOTPLUG ifdefs microblaze/PCI: Remove CONFIG_HOTPLUG ifdefs dma: remove use of __devinit dma: remove use of __devexit_p firewire: remove use of __devinitdata firewire: remove use of __devinit leds: remove use of __devexit leds: remove use of __devinit leds: remove use of __devexit_p mmc: remove use of __devexit ...
| * mmc: remove use of __devexitBill Pemberton2012-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Manuel Lauss <manuel.lauss@gmail.com> Cc: Chris Ball <cjb@laptop.org> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl> Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com> Cc: Venkatraman S <svenkatr@ti.com> Cc: Viresh Kumar <viresh.linux@gmail.com> Cc: Ian Molton <ian@mnementh.co.uk> Cc: Bruce Chang <brucechang@via.com.tw> Cc: Harald Welte <HaraldWelte@viatech.com> Cc: Pierre Ossman <pierre@ossman.eu> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: remove use of __devinitconstBill Pemberton2012-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinitconst is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Chris Ball <cjb@laptop.org> Cc: linux-mmc@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: remove use of __devinitBill Pemberton2012-11-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Chris Ball <cjb@laptop.org> Cc: Manuel Lauss <manuel.lauss@gmail.com> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl> Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com> Cc: Venkatraman S <svenkatr@ti.com> Cc: Ian Molton <ian@mnementh.co.uk> Cc: Bruce Chang <brucechang@via.com.tw> Cc: Harald Welte <HaraldWelte@viatech.com> Cc: Pierre Ossman <pierre@ossman.eu> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mmc: remove use of __devexit_pBill Pemberton2012-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Chris Ball <cjb@laptop.org> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl> Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com> Cc: Venkatraman S <svenkatr@ti.com> Cc: Ian Molton <ian@mnementh.co.uk> Cc: Bruce Chang <brucechang@via.com.tw> Cc: Harald Welte <HaraldWelte@viatech.com> Cc: Pierre Ossman <pierre@ossman.eu> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mmc: sdhci-pci: Enable SDHCI_CAN_DO_HISPD for Ricoh SDHCI controllerMadhvapathi Sriram2012-12-061-0/+1
|/ | | | | | | | | | The Ricoh SDHCI controllers support Highspeed clocks as evident from the ricoh_mmc_probe_slot() settings. Hence, SDHCI_CAN_DO_HISPD needs to be set to enable SDIO client drivers to set/enable high speed clock settings Signed-off-by: Madhvapathi Sriram <Madhvapathi.Sriram@csr.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: fix 'Invalid iomem size' error message conditionAdrian Hunter2012-11-071-1/+1
| | | | | | | | | The SDHCI standard defines a 256 byte register set but a device that specifies a larger iomem region is not an error. Alter the message condition accordingly. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* Merge tag 'mmc-merge-for-3.7-rc1' of ↵Linus Torvalds2012-10-101-18/+1Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc Pull MMC updates from Chris Ball: "Core: - Add DT properties for card detection (broken-cd, cd-gpios, non-removable) - Don't poll non-removable devices - Fixup/rework eMMC sleep mode/"power off notify" feature - Support eMMC background operations (BKOPS). To set the one-time programmable fuse that enables bkops on an eMMC that doesn't already have it set, you can use the "mmc bkops enable" command in: git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git Drivers: - atmel-mci, dw_mmc, pxa-mci, dove, s3c, spear: Add device tree support - bfin_sdh: Add support for the controller in bf60x - dw_mmc: Support Samsung Exynos SoCs - eSDHC: Add ADMA support - sdhci: Support testing a cd-gpio (from slot-gpio) instead of presence bit - sdhci-pltfm: Support broken-cd DT property - tegra: Convert to only supporting DT (mach-tegra has gone DT-only)" * tag 'mmc-merge-for-3.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (67 commits) mmc: core: Fixup broken suspend and eMMC4.5 power off notify mmc: sdhci-spear: Add clk_{un}prepare() support mmc: sdhci-spear: add device tree bindings mmc: sdhci-s3c: Add clk_(enable/disable) in runtime suspend/resume mmc: core: Replace MMC_CAP2_BROKEN_VOLTAGE with test for fixed regulator mmc: sdhci-pxav3: Use sdhci_get_of_property for parsing DT quirks mmc: dt: Support "broken-cd" property in sdhci-pltfm mmc: sdhci-s3c: fix the wrong number of max bus clocks mmc: sh-mmcif: avoid oops on spurious interrupts mmc: sh-mmcif: properly handle MMC_WRITE_MULTIPLE_BLOCK completion IRQ mmc: sdhci-s3c: Fix crash on module insertion for second time mmc: sdhci-s3c: Enable only required bus clock mmc: Revert "mmc: dw_mmc: Add check for IDMAC configuration" mmc: mxcmmc: fix bug that may block a data transfer forever mmc: omap_hsmmc: Pass on the suspend failure to the PM core mmc: atmel-mci: AP700x PDC is not connected to MCI mmc: atmel-mci: DMA can be used with other controllers mmc: mmci: use clk_prepare_enable and clk_disable_unprepare mmc: sdhci-s3c: Add device tree support mmc: dw_mmc: add support for exynos specific implementation of dw-mshc ...
| * mmc: sdhci-pci: Use module_pci_driverSachin Kamat2012-09-041-18/+1Star
| | | | | | | | | | | | | | | | module_pci_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* | sections: fix section conflicts in drivers/mmcAndi Kleen2012-10-051-1/+1
|/ | | | | | | Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Chris Ball <cjb@laptop.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mmc: sdhci-pci: CaFe has broken card detectionDaniel Drake2012-07-221-0/+1
| | | | | | | | | | | | | | | | | | | 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> [stable@: please apply to 3.0+] Cc: <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* Revert "mmc: sdhci-pci: Add MSI support"Chris Ball2012-04-061-6/+0Star
| | | | | | | | | This reverts commit e6039832bed9a9b967796d7021f17f25b625b616. There are reports of MSI breaking SDHCI on multiple chipsets (JMicron and O2Micro, at least), so this should be reverted until we come up with a whitelist or something. Signed-off-by: Chris Ball <cjb@laptop.org>
* Revert "mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers"Chris Ball2012-04-061-3/+1Star
| | | | | | | This reverts commit c16e981b2fd9455af670a69a84f4c8cf07e12658, because it's no longer useful once MSI support is reverted. Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllersManuel Lauss2012-04-061-1/+3
| | | | | | | | MSI on my O2Micro OZ600 SD card reader is broken. This patch adds a quirk to disable MSI on these controllers. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: allow 8-bit bus width for Intel PCHAlexander Stein2012-03-271-0/+33
| | | | | Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: Add MSI supportAlexander Stein2012-03-271-0/+6
| | | | | Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: add SDHCI_QUIRK2_HOST_OFF_CARD_ON for Medfield SDIOAdrian Hunter2012-03-271-0/+5
| | | | | | | | SDIO is powered separately from the host controller, so the card can remain on while the host controller is powered off during suspend. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: select HC erase size for Medfield eMMCAdrian Hunter2012-03-271-1/+2
| | | | | Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: set Medfield SDIO as non-removableAdrian Hunter2012-02-141-1/+1
| | | | | | | | Set Medfield SDIO as non-removable to avoid un-necessary card detect activity. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: enable runtime PM for Medfield SDIOAdrian Hunter2012-01-121-0/+7
| | | | | | | | | Runtime PM for SDIO is no longer enabled by default (see 5c7f0e083d2d98ba14ddd10e88f001a0ead4cae4) so it must now be enabled per platform, in this case Medfield uses it. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: remove SDHCI_QUIRK2_OWN_CARD_DETECTIONAdrian Hunter2012-01-121-1/+0Star
| | | | | | | | | Even if a driver provides separate card detection, an interrupt is still needed to abort mmc requests that are in progress. SDHCI_QUIRK2_OWN_CARD_DETECTION prevents that, so remove it. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: get gpio numbers from platform dataAdrian Hunter2012-01-121-68/+41Star
| | | | | | | | Retrieve the GPIO numbers for hardware reset and card detect from platform data. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: add platform dataAdrian Hunter2012-01-121-4/+28
| | | | | | | | | | | | | | Add a means of getting platform data for the SDHCI PCI devices. The data is stored against the slot not the device in order to support multi-slot devices. The data allows platform-specific setup (such as getting GPIO numbers from firmware or setting up wl12xx for SDIO) to be done in platform support files instead of the sdhci-pci driver. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: simplify error handlingAxel Lin2012-01-121-20/+18Star
| | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci: remove "state" argument from sdhci_suspend_hostManuel Lauss2011-12-201-13/+13
| | | | | | | | | Drop the "state" argument from sdhci_suspend_host. Its only user is the PCI glue; this allows to move all SDHCI glues to use dev_pm_ops instead. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: add flag for devices that can support runtime PMAdrian Hunter2011-10-261-4/+13
| | | | | | | | Only allow runtime PM for devices that specifically indicate that they support it. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: add runtime pm supportAdrian Hunter2011-10-261-1/+181
| | | | | | | | | | | | | Ths patch allows runtime PM for sdhci-pci, runtime suspending after inactivity of 50ms and ensuring runtime resume before SDHC registers are accessed. During runtime suspend, interrupts are masked. The host controller state is restored at runtime resume. For Medfield, the host controller's card detect mechanism is supplanted by an always-on GPIO which provides for card detect wake-up. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> 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: block: support no access to boot partitionsAdrian Hunter2011-10-261-0/+2
| | | | | | | | | 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: sdhci-pci: add eMMC hardware reset supportAdrian Hunter2011-10-261-0/+72
| | | | | | | Implement eMMC hardware reset for Medfield. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: allow 8-bit bus width for Intel Medfield eMMCsAdrian Hunter2011-07-201-5/+16
| | | | | | | Unless MMC_CAP_8_BIT_DATA is set, the bus width defaults to 4. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-pci: add 8-bit bus width support for mrst hc0Major Lee2011-07-201-0/+33
| | | | | | | | | And hook platform_8bit_width to support 8-bit bus width. Signed-off-by: Major Lee <major_lee@wistron.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>