aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-03-27watchdog: Convert ep93xx driver to watchdog coreH Hartley Sweeten2-149/+55
Convert the ep93xx_wdt driver to the watchdog framework API. Also, use the dev_<fmt> functions instead of pr_<fmt> for logging. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ryan Mallon <[email protected]> Cc: Mika Westerberg <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: sp805: Use devm routinesViresh Kumar1-22/+13
sp805 driver currently uses normal kzalloc, ioremap, etc routines. This patch replaces these routines with devm_kzalloc and devm_request_mem_region etc, so that we don't need to handle freeing of resources for error cases and module removal routine. Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: sp805: replace readl/writel with lighter _relaxed variantsViresh Kumar1-12/+12
readl/writel versions for ARM contain memory barrier instruction for synchronizing DMA buffers. These are not required at least on this module. So use lighter _relaxed variants. Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: sp805: Fix documentation style commentViresh Kumar1-8/+7
@ was missing before variables names, in their description. Also adev is mentioned as dev in comment. Fix both these issues. Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: mpcore_wdt: Allow platform_get_irq() to failViresh Kumar1-9/+9
irq is not necessary for mpcore wdt. Don't return error if it is not passed. But if it is passed, then request_irq must pass. Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: mpcore_wdt: Use devm routinesViresh Kumar1-39/+19
mpcore_wdt driver currently uses normal kzalloc, request_irq, ioremap, etc routines. This patch replaces these routines with devm_kzalloc and devm_request_mem_region etc, so that we don't need to handle freeing of resources for error cases and module removal routine. Also, request_irq is moved before registering misc device, so that we are ready for irq as soon as device is registered. Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: mpcore_wdt: Rename dev to pdev for pointing to struct platform_deviceViresh Kumar1-20/+20
Pointer to struct platform_device is named as dev, which makes it confusing when we write statements like dev->dev to access struct device within it. This patch renames such names to pdev. Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: xen: don't clear is_active when xen_wdt_stop() failedJan Beulich1-3/+5
xen_wdt_release() shouldn't clear is_active even when the watchdog didn't get stopped (which by itself shouldn't happen, but let's return a proper error in this case rather than adding a BUG() upon hypercall failure). Signed-off-by: Jan Beulich <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: xen: don't unconditionally enable the watchdog during resumeJan Beulich1-1/+8
This was found to be a problem particularly after guest migration. Signed-off-by: Jan Beulich <[email protected]> Reported-by: Wouter de Geus <[email protected]> Reported-by: Ian Campbell <[email protected]> Tested-by: Wouter de Geus <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: fix compiler error for missing parenthesisJaehoon Chung1-1/+1
Joe's patch(watchdog: Use pr_<fmt> and pr_<level>) missed parenthesis in s3c2410_wdt.c. Signed-off-by: Jaehoon Chung <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: ep93xx_wdt.c: fix platform probeWim Van Sebroeck1-8/+8
Fix the device/driver init so that the misc_register happens as last (since this opens userspace access to the device). Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: ep93xx: Convert the watchdog driver into a platform device.H Hartley Sweeten3-14/+53
Convert the ep93xx watchdog driver into a platform device and remove it's dependency on <mach/hardware.h>. Signed-off-by: H Hartley Sweeten <[email protected]> Signed-off-by: Ryan Mallon <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2012-03-27watchdog: fix set_timeout operationsWim Van Sebroeck7-3/+11
Since we changed the behaviour of the set_timeout operation in the watchdog API, we need to change the allready converted drivers so that they update the timeout field at the end of the set_timeout operation. Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: watchdog_dev: Let the driver update the timeout field on ↵Hans de Goede2-4/+4
set_timeout success When a set_timeout operation succeeds this does not necessarily mean that the exact timeout requested has been achieved, because the watchdog does not necessarily have a 1 second resolution. So rather then have the core set the timeout member of the watchdog_device struct to the exact requested value, instead the driver should set it to the actually achieved timeout value. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: softdog: convert to watchdog coreAlan Cox2-146/+37
Convert softdog.c to the new watchdog API. Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: Convert max63xx_wdt driver to watchdog frameworkAxel Lin2-159/+32
This patch converts max63xx_wdt driver to watchdog framework. Also use devm_* APIs to save a few error handling code. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: pnx4008: convert driver to use the watchdog frameworkWolfram Sang2-140/+41
Make this driver a user of the watchdog framework and remove parts now handled by the core. Tested on a custom lpc32xx-board. [[email protected]: Added set_timeout operation] Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: Convert wm8350_wdt driver to watchdog coreAxel Lin2-179/+38
This patch converts wm8350_wdt driver to use watchdog core APIs. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: Convert jz4740_wdt driver to watchdog coreAxel Lin2-175/+90
This patch converts jz4740_wdt driver to use watchdog core APIs. Also use devm_* APIs to save a few error handling code. Signed-off-by: Axel Lin <[email protected]> Acked-by: Paul Cercueil <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: nowayout is boolWim Van Sebroeck86-169/+169
nowayout is actually a boolean value. So make it bool for all watchdog device drivers. Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: Use pr_<fmt> and pr_<level>Joe Perches90-1280/+1039
Use the current logging styles. Make sure all output has a prefix. Add missing newlines. Remove now unnecessary PFX, NAME, and miscellaneous other #defines. Coalesce formats. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: pnx4008: don't use __raw_-accessorsWolfram Sang1-12/+11
__raw_readl/__raw_writel are not meant for drivers [1]. [1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/117626 Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: pnx4008: cleanup resource handling using managed devicesWolfram Sang1-47/+22
The resource handling in this driver was flaky: IO_ADDRESS instead of ioremap (and no unmapping), an unneeded static resource, no central exit path for error cases. Fix this by converting the driver to use managed resources. Also use dev_*-messages instead of pr_* while we are here. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: sp805_wdt: add pm callbacks to support standby/S2R/hibernationViresh Kumar1-0/+33
Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: make imx2_wdt report boot status correctlyOskar Schirmer1-1/+9
Ioctl WDIOC_GETBOOTSTATUS is supposed to return some information on why the system did (re)boot recently, value WDIOF_CARDRESET being used to indicate watchdog induced reboot. Up to now, imx2_wdt did not provide a value here, always returning zero to indicate normal boot. Do evaluate the IMX Watchdog Reset Status Register and produce WDIOF_CARDRESET with WDIOC_GETBOOTSTATUS in case of a watchdog induced reset. Signed-off-by: Oskar Schirmer <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27watchdog: documentation: remove index-fileWolfram Sang1-19/+0
The 00-index file in the watchdog directory is, like many others, outdated (conversion-howto is missing) and doesn't contain worthwhile additional information. As it seems to be a maintenance burden without much gain, simply remove it. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2012-03-27compat: use sys_sendfile64() implementation for sendfile syscallChris Metcalf1-1/+1
<asm-generic/unistd.h> was set up to use sys_sendfile() for the 32-bit compat API instead of sys_sendfile64(), but in fact the right thing to do is to use sys_sendfile64() in all cases. The 32-bit sendfile64() API in glibc uses the sendfile64 syscall, so it has to be capable of doing full 64-bit operations. But the sys_sendfile() kernel implementation has a MAX_NON_LFS test in it which explicitly limits the offset to 2^32. So, we need to use the sys_sendfile64() implementation in the kernel for this case. Cc: <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Chris Metcalf <[email protected]>
2012-03-27mmc: sh_mmcif: simplify bitmask macrosGuennadi Liakhovetski1-12/+9
Purely cosmetic readability improvement, no functional change. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: sh_mobile_sdhi: support modular mmc-core with non-standard hotplugGuennadi Liakhovetski2-2/+20
Currently if a platform wants to implement a non-standard card-detection method, it would need to call tmio_mmc_cd_wakeup(), which is an inline function, calling mmc_detect_change(). For this the platform would have to link mmc_core statically into the kernel, losing the ability to build it as a module. This patch adds a callback to the sh_mobile_sdhi driver, which eliminates this dependency. Signed-off-by: Guennadi Liakhovetski <[email protected]> Acked-by: Magnus Damm <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: sh_mobile_sdhi: add a callback for board specific init codeBastian Hecht2-0/+17
Some boards need a preliminary setup stage to prepare the sdhi controller. Signed-off-by: Bastian Hecht <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() functionGuennadi Liakhovetski1-4/+5
Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: sh_mobile_sdhi: do not manage PM clocks manuallyGuennadi Liakhovetski1-4/+0
On sh-mobile platforms the MMC clock frequency for the TMIO MMC unit is obtained from the same clock, as the one, that runtime power-manages the controller. The SDHI glue code has to access that clock directly, bypassing the runtime PM framework, to get its frequency, but it shouldn't enable or disable it. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: tmio_mmc: remove unused sdio_irq_enabled flagGuennadi Liakhovetski2-3/+0
The sdio_irq_enabled member of struct tmio_mmc_host is a left-over from the previously removed SDIO IRQ workaround. It is no longer needed and can now be removed too. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: tmio_mmc: power status flag doesn't have to be exposed in platform dataGuennadi Liakhovetski3-8/+9
The controller power status flag does not have to be accessed from the hot-plug detection code any more, it can now be removed from the platform data and put in the controller private struct. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMCGuennadi Liakhovetski2-1/+3
To use TMIO MMC driver ability to interface to the generic MMC GPIO card hotplug detection helper, the SDHI driver has to pass the GPIO number from its own platform data. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: tmio_mmc: support the generic MMC GPIO card hotplug helperGuennadi Liakhovetski3-48/+50
If the platform specifies the TMIO_MMC_HAS_COLD_CD flag, use the generic MMC GPIO card hotplug helper. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: tmio: calculate the native hotplug condition only onceGuennadi Liakhovetski2-6/+7
The condition, whether we have to use the native TMIO card hotplug detection interrupt, is rather complex, it is better to only calculate it once and store in the private data. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: simplify mmc_cd_gpio_request() by removing two parametersGuennadi Liakhovetski2-6/+10
Calculate the IRQ number, using gpio_to_irq() and use fixed flags: trigger on both edges. This makes two out of four arguments of the mmc_cd_gpio_request() function redundant. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: sdhci-pci: allow 8-bit bus width for Intel PCHAlexander Stein1-0/+33
Signed-off-by: Alexander Stein <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: sdhci: check interrupt flags in ISR againAlexander Stein1-7/+12
When using MSI it is possible that a new MSI is sent while an earlier MSI is currently handled. In this case SDHCI_INT_STATUS only contains SDHCI_INT_RESPONSE and the ISR would not be called again. But at the end of the ISR SDHCI_INT_DATA_END is now also pending which would be ignored. Fix this by rereading the interrupt flags in the ISR until no interrupt we care is pending. Signed-off-by: Alexander Stein <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: sdhci-pci: Add MSI supportAlexander Stein1-0/+6
Signed-off-by: Alexander Stein <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: core: warn when card doesn't support HPIJaehoon Chung1-4/+8
Someone could use send_hpi_cmd() on a card that doesn't advertise support for HPI. Then maybe didn't work fine. Because card->ext_csd.hpi_cmd didn't set. So if card didn't support hpi, return the warning message. And CMD12's flags is MMC_RSP_R1B. Signed-off-by: Jaehoon Chung <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: davinci: Poll status for small size transfersIdo Yariv1-1/+28
For small size non-dma sdio transactions, it is sometimes better to poll the mmc host and avoid interrupts altogether. Polling lowers the number of interrupts and context switches. Tests have shown that for small transactions, only a few polling iterations are needed, so this is worth while. Signed-off-by: Ido Yariv <[email protected]> Tested-by: Rajashekhara, Sudhakar <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: davinci: Eliminate spurious interruptsIdo Yariv1-6/+27
The davinci mmc interrupt handler fills the fifo, as long as the DXRDY or DRRDY bits are set in the status register. If interrupts fire during this loop, they will be handled by the handler, but the interrupt controller will still buffer these. As a result, the handler will be called again to serve these needlessly. In order to avoid these spurious interrupts, keep interrupts masked while filling the fifo. Signed-off-by: Ido Yariv <[email protected]> Tested-by: Rajashekhara, Sudhakar <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: omap_hsmmc: Avoid a regulator voltage change with dtRajendra Nayak1-1/+14
When booting with Device tree, the omap_hsmmc driver does not program the pbias cell (inside OMAP control module) during a regulator voltage change. In case of non-dt boot, this is handled using callbacks from within platform_data and implemented in machine code. To be able to do this with device tree, without invoking any machine code, a OMAP control module driver is needed which is yet missing. The pbias cell is used to provide a 1.8v or 3.0v reference to the mmc/sd/sdio1 interface supporting both 1.8v and 3.0v voltages. Until a OMAP control module driver is available to handle this, when booting with a device tree blob, never change the regulator voltage which might then require a pbias cell re-program. There are 2 instances where in the mmc regulator voltage can be changed. -1- when the regulator is turned OFF. -2- when attempting a switch to 1.8v from 3.0v for dual volt cards This patch avoids a voltage change in both cases when booting from device tree, and hence compromises on power savings. Once the OMAP control module driver is available and hsmmc driver is modified to then do pbias programming even when booting with device tree, these limitaions can be removed to achieve better power savings. Signed-off-by: Rajendra Nayak <[email protected]> Tested-by: Balaji T K <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: omap_hsmmc: Convert hsmmc driver to use device treeRajendra Nayak2-0/+106
Define dt bindings for the ti-omap-hsmmc, and adapt the driver to extract data (which was earlier passed as platform_data) from device tree. Signed-off-by: Rajendra Nayak <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: sdhci-pci: add SDHCI_QUIRK2_HOST_OFF_CARD_ON for Medfield SDIOAdrian Hunter1-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 <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: sdhci: add quirk for keeping card power during suspendAdrian Hunter2-2/+13
Add quirk SDHCI_QUIRK2_HOST_OFF_CARD_ON to cater for the case when the card keeps power during suspend but the host controller does not i.e. the card power is not controlled by the host controller. In that case, the controller must be fully reset on resume. Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: sdhci-pci: select HC erase size for Medfield eMMCAdrian Hunter1-1/+2
Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-03-27mmc: core: add high-capacity erase size capability flagAdrian Hunter2-1/+3
Let drivers specify the use of high-capacity erase size. Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Chris Ball <[email protected]>