summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-s3c.c
Commit message (Collapse)AuthorAgeFilesLines
...
* mmc: sdhci-s3c: pass IRQF ONESHOT to request threaded irqHeiko Stübner2012-06-061-1/+1
| | | | | | | | | | | Fix a boot regression in existing kernels causing: genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq XXX caused by 1c6c6952 (genirq: Reject bogus threaded irq requests). Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: Enable runtime power managementMark Brown2012-04-061-0/+28
| | | | | | | | | | Since most of the work is already done by the core we just need to add runtime suspend methods and tell the PM core that runtime PM is enabled for this device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: Use CONFIG_PM_SLEEP to ifdef system suspendMark Brown2012-04-061-4/+7
| | | | | | | | | This matches current best practice as one can have runtime PM enabled without system sleep and CONFIG_PM is defined for both. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: use devm_ functionsJulia Lawall2012-04-061-24/+3Star
| | | | | | | | | | | | | | | | The various devm_ functions allocate memory that is released when a driver detaches. This patch uses these functions for data that is allocated in the probe function of a platform device and is only freed in the remove function. By using devm_ioremap, it also removes a potential memory leak, because there was no call to iounmap in the probe function. The call to platform_get_resource was moved just to make it closer to the place where its result it used. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: Keep a copy of platform data and use itThomas Abraham2012-04-061-2/+9
| | | | | | | | | | The platform data is copied into driver's private data and the copy is used for all access to the platform data. This simpifies the addition of device tree support for the sdhci-s3c driver. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: derive transfer width host cap from max_width in platdataThomas Abraham2012-04-061-0/+8
| | | | | | | | | max_width member in platform data can be used to derive the mmc bus transfer width that can be supported by the controller. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: Remove usage of clk_type member in platform dataThomas Abraham2012-04-061-4/+70
| | | | | | | | | | | | | | | | | | SDHCI controllers on Exynos4 do not include the sdclk divider as per the sdhci controller specification. This case can be represented using the sdhci quirk SDHCI_QUIRK_NONSTANDARD_CLOCK instead of using an additional enum type definition 'clk_types'. Hence, usage of clk_type member in platform data is removed and the sdhci quirk is used. In addition to that, since this qurik is SoC specific, driver data is introduced to represent controllers on SoC's that require this quirk. Cc: Ben Dooks <ben-linux@fluff.org> Cc: Jeongbae Seo <jeongbae.seo@samsung.com> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: add platform data for the second capabilityJaehoon Chung2012-03-111-3/+3
| | | | | | | | | | | This patch is added host_caps2 in sdhci-s3c.c It's necessary that use the second capabilities. And removed the duplicated host_caps. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Chris Ball <cjb@laptop.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* Merge tag 'mmc-merge-for-3.3-rc1' of ↵Linus Torvalds2012-01-141-13/+5Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: sdhci-s3c: use S3C_SDHCI_CONTROL2 instead of hardcoded offset valueJingoo Han2012-01-121-1/+1
| | | | | | | | | | Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci-s3c: Add pm_caps into SD/MMC hostSangwook Lee2012-01-121-0/+3
| | | | | | | | | | | | | | sdhci-s3c updates pm_caps from platform data for SDIO PM. Signed-off-by: Sangwook Lee <sangwook.lee@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: convert drivers/mmc/host/* to use module_platform_driver()Axel Lin2012-01-121-12/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the drivers in drivers/mmc/host/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: "Michał Mirosław" <mirq-linux@rere.qmqm.pl> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Viresh Kumar <viresh.kumar@st.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* | Merge branch 'samsung/dt' into samsung/cleanupArnd Bergmann2012-01-091-7/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/mach-s3c64xx/Makefile arch/arm/mach-s5pc100/Makefile arch/arm/mach-s5pv210/Makefile Pull in previously resolved conflicts: The Makefiles were reorganized in the "rmk/restart" series and modified in the "samsung/cleanup series". This also pulls in the other conflict resolutions from the restart series against the samsung/dt series. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * mmc: sdhci: remove "state" argument from sdhci_suspend_hostManuel Lauss2011-12-201-7/+14
| | | | | | | | | | | | | | | | | | 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-s3c: Use generic clock names for sdhci bus clock optionsRajeshwari Shinde2011-12-231-5/+2Star
|/ | | | | | | | | | This patch modifies the driver to stop depending on the clock names being passed from the platform and switch over to bus clock lookup using generic clock names. Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Chris Ball <cjb@laptop.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* mmc: sdhci-s3c: Remove old and misprototyped suspend operationsMark Brown2011-12-101-2/+0Star
| | | | | | | | | | | Now that the driver is using dev_pm_ops the suspend operations in the platform_driver structure won't get called so don't need to be there, and certainly shouldn't be the same function as dev_pm_ops since the signatures are different. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: fix potential NULL dereferenceJaehoon Chung2011-10-261-2/+4
| | | | | | | | sc->clk_bus[ptr] could be NULL. 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>
* mmc: sdhci-s3c: add default controller configurationThomas Abraham2011-10-261-11/+17
| | | | | | | | | | The default controller configuration which was previously setup by platform helper functions is moved into the driver. Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: Fix mmc card I/O problemGirish K S2011-08-311-0/+2
| | | | | | | | | | | | | | | | | | | This patch fixes the problem in sdhci-s3c host driver for Samsung Soc's. During the card identification stage the mmc core driver enumerates for the best bus width in combination with the highest available data rate. It starts enumerating from the highest bus width (8) to lowest width (1). In case of few MMC cards the 4-bit bus enumeration fails and tries the 1-bit bus enumeration. When switched to 1-bit bus mode the host driver has to clear the previous bus width setting and apply the new setting. The current patch will clear the previous bus mode and apply the new mode setting. Signed-off-by: Girish K S <girish.shivananjappa@linaro.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Cc: <stable@kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: Fix build for header changeMark Brown2011-08-131-0/+1
| | | | | | | | A header change has removed an implicit inclusion of module.h, breaking the build due to the use of THIS_MODULE. Fix that. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: add BROKEN_ADMA_ZEROLEN_DESC quirkJaehoon Chung2011-08-131-0/+3
| | | | | | | | | Samsung SoCs need to set BROKEN_ADMA_ZEROLEN_DESC. (If ADMA operation is more than 65535, maybe set by zero.) 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>
* mmc: sdhci-s3c: Fix return value in sdhci_s3c_suspend/resume()Wonil Choi2011-07-201-4/+2Star
| | | | | | | | Signed-off-by: Wonil Choi <wonil22.choi@samsung.com> Signed-off-by: Minho Ban <mhban@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: Auto CMD12 supportKyungmin Park2011-03-151-0/+3
| | | | | | | Samsung SDHCI host controller supports the Auto CMD12. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: add platform_8bit_width() hookJaehoon Chung2011-01-261-0/+36
| | | | | | | | | | | | | We have 8-bit width support but is not a v3 controller. So we need platform_8bit_width() to support 8-bit buswidth. Also we need MMC_CAP_8_BIT_DATA, so we add it in platdata. This gets 8-bit support working again on s3c, after we previously disabled 8-bit by default on non-v3 controllers. 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>
* mmc: sdhci-s3c: Support controllers with no internal clock dividerJeongbae Seo2011-01-091-0/+62
| | | | | | | | | | | | | | | | | | | | | | | This patch supports controllers with no internal clock divider in SDHCI, such as the s5pc210 board. The external clock divider can be used to make a proper clock because SDHCI doesn't support internal clock divider by itself. If external clock divider type is selected, some functions related to clock control will be overrided by other functions. The current clock control index is added to let you know which clock bus is used for SDHCI when overriding functions. Checking functions are added into sdhci_s3c_consider_clock, because the clock divider step is different from that of host controller. Signed-off-by: Jeongbae Seo <jeongbae.seo@samsung.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: Support additional host capabilitiesJeongbae Seo2011-01-091-0/+4
| | | | | | | | | This patch adds support for additional host capabilities like SD/MMC high speed, SDHCI bus width, etc. Signed-off-by: Jeongbae Seo <jeongbae.seo@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: sdhci-s3c: fix NULL ptr access in sdhci_s3c_removeMarek Szyprowski2010-09-261-2/+4
| | | | | | | | | | | | 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>
* mmc: sdhci-s3c: fix incorrect spinlock usage after mergeMarek Szyprowski2010-09-261-2/+4
| | | | | | | | | | | | In the commit f522886e202a34a2191dd5d471b3c4d46410a9a0 a merge conflict in the sdhci-s3c driver been fixed. However the fix used incorrect spinlock operation - it caused a race with sdhci interrupt service. The correct way to solve it is to use spin_lock_irqsave/irqrestore() calls. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* drivers/mmc/host/sdhci-s3c.c: use the correct mutex and card detect functionKyungmin Park2010-08-201-3/+3
| | | | | | | | | | | There's some merge problem between sdhic core and sdhci-s3c host. After mutex is changed to spinlock. It needs to use use spin lock functions and use the correct card detection function. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sdhci-s3c: add support for new card detection methodsMarek Szyprowski2010-08-111-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some Samsung SoCs not all SDHCI controllers have card detect (CD) line. For some embedded designs it is not even needed, because ususally the device (like SDIO flash memory or wifi controller) is permanently wired to the controller. There are also systems which have a card detect line connected to some of the external interrupt lines or the presence of the card depends on some other actions (like enabling a power regulator). This patch adds support for all these cases. The following card detection methods are possible: 1. internal sdhci host card detect line 2. external event 3. external gpio interrupt 4. no card detect line, controller will poll for the card 5. no card detect line, card is permanently wired to the controller (once detected host won't poll it any more) By default, all existing code would use method #1, what is compatible with the previous version of the driver. In case of external event, two callbacks must be provided in platdata: ext_cd_init and ext_cd_cleanup. Both of them get a callback to a function that notifies the s3c-sdhci host contoller as their argument. That callback function should be called from the even dispatcher to let host notice the card insertion/removal. In case of external gpio interrupt, a gpio pin number must be provided in platdata (ext_cd_gpio parameter), as well as the information about the polarity of that gpio pin (ext_cd_gpio_invert). By default (ext_cd_gpio_invert == 0) gpio value 0 means 'card has been removed', but this can be changed to 'card has been removed' when ext_cd_gpio_invert == 1. This patch adds all required changes to sdhci-s3c driver. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sdhci-s3c: enable SDHCI_QUIRK_NO_HISPD_BIT quirkMarek Szyprowski2010-08-111-0/+1
| | | | | | | | | | | | This patch enables SDHCI_QUIRK_NO_HISPD_BIT on Samsung SDHCI driver. This solves detection problems with some external SD cards. This change has been tested on S5PC100 and S5PC110. It has no inpact on driver speed. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sdhci-s3c: add support for the non standard minimal clock valueMarek Szyprowski2010-08-111-0/+27
| | | | | | | | | | | | | | | | | | | S3C SDHCI host controller can change the source for generating mmc clock. By default host bus clock is used, what causes some problems on machines with 133MHz bus, because the SDHCI divider cannot be as high get proper clock value for identification mode. This is not a problem for the controller, because it can generate lower frequencies from other clock sources. This patch changes sdhci driver to use get_min_clock() call if it has been provided. This fixes the flood of the following warnings on Samsung S5PV210 SoCs: mmc0: Minimum clock frequency too high for identification mode Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sdhci-s3c: add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirkHyuk Lee2010-08-111-7/+3Star
| | | | | | | | | | | | | | On Samsung's SDMMC hosts the timeout clock is derivied from the SD Clock which is set dynamically. So checked SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk and removed 'sdhci_s3c_get_timeout_clk' callback which doesn't need any more. Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sdhci-s3c: add missing remove functionMarek Szyprowski2010-07-211-0/+20
| | | | | | | | | | | | System will crash sooner or later once the memory with the code of the s3c-sdhci.ko module is reused for something else. I really have no idea how the lack of remove function went unnoticed into the mainline code. 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: Linus Torvalds <torvalds@linux-foundation.org>
* sdhci: enable multiblock transfers in sdhci-s3cMaurus Cuelenaere2010-05-271-3/+0Star
| | | | | | | | | | | | Wifi over SDIO doesn't work correctly without multiblock, so enable this. This patch depends on the following patches: Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Cc: Thomas Abraham <thomas.ab@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mmc: s3c6410: enable ADMA feature in 6410 sdhci controllerThomas Abraham2010-05-271-6/+1Star
| | | | | | | | | | | Enable the ADMA feature in the 6410 SDHCI controller driver. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* sdhci: Add SDHCI_QUIRK_NO_MULTIBLOCK quirkBen Dooks2009-06-211-0/+3
| | | | | | | | | | Add quirk to show the controller cannot do multi-block IO. This is mainly for the Samsung SDHCI controller that currently cannot manage to do multi-block PIO without timing out. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* sdhci-s3c: Samsung S3C based SDHCI controller glueBen Dooks2009-06-211-0/+425
Add support for the 'HSMMC' block(s) in the Samsung SoC line. These are compatible with the SDHCI driver so add the necessary setup and driver binding for the platform devices. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Pierre Ossman <pierre@ossman.eu>