aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* watchdog: iTCO_wdt.c: convert to watchdog coreWim Van Sebroeck2012-07-23
| | | | | | | This patch converts the iTCO_wdt watchdog driver to use the generic watchdog framework. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* char/ipmi: remove local ioctl defines replaced by generic onesOskar Schirmer2012-07-23
| | | | | | | | | | | | | | | This watchdog driver had ioctl defines introduced locally for pre timeout handling, marked to be removed as soon as a generic replacement would become available. The latter has actually occurred in 2006, at e05b59fe. Remove the local duplicates for pre timeout handling. Signed-off-by: Oskar Schirmer <oskar@scara.com> Acked-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* watchdog: xilinx: Read clock frequency directly from DT nodeMichal Simek2012-07-23
| | | | | | | | | Do not use clock-frequency property from parent node. Use it from watchdog node. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-By: Alejandro Cabrera <acabrera@udio.cujae.edu.cu> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: coh901327_wdt: use clk_prepare/unprepareLinus Walleij2012-07-23
| | | | | | | | | | Make sure we prepare/unprepare the COH901327 watchdog timer as is required by the clk API especially if you use common clock. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by : Pankaj Jangra <jangra.pankaj9@gmail.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: f71808e_wdt: Add support for Jetway JNF99 motherboardJustin Wheeler2012-07-23
| | | | | | | | | | | | The Jetway JNF99 motherboard features a F71869 SuperIO chip, but its watchdog chipset ID appears to be 1007 (as opposed to 0814). Some testing confirmed it behaves the exact same as 0814. So add this chipset ID to the module's ID list so that the Fintek watchdog driver can correctly identify and access it. Signed-off-by: Justin Wheeler <jwheeler@datademons.com> Acked-by: Giel van Schijndel <me@mortis.eu> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* Merge tag 'mmc-merge-for-3.6-rc1' of ↵Linus Torvalds2012-07-22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc Pull MMC updates from Chris Ball: "MMC highlights for 3.6: Core: - Rename cd-gpio to slot-gpio and extend it to support more slot GPIO functions, such as write-protect. - Add a function to get regulators (Vdd and Vccq) for a host. Drivers: - sdhci-pxav2, sdhci-pxav3: Add device tree support. - sdhi: Add device tree support. - sh_mmcif: Add support for regulators, device tree, slot-gpio. - tmio: Add regulator support, use slot-gpio." * tag 'mmc-merge-for-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (62 commits) mmc: sdhci-dove: Prepare for common clock framework mmc: sdhci-dove: Add SDHCI_QUIRK_NO_HISPD_BIT mmc: omap_hsmmc: ensure probe returns error upon resource failure mmc: mxs-mmc: Add wp-inverted property mmc: esdhc: Fix DMA_MASK to not break mx25 DMA access mmc: core: reset signal voltage on power up mmc: sd: Fix sd current limit setting mmc: omap_hsmmc: add clk_prepare and clk_unprepare mmc: sdhci: When a UHS switch fails, cycle power if regulator is used mmc: atmel-mci: modify CLKDIV displaying in debugfs mmc: atmel-mci: fix incorrect setting of host->data to NULL mmc: sdhci: poll for card even when card is logically unremovable mmc: sdhci: Introduce new flag SDHCI_USING_RETUNING_TIMER mmc: sdio: Change pr_warning to pr_warn_ratelimited mmc: core: Simplify and fix for SD switch processing mmc: sdhci: restore host settings when card is removed mmc: sdhci: fix incorrect command used in tuning mmc: sdhci-pci: CaFe has broken card detection mmc: sdhci: Report failure reasons for all cases in sdhci_add_host() mmc: s3cmci: Convert s3cmci driver to gpiolib API ...
| * mmc: sdhci-dove: Prepare for common clock frameworkSebastian Hesselbarth2012-07-22
| | | | | | | | | | | | | | | | As mach-dove is moving towards common clock framework prepare the sdhci driver to grab its clock. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@googlemail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci-dove: Add SDHCI_QUIRK_NO_HISPD_BITSebastian Hesselbarth2012-07-22
| | | | | | | | | | | | | | | | | | The sdio controller on dove doesn't have a bit to indicate high-speed. With the quirk set it fixes accessing high-speed sdcards. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@googlemail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: omap_hsmmc: ensure probe returns error upon resource failureKevin Hilman2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If platform_get_resource_by_name() fails, driver probe is aborted an should return an error so the driver is not bound to the device. However, in the current error path of platform_get_resource_by_name(), probe returns zero since the return value (ret) is not properly set. With a zero return value, the driver core assumes probe was successful and will bind the driver to the device. Fix this by ensuring that probe returns an error code in this failure path. Signed-off-by: Kevin Hilman <khilman@ti.com> Acked-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: mxs-mmc: Add wp-inverted propertyMarek Vasut2012-07-22
| | | | | | | | | | | | | | The write-protect GPIO is inverted on some boards. Handle such case. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: esdhc: Fix DMA_MASK to not break mx25 DMA accessWilson Callan2012-07-22
| | | | | | | | | | | | | | | | | | Patch to not set reserved bits in i.MX25 PROCTL register. DMA stops working if those bits get set. Signed-off-by: Wilson Callan <wilson.callan@savantsystems.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: core: reset signal voltage on power upAaron Lu2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a call to mmc_set_signal_voltage() to set signal voltage to 3.3v in mmc_power_up so that we do not need to touch signal voltage setting in mmc/sd/sdio init functions and rescan function. For mmc/sd cards, when doing a suspend/resume cycle, consider the unsafe resume case, the card will lose its power and when powered on again, we will set signal voltage to 3.3v in mmc_power_up before its resume function gets called, which will re-init the card. And for sdio cards, when doing a suspend/resume cycle, consider the unsafe resume case, the card will either lose its power or not depending on if it wants to wakeup the host. If power is not maintained, it is the same case as mmc/sd cards. If power is maintained, mmc_power_up will not be called and the card's signal voltage will remain at the last setting. Signed-off-by: Aaron Lu <aaron.lu@amd.com> Tested-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sd: Fix sd current limit settingAaron Lu2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Host has different current capabilities at different voltages, we need to record these settings seperately. The defined voltages are 1.8/3.0/3.3. For other voltages, we do not touch current limit setting. Before we set the current limit for the sd card, find out the host's operating voltage first and then find out the current capabilities of the host at that voltage to set the current limit. Signed-off-by: Aaron Lu <aaron.lu@amd.com> Reviewed-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: omap_hsmmc: add clk_prepare and clk_unprepareRajendra Nayak2012-07-22
| | | | | | | | | | | | | | | | | | In preparation for OMAP moving to the Common Clock Framework (CCF) add clk_prepare() and clk_unprepare() for the hsmmc clocks. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Acked-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci: When a UHS switch fails, cycle power if regulator is usedPhilip Rakity2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | Power needs to be removed from the card when switching to 1.8v fails. If a regulator is used to control vmmc we need to turn the regulator off and then back on otherwise power will not be removed from the card. Signed-off-by: Philip Rakity <prakity@marvell.com> Reviewed-by: Aaron Lu <aaron.lu@amd.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: atmel-mci: modify CLKDIV displaying in debugfsNicolas Ferre2012-07-22
| | | | | | | | | | | | | | | | | | | | Modify clock division displaying in debugfs for matching the new CLKDIV,CLKODD user interface arrangement. Is using the has_odd_clk_div property to choose the proper format. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: atmel-mci: fix incorrect setting of host->data to NULLNicolas Ferre2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Setting host->data to NULL is incorrect sequence in STATE_SENDING_STOP state of FSM: This early setting leads to the skip of dma_unmap_sg() in atmci_dma_cleanup() which is a bug. Idea taken from dw_mmc by Seungwon Jeon. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Seungwon Jeon <tgih.jun@samsung.com> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci: poll for card even when card is logically unremovableDaniel Drake2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Marvell CaFe is now marked as having bad card detection to fix a problem during system resume. Now on the OLPC XO-1 we are facing the issue that the card is marked as logically unremovable (via MMC_UNSAFE_RESUME), which means that mmc_card_is_removable considers the card non-removable. The existing code logic decides not to poll for card presence in this case, and card detection is also disabled because of the quirk being set. This means that no SD cards are detected when inserted after boot. Refine the logic to enable card presence polling in the case when a card is logically unremovable, only avoiding the poll in the case when the card is physically non-removable (denoted with MMC_CAP_NONREMOVABLE). Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci: Introduce new flag SDHCI_USING_RETUNING_TIMERAaron Lu2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new flag of SDHCI_USING_RETUNING_TIMER to represent if the host is using a retuning timer for the card inserted. This flag is set when the host does tuning the first time for the card and the host's retuning mode is 1. This flag is used afterwards whenever needs to decide if the host is currently using a retuning timer. This flag is cleared when the card is removed in sdhci_reinit. The set/clear of the flag and the start/stop of the retuning timer is associated with the card's init/remove time, so there is no need to touch it when the host is to be removed as at that time the card should have already been removed. Signed-off-by: Aaron Lu <aaron.lu@amd.com> Reviewed-by: Girish K S <girish.shivananjappa@linaro.org> Reviewed-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdio: Change pr_warning to pr_warn_ratelimitedLiu Chuansheng2012-07-22
| | | | | | | | | | | | | | | | | | | | | | When debugging one bad issue, got lots of pr_warning messages "queuing unknown CIS tuple" which caused a printk storm and flooded the console. This patch changes the pr_warning to use pr_warn_ratelimited. Signed-off-by: Liu Chuansheng <chuansheng.liu@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: core: Simplify and fix for SD switch processingAaron Lu2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In mmc_read_switch, just do a one time mode 0 switch command to get the support bits information, no need to do multiple times as the support bits do not change with different arguments. And no need to check current limit support bits, as these bits are fixed according to the signal voltage. If the signal voltage is 1.8V, the support bits would be 0xf and if the signal voltage is 3.3V, the support bits would be 0x01. We will check host's ability to set the current limit. Signed-off-by: Aaron Lu <aaron.lu@amd.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci: restore host settings when card is removedAaron Lu2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the host settings are affected by different cards inserted, e.g. when an UHS-I card is inserted, the SDHCI_NEEDS_RETUING flag might be set when the tuning timer expired and host's max_blk_count will be reduced to make sure the data transfer for a command does not exceed 4MiB to meet the retuning mode 1's requirement. When the card is removed, we should restore the original setting of the host since we can't be sure the next card being inserted will still be an UHS-I card that needs tuning. The original setting include its max_blk_count and no set of the flag of SDHCI_NEEDS_RETUNING. Signed-off-by: Aaron Lu <aaron.lu@amd.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci: fix incorrect command used in tuningAaron Lu2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For SD hosts using retuning mode 1, when retuning timer expired, it will need to do retuning in sdhci_request before processing the actual request. But the retuning command is fixed: cmd19 for SD card and cmd21 for eMMC card, so we can't use the original request's command to do the tuning. And since the tuning command depends on the card type attached to the host, we will need to know the card type to use the correct tuning command. Signed-off-by: Aaron Lu <aaron.lu@amd.com> Reviewed-by: Philip Rakity <prakity@marvell.com> Cc: stable <stable@vger.kernel.org> [3.3+] Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci-pci: CaFe has broken card detectionDaniel Drake2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * mmc: sdhci: Report failure reasons for all cases in sdhci_add_host()Mark Brown2012-07-22
| | | | | | | | | | | | | | | | | | For most error conditions sdhci_add_host() will print a diagnostic message indicating why it failed but there are a few cases where this does not happen. Add error messages in these cases to aid diagnosis. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: s3cmci: Convert s3cmci driver to gpiolib APISylwester Nawrocki2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The s3c2410_gpio* calls are obsolete and have been scheduled for removal since several kernel releases. Remove them and use common gpiolib API. This patch is a prerequisite for removal of the S3C24XX SoC specific arch/arm/plat-samsung/include/gpio-fns.h header. Tested on Micro2440-SDK. Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci: Allow caps[1] to be set via SDHCI_QUIRK_MISSING_CAPSPhilip Rakity2012-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently only the capability_0 register can be set if SDHCI_QUIRK_MISSING_CAPS is defined. This is a problem when the capability_1 register also needs changing. Use the quirk SDHCI_QUIRK_MISSING_CAPS to allow both registers to be set. Redefining caps[1] is useful when the board design does not support 1.8v vccq so UHS modes are not available. The code that calls sdhci_add_host can then detect this condition and adjust the caps so the UHS mode will not be attempted on UHS cards. Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: mxs-mmc: enable regulator for mmc slotShawn Guo2012-07-22
| | | | | | | | | | | | | | | | If bootloader or platform initialization code does not enable the power supply to mmc slot, we need to do it in mmc driver. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: core: correct invalid error checkingAlan Cox2012-07-21
| | | | | | | | | | | | | | | | | | | | The effect of the existing code is that we continue blindly when we should warn about an invalid allocation unit. Reported-by: dcb314@hotmail.com Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44061 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: only support voltage (vdd) that regulator agrees withPhilip Rakity2012-07-21
| | | | | | | | | | | | | | | | | | If we are using a regulator the SD Host Controller and the regulator should agree about the voltages supported. Use the common subset that is supported. Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci: only set 200mA support for 1.8v if 200mA is availablePhilip Rakity2012-07-21
| | | | | | | | | | | | | | | | | | | | max_current_caps can return 0 if not available from the sd controller. If no regulator is present or the regulator specifies a current less then 200ma, we no longer still set the 200mA caps bit anyway. Signed-off-by: Philip Rakity <prakity@marvell.com> Reviewed-by: Aaron Lu <aaron_lu@amd.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhci: if MAX_CURRENT is 0, try getting current from regulatorPhilip Rakity2012-07-21
| | | | | | | | | | | | | | | | | | | | | | | | The sd host controller spec indicates the the MAX_CURRENT value may be returned as 0. In this case other methods need to be used to return the current. If 0 is returned and there is a regulator, ask the regulator for how much current is available. Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Mark F. Brown <mark.brown314@gmail.com> Reviewed-by: Aaron Lu <aaron.lu@amd.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sh_mmcif: support generic card-detectionGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | | | Extend the sh_mmcif driver to support GPIO card detection, provided by the slot function module. The original .get_cd() platform callback is also preserved for now. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: prohibit card detection when host is not readyGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently mmc host drivers have to decide whether to enable card detection before calling mmc_add_host() -- in which case a card insertion event can arrive before the host has been completely initialised -- or after mmc_add_host(), in which case the initial card detection can be problematic. This patch adds an explicit indication of when card detection should not be carried out. With it in place enabling card detection before calling mmc_add_host() should be safe. Similarly, disabling it again after calling mmc_remove_host() will avoid any races. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sh-mmcif: add OF support, make platform data optionalGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | Add primitive OF support to the sh-mmcif driver, which also makes it necessary to be able to run without platform data. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sdhi: add OF support, make platform data optionalGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | Add primitive support for OF to the SDHI TMIO glue, which also makes it necessary to be able to run without platform data. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: tmio: use generic GPIO CD and WP handlersGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | | | The tmio-mmc driver is already using the generic GPIO CD handler in IRQ mode. This patch adds support for CD polling mode and also checks for availability of a WP GPIO. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sh_mobile_sdhi: support caps2 flagsGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | Let SDHI platforms specify mmc_host::caps2 flags in their platform data. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: tmio: support caps2 flagsGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | Allow tmio mmc glue drivers to pass mmc_host::caps2 flags down to the mmc layer. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: core: add WP pin handler to slot functionsGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | Card Write-Protect pin is often implemented, using a GPIO, which makes it simple to provide a generic handler for it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: core: convert slot functions to managed allocationGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | This prepares for the addition of further slot functions. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: add CD GPIO polling support to slot functionsGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | | | A simple extension of mmc slot functions add support for CD GPIO polling for cases where the GPIO cannot produce interrupts, or where this is not desired for some reason. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: add two capability flags for CD and WP signal polarityGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | To handle CD and WP SD/MMC slot pins we need generic flags to specify their polarity. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: core: use a more generic name for slot function types and fieldsGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | struct mmc_host::hotplug is becoming a generic hook for slot functions. Rename it accordingly. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sh_mmcif: add regulator supportGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add regulator support to the sh_mmcif driver, but also preserve the current power-callback. Also note, that the card power is not switched off during clock gating periods, hence there's no need to power it on every time the card is re-activated. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sh_mmcif: remove redundant .down_pwr() callbackGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | | | | | | | | | From the original version of sh_mmcif the .set_pwr() callback has only been used to turn the card's power on, and the .down_pwr() callback has been used to turn it off. .set_pwr() can be used for both these tasks, which is also how it is implemented by the only user of this API: the SH7724 ecovec board. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sh_mmcif: re-read the clock frequency every time it is turned onGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | | | | | | | With aggressive clock gating the clock can be disabled during interface inactivity. During this time its frequency can be changed by another its user. Therefore when the interface is activated again and the clock is re-enabled, its frequency has to be re-read. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sh_mmcif: fix clock managementGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | | | | | | | Regardless of whether the MMC bus clock is the same as the PM clock on this specific interface, it has to be managed separately. Its proper management should also include enabling and disabling of the clock, whenever the interface is becoming active or going idle respectively. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: sh_mmcif: simplify and use meaningful label names in error-handlingGuennadi Liakhovetski2012-07-21
| | | | | | | | | | | | | | | | | | | | A check for NULL platform data can be conveniently made in the very beginning of probing. Replace numbered error-handling labels in .probe() with meaningful names to make any future reorganisation simpler. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: tmio: remove a duplicated comment lineGuennadi Liakhovetski2012-07-21
| | | | | | | | | | Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>