Age | Commit message (Collapse) | Author | Files | Lines |
|
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]>
|
|
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]>
|
|
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]>
|
|
@ 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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Convert softdog.c to the new watchdog API.
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
nowayout is actually a boolean value.
So make it bool for all watchdog device drivers.
Signed-off-by: Wim Van Sebroeck <[email protected]>
|
|
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]>
|
|
__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]>
|
|
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]>
|
|
Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
|
|
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]>
|
|
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]>
|
|
<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]>
|
|
Purely cosmetic readability improvement, no functional change.
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
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]>
|
|
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]>
|
|
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Signed-off-by: Alexander Stein <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
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]>
|
|
Signed-off-by: Alexander Stein <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Signed-off-by: Adrian Hunter <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Let drivers specify the use of high-capacity erase size.
Signed-off-by: Adrian Hunter <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|