aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-08-11rtc/nuc900: fix build warningWan ZongShun1-1/+1
Remove unused local variable. Signed-off-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc/nuc900: modify enable/disable IRQs and driver data setting locationWan ZongShun1-11/+12
This patch does two modifications: (1) Adjust enable/disable IRQs location,enable it after rtc registration and disable it prior to unregistration. (2) Put 'platform_set_drvdata(pdev, nuc900_rtc)' in front of rtc registration still be safety, though there is no need to do this, when I move enable irq after rtc registration, I think still put 'platform_set_drvdata' before rtc registration that would be a good habit. Signed-off-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc/nuc900: make returning time checking function validWan ZongShun1-8/+4
Make returning time checking function valid. In spite of using the 'rtc_valid_tm', nevertheless, the read time function omits its returning value, that means the 'rtc_valid_tm' is useless here. Signed-off-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc/m48t86: use rtc_valid_tm() to check returned tmWan ZongShun1-1/+1
Use rtc_valid_tm() to check the returned struct rtc_time *tm, to avoid returning a wrong tm value. Signed-off-by: Wan ZongShun <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc/m48t59: use rtc_valid_tm() to check returned tmWan ZongShun1-2/+2
Use rtc_valid_tm to check the returned struct rtc_time *tm, to avoid returning a wrong tm value. Signed-off-by: Wan ZongShun <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc/max6900: use rtc_valid_tm() to check returning tmWan ZongShun1-1/+1
Use rtc_valid_tm() to check returning tm for max6900, it can avoid returning wrong tm value. Signed-off-by: Wan ZongShun <[email protected]> Acked-by: Dale Farnsworth <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc/m41t80: use rtc_valid_tm() to check returned tmWan ZongShun1-2/+2
Use rtc_valid_tm() to check returned struct rtc_time *tm - it can avoid returning wrong tm value. Signed-off-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc: add Intersil ISL12022 RTC driverRoman Fietze3-0/+337
- derived from rtc-pcf8563 - no SRAM driver Signed-off-by: Roman Fietze <[email protected]> Cc: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc: driver for the DryIce block found in i.MX25 chipsBaruch Siach3-0/+530
This driver is based on code from Freescale which accompanies their i.MX25 PDK board, with some cleanup. Signed-off-by: Baruch Siach <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Sascha Hauer <[email protected]> Acked-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers/rtc/rtc-pl031.c: remove unused #include <linux/version.h>Huang Weiyi1-1/+0
Signed-off-by: Huang Weiyi <[email protected]> Acked-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc/pxa: remove unnecessary private ops->ioctl()Wan ZongShun1-19/+22
We shouldn't implement private ops->ioctl() unless absolutely necessary. pxa series RTC driver's ioctl() is unnecessary, since RTC subsystem has implement the ioctl() very well,so we can only use the API of '.alarm_irq_enable' and '.update_irq_enable' to do enable irq action. Signed-off-by: Wan ZongShun <[email protected]> Acked-by: Robert Jarzmik <[email protected]> Acked-by: Eric Miao <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc: fixes and new functionality for fm3130Sergey Matyukevich1-51/+130
- add sanity check for alarm data in fm3130_probe - fix fm3130_set_alarm. According to the datasheet, setting match bit '0' indicates that the corresponding alarm field will be used in the match process - add operation alarm_irq_enable operation which is responsible for handling RTC_AIE_ON, RTC_AIE_OFF ioctls - remove clearing of AF bit after reading rtc/alarm control register: according to datasheet this bit is cleared anyway when rtc/alarm control register is read [[email protected]: make fm3130_alarm_irq_enable() static, fix comment layout] Signed-off-by: Sergey Matyukevich <[email protected]> Acked-by: Wan ZongShun <[email protected]> Acked-by: Sergey Lapin <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc/rtc-mxc: remove six unused fieldsWan ZongShun1-6/+0
Remove six unused fields from `struct rtc_plat_data'. Signed-off-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Paul Gortmaker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc/m48t59: kfree(NULL) is OKWan ZongShun1-1/+0
Signed-off-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Paul Gortmaker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc/pxa: remove unused fieldWan ZongShun1-1/+0
pxa_rtc.rtc_alarm is unused. Signed-off-by: Wan ZongShun <[email protected]> Cc: Eric Miao <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers/rtc/rtc-pcf8563.c: remove unused structGraham Gower1-8/+0
Signed-off-by: Graham Gower <[email protected]> Acked-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11rtc/nuc900: fix checking of args during time-settingWan ZongShun1-4/+10
When a user application wants to set the rtc time, the RTC subsystem takes advantage of 'rtc_valid_tm(tm)' to check 'rtc_time *tm' value validity, it make sure the 'tm->tm_year' is larger than 70,so if '70< tm_year < 100', the '(settm->tm_year - 100)' will be negative. ' Setting the negative value to hardware register will be invalid, so I add the 'if' condition to make sure set a valid value to register. Signed-off-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11nuc900/rtc: change the waiting for device ready implementWan ZongShun1-8/+7
- add an mdelay(1) to the polling loop to cause less frequent access to the hardware register. - change the return value from ENODEV to EPERM if the loop timed out. I think the 'Operation not permitted' description is more suitable for the meaning of 'check_rtc_access_enable()' function, it just be used to judge rtc access operation is permitted or not. Signed-off-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11autofs4: remove unneeded null check in try_to_fill_dentry()Dan Carpenter1-2/+1
After 97e7449a7ad: "autofs4: fix indirect mount pending expire race" we no longer assumed that "ino" can be null. The other null checks got removed but this was one was missed. Signed-off-by: Dan Carpenter <[email protected]> Cc: Ian Kent <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11i2o: check return code from put_user()Kulikov Vasiliy1-7/+9
Check return value of put_user() and return -EFAULT if it failed. Original comment "We did a get user...so assuming mem is ok...is this bad?" is incorrect because memory can be read only. Signed-off-by: Kulikov Vasiliy <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11i2o: fix overflow of copy_to_user()Kulikov Vasiliy1-1/+1
If (len > reslen) we must not call copy_to_user() since kernel buffer is smaller than we want to copy. Similar code in this file is correct, so this bug was a typo. Signed-off-by: Kulikov Vasiliy <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers/message/i2o/exec-osm.c: add missing mutex_unlockJulia Lawall1-2/+6
Add a mutex_unlock missing on the error path. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression E1; @@ * mutex_lock(E1,...); <+... when != E1 if (...) { ... when != E1 * return ...; } ...+> * mutex_unlock(E1,...); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: add ricoh e822 pci idPablo Castillo1-0/+8
Signed-off-by: Pablo Castillo <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Tested-by: Gregg Lebovitz <[email protected]> Cc: Maxim Levitsky <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11dts: add ESDHC weird voltage bits workaroundRoy Zang1-0/+1
P4080 ESDHC controller does not support 1.8V and 3.0V voltage. but the host controller capabilities register wrongly set the bits. This patch adds the workaround to correct the weird voltage setting bits. Only 3.3V voltage is supported for P4080 ESDHC controller. Signed-off-by: Roy Zang <[email protected]> Cc: Jerry Huang <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Kumar Gala <[email protected]> Cc: Grant Likely <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11dts: add sdhci,auto-cmd12 field for p4080 device treeRoy Zang2-0/+3
Signed-off-by: Roy Zang <[email protected]> Cc: Jerry Huang <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Kumar Gala <[email protected]> Cc: Grant Likely <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci: add auto CMD12 support for eSDHC driverJerry Huang3-2/+18
Add auto CMD12 command support for eSDHC driver. This is needed by P4080 and P1022 for block read/write. Manual asynchronous CMD12 abort operation causes protocol violations on these silicons. Signed-off-by: Jerry Huang <[email protected]> Signed-off-by: Roy Zang <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Kumar Gala <[email protected]> Cc: Grant Likely <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci: add regulator supportMarek Szyprowski2-1/+27
This patch adds support for regulator API to sdhci core driver. Regulators can be used to disable power in suspended state to reduce dissipated energy. Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Acked-by: Mark Brown <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-s3c: add support for new card detection methodsMarek Szyprowski2-0/+86
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 <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-s3c: enable SDHCI_QUIRK_NO_HISPD_BIT quirkMarek Szyprowski1-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 <[email protected]> Signed-off-by: Marek Szyprowski <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-s3c: add support for the non standard minimal clock valueMarek Szyprowski2-2/+28
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 <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-s3c: add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirkHyuk Lee1-7/+3
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 <[email protected]> Signed-off-by: Kukjin Kim <[email protected]> Cc: Ben Dooks <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11omap hsmmc: fix processing of all dma interrupts as block completionVenkatraman S1-2/+5
If other informative interrupts are enabled for the DMA channel used by hsmmc, those are incorrectly treated as block completion. This patch lets only the block completion interrupt to be processed. Signed-off-by: Venkatraman S <[email protected]> Acked-by: Madhusudhan Chikkature <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers/mmc/host/msm-sdcc: remove dead config optionsChristian Dietrich2-29/+0
CONFIG_MMC_MSM7X00A_RESUME_IN_WQ and CONFIG_MMC_EMBEDDED_SDIO don't exist in Kconfig and is never defined anywhere else, therefore removing all references for it from the source code. Signed-off-by: Christian Dietrich <[email protected]> Acked-by: David Brown <[email protected]> Cc: Daniel Walker <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11omap: pandora: pass wl1251 information to SDIO coreGrazvydas Ignotas3-0/+21
Pandora has TI WL1251 attached on MMC3, which is non-standard SDIO chip. Make use MMC_QUIRK_NONSTD_SDIO to tell SDIO core about it. Signed-off-by: Grazvydas Ignotas <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Bob Copeland <[email protected]> Cc: Kalle Valo <[email protected]> Cc: Madhusudhan Chikkature <[email protected]> Cc: Kishore Kadiyala <[email protected]> Cc: Russell King <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11omap_hsmmc: add init_card pass-through callbackGrazvydas Ignotas2-0/+12
This will allow us to set up special cards in machine drivers just after they are detected by MMC core. Signed-off-by: Grazvydas Ignotas <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Bob Copeland <[email protected]> Cc: Kalle Valo <[email protected]> Cc: Madhusudhan Chikkature <[email protected]> Cc: Kishore Kadiyala <[email protected]> Cc: Russell King <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdio: allow non-standard SDIO cardsGrazvydas Ignotas2-6/+32
There are some chips (like TI WL12xx series) that can be interfaced over SDIO but don't support the SDIO specification, meaning that they are missing CIA (Common I/O Area) with all it's registers. Current Linux SDIO implementation relies on those registers to identify and configure the card, so non-standard cards can not function and cause lots of warnings from the core when it reads invalid data from non-existent registers. After this patch, init_card() host callback can now set new quirk MMC_QUIRK_NONSTD_SDIO, which means that SDIO core should not try to access any standard SDIO registers and rely on init_card() to fill all SDIO structures instead. As those cards are usually embedded chips, all the required information can be obtained from machine board files by the host driver when it's called through init_card() callback. Signed-off-by: Grazvydas Ignotas <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Bob Copeland <[email protected]> Cc: Kalle Valo <[email protected]> Cc: Madhusudhan Chikkature <[email protected]> Cc: Kishore Kadiyala <[email protected]> Cc: Russell King <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-pltfm: add support for CNS3xxx SoC devicesAnton Vorontsov5-0/+114
There's nothing special, just SoC-specific ops and quirks. Signed-off-by: Anton Vorontsov <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Richard R?jfors <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-pltfm: reorganize Makefile entries to support SoC devicesAnton Vorontsov1-1/+3
Due to build system limitations, intermediate and final objects can't have the same names. And as we're going to start building SoC-specific objects, let's rename the module to sdhci-platform, into which we'll link sdhci-pltfm and SoC-specifc objects. There should be no issue in renaming as the driver uses modalias mechanism. This is exactly the same approach as in sdhci-of driver. Signed-off-by: Anton Vorontsov <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Richard R?jfors <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-pltfm: switch to module device table matchingAnton Vorontsov2-1/+27
Sometimes want to place SoC-specific parts alongside with the generic driver, and to do so, we have to switch the driver over to the module device table matching. Note that drivers/mmc/host/sdhci-pltfm.h is so far empty, but it'll hold SoC-specific driver data handlers soon. Signed-off-by: Anton Vorontsov <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Richard R?jfors <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: omap: fix for bus width which improves SD card's peformance.Kishore Kadiyala1-2/+15
This patch improves low speeds for SD cards. OMAP-MMC controller's can support maximum bus width of '8'. when bus width is mentioned as "8" in controller data,the SD stack will check whether bus width is "4" and if not it will set bus width to "1" and there by degrading performance. This patch fixes the issue and improves the performance of SD cards. Signed-off-by: Kishore Kadiyala <[email protected]> Signed-off-by: Venkatraman S <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> Acked-by: Madhusudhan Chikkature <[email protected]> Tested-by: Jarkko Nikula <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Matt Fleming <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: only set blockaddressed for > 2GiB cardsHanumath Prasad1-1/+3
A non-zero value of SEC_COUNT does not indicate that the card is sector addressed. According to the MMC specification, cards with a density greater than 2GiB are sector addressed. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Hanumath Prasad <[email protected]> Signed-off-by: Rabin Vincent <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci: don't assign mmc->caps at SDHCI directlyKyungmin Park1-1/+1
Some host controllers can set mmc->caps before sdhci_add_host(). Signed-off-by: Kyungmin Park <[email protected]> Cc: Grant Likely <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci: 8-bit data transfer width supportKyungmin Park2-0/+6
Some host controllers such as s5pc110 support the WIDE8 feature. Signed-off-by: Kyungmin Park <[email protected]> Cc: Grant Likely <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci: remove useless set_clock() checkKyungmin Park1-1/+1
When using QUIRK_NONSTANDARD_CLOCK, it checks the set_clock() function which is not used actually. So delete it. Signed-off-by: Kyungmin Park <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: make sdhci work with ricoh mmc controllerMaxim Levitsky3-1/+47
The current way of disabling it is not well tested by vendor and has all kinds of bugs that show up on resume from ram/disk. A very good example is a dead SDHCI controller. Old way of disabling is still supported by continuing to use CONFIG_MMC_RICOH_MMC. Based on 'http://list.drzeus.cx/pipermail/sdhci-devel/2007-December/002085.html' Therefore most of the credit for this goes to Andrew de Quincey Signed-off-by: Maxim Levitsky <[email protected]> Cc: Andrew de Quincey <[email protected]> Acked-by: Philip Langdale <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resumeMaxim Levitsky3-26/+64
If you don't use CONFIG_MMC_UNSAFE_RESUME, as soon as you attempt to suspend, the card will be removed, therefore this patch doesn't change the behavior of this option. However the removal will be done by pm notifier, which runs while userspace is still not frozen and thus can freely use del_gendisk, without the risk of deadlock which would happen otherwise. Card detect workqueue is now disabled while userspace is frozen, Therefore if you do use CONFIG_MMC_UNSAFE_RESUME, and remove the card during suspend, the removal will be detected as soon as userspace is unfrozen, again at the moment it is safe to call del_gendisk. Tested with and without CONFIG_MMC_UNSAFE_RESUME with suspend and hibernate. [[email protected]: clean up function prototype] [[email protected]: fix CONFIG_PM-n linkage, small cleanups] [[email protected]: coding-style fixes] Signed-off-by: Maxim Levitsky <[email protected]> Cc: David Brownell <[email protected]> Cc: Alan Stern <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: implement SD-combo (IO+mem) supportMichal Miroslaw4-23/+134
Signed-off-by: Michal Miroslaw <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Chris Ball <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: split mmc_sd_init_card()Michal Miroslaw3-119/+186
This series adds support for SD combo cards to MMC/SD driver stack. SD combo consists of SD memory and SDIO parts in one package. Since the parts have a separate SD command sets, after initialization, they can be treated as independent cards on one bus. Changes are divided into two patches. First is just moving initialization code around so that SD memory part init can be called from SDIO init. Second patch is a proper change enabling SD memory along SDIO. I tried to move as much no-op changes to the first patch so that it's easier to follow the required changes to initialization flow for SDIO cards. This is based on Simplified SDIO spec v.2.00. The init sequence is slightly modified to follow current SD memory init implementation. Command sequences, assuming SD memory and SDIO indeed ignore unknown commands, are the same as before for both parts. This patch: Prepare for SD-combo (IO+mem) support by splitting SD memory card init and related functions. Signed-off-by: Michal Miroslaw <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Chris Ball <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: recognize CSD structureKyungmin Park3-7/+21
The eMMC spec 4.4 and 4.3 + additional feature chips has CSD structure version 3 and version 3 have to check the CSD_STRUCTURE byte in the EXT_CSD register. Also fix EXT_CSD revision message. [[email protected]: fix comment, per Chris Ball] Signed-off-by: Kyungmin Park <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Chris Ball <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11vfs: use kmalloc() to allocate fdmem if possibleChangli Gao1-34/+23
Use kmalloc() to allocate fdmem if possible. vmalloc() is used as a fallback solution for fdmem allocation. A new helper function __free_fdtable() is introduced to reduce the lines of code. A potential bug, vfree() a memory allocated by kmalloc(), is fixed. [[email protected]: use __GFP_NOWARN, uninline alloc_fdmem() and free_fdmem()] Signed-off-by: Changli Gao <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Avi Kivity <[email protected]> Cc: Tetsuo Handa <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>