- May 25, 2020
-
-
Dinghao Liu authored
When watchdog_register_device() returns an error code, a pairing runtime PM usage counter decrement is needed to keep the counter balanced. Signed-off-by:
Dinghao Liu <dinghao.liu@zju.edu.cn> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20200521080141.24373-1-dinghao.liu@zju.edu.cn Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@linux-watchdog.org>
-
- Jul 08, 2019
-
-
Guenter Roeck authored
This gets rid of the unnecessary license boilerplate, and avoids having to deal with individual patches one by one. No functional changes. Reviewed-by:
Jerry Hoemann <jerry.hoemann@hpe.com> Acked-by:
Sylvain Lemieux <slemieux.tyco@gmail.com> Reviewed-by:
Matthias Brugger <matthias.bgg@gmail.com> Acked-by:
William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@linux-watchdog.org>
-
- May 05, 2019
-
-
Guenter Roeck authored
Use devm_platform_ioremap_resource to reduce source code size, improve readability, and reduce the likelyhood of bugs. The conversion was done automatically with coccinelle using the following semantic patch. @r@ identifier res, pdev; expression a; expression index; expression e; @@ <+... - res = platform_get_resource(pdev, IORESOURCE_MEM, index); - a = devm_ioremap_resource(e, res); + a = devm_platform_ioremap_resource(pdev, index); ...+> @depends on r@ identifier r.res; @@ - struct resource *res; ... when != res @@ identifier res, pdev; expression index; expression a; @@ - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, index); - a = devm_ioremap_resource(&pdev->dev, res); + a = devm_platform_ioremap_resource(pdev, index); Cc: Joel Stanley <joel@jms.id.au> Cc: Nicolas Ferre <nicolas.ferre@microchip.com> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Keguang Zhang <keguang.zhang@gmail.com> Cc: Vladimir Zapolskiy <vz@mleia.com> Cc: Kevin Hilman <khilman@baylibre.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: Avi Fishman <avifishman70@gmail.com> Cc: Nancy Yuen <yuenn@google.com> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Sylvain Lemieux <slemieux.tyco@gmail.com> Cc: Kukjin Kim <kgene@kernel.org> Cc: Barry Song <baohua@kernel.org> Cc: Orson Zhai <orsonzhai@gmail.com> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Marc Gonzalez <marc.w.gonzalez@free.fr> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Shawn Guo <shawnguo@kernel.org> Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Acked-by:
Alexandre Belloni <alexandre.belloni@bootlin.com> Tested-by:
Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by:
Joel Stanley <joel@jms.id.au> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Acked-by:
Maxime Ripard <maxime.ripard@bootlin.com> Acked-by: Michal Simek <michal.simek@xilinx.com> (cadence/xilinx wdts) Acked-by:
Thierry Reding <treding@nvidia.com> Reviewed-by:
Florian Fainelli <f.fainelli@gmail.com> Acked-by:
Patrice Chotard <patrice.chotard@st.com> Acked-by:
Vladimir Zapolskiy <vz@mleia.com> Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@linux-watchdog.org>
-
- Jul 07, 2018
-
-
Randy Dunlap authored
At over 4000 #includes, <linux/platform_device.h> is the 9th most #included header file in the Linux kernel. It does not need <linux/mod_devicetable.h>, so drop that header and explicitly add <linux/mod_devicetable.h> to source files that need it. 4146 #include <linux/platform_device.h> After this patch, there are 225 files that use <linux/mod_devicetable.h>, for a reduction of around 3900 times that <linux/mod_devicetable.h> does not have to be read & parsed. 225 #include <linux/mod_devicetable.h> This patch was build-tested on 20 different arch-es. It also makes these drivers SubmitChecklist#1 compliant. Signed-off-by:
Randy Dunlap <rdunlap@infradead.org> Reported-by: kbuild test robot <lkp@intel.com> # drivers/media/platform/vimc/ Reported-by: kbuild test robot <lkp@intel.com> # drivers/pinctrl/pinctrl-u300.c Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- Mar 03, 2018
-
-
Marcus Folkesson authored
watchdog_init_timeout() will preserve wdd->timeout value if no parameter nor timeout-secs dt property is set. Signed-off-by:
Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Dec 27, 2015
-
-
Uwe Kleine-König authored
With the early_enable module parameter the watchdog can be started during driver probe time. If this is requested the bets are good that the timer is already running, so to narrow the gap where the timer is disabled only call the disable function when the timer shouldn't be started. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Uwe Kleine-König authored
omap_wdt_start calls pm_runtime_get_sync so dropping a reference just before calling omap_wdt_start doesn't make much sense. Moreover there is no point to use the synchronous variant of pm_runtime_put because the driver doesn't care if the clock is disabled before or after omap_wdt_probe returns. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Nov 23, 2015
-
-
Peter Robinson authored
Fix issue from two patches overlapping causing a kernel oops [ 3569.297449] Unable to handle kernel NULL pointer dereference at virtual address 00000088 [ 3569.306272] pgd = dc894000 [ 3569.309287] [00000088] *pgd=00000000 [ 3569.313104] Internal error: Oops: 5 [#1] SMP ARM [ 3569.317986] Modules linked in: ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_filter ebtable_nat ebtable_broute bridge stp llc ebtables ip6table_security ip6table_raw ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_filter ip6_tables iptable_security iptable_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle musb_dsps cppi41 musb_hdrc phy_am335x udc_core phy_generic phy_am335x_control omap_sham omap_aes omap_rng omap_hwspinlock omap_mailbox hwspinlock_core musb_am335x omap_wdt at24 8250_omap leds_gpio cpufreq_dt smsc davinci_mdio mmc_block ti_cpsw cpsw_common ptp pps_core cpsw_ale davinci_cpdma omap_hsmmc omap_dma mmc_core i2c_dev [ 3569.386293] CPU: 0 PID: 1429 Comm: wdctl Not tainted 4.3.0-0.rc7.git0.1.fc24.armv7hl #1 [ 3569.394740] Hardware name: Generic AM33XX (Flattened Device Tree) [ 3569.401179] task: dbd11a00 ti: dbaac000 task.ti: dbaac000 [ 3569.406917] PC is at omap_wdt_get_timeleft+0xc/0x20 [omap_wdt] [ 3569.413106] LR is at watchdog_ioctl+0x3cc/0x42c [ 3569.417902] pc : [<bf0ab138>] lr : [<c0739c54>] psr: 600f0013 [ 3569.417902] sp : dbaadf18 ip : 00000003 fp : 7f5d3bbe [ 3569.430014] r10: 00000000 r9 : 00000003 r8 : bef21ab8 [ 3569.435535] r7 : dbbc0f7c r6 : dbbc0f18 r5 : bef21ab8 r4 : 00000000 [ 3569.442427] r3 : 00000000 r2 : 00000000 r1 : 8004570a r0 : dbbc0f18 [ 3569.449323] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 3569.456858] Control: 10c5387d Table: 9c894019 DAC: 00000051 [ 3569.462927] Process wdctl (pid: 1429, stack limit = 0xdbaac220) [ 3569.469179] Stack: (0xdbaadf18 to 0xdbaae000) [ 3569.473790] df00: bef21ab8 dbf60e38 [ 3569.482441] df20: dc91b840 8004570a bef21ab8 c03988a4 dbaadf48 dc854000 00000000 dd313850 [ 3569.491092] df40: ddf033b8 0000570a dc91b80b dbaadf3c dbf60e38 00000020 c0df9250 c0df6c48 [ 3569.499741] df60: dc91b840 8004570a 00000000 dc91b840 dc91b840 8004570a bef21ab8 00000003 [ 3569.508389] df80: 00000000 c03989d4 bef21b74 7f5d3bad 00000003 00000036 c020fcc4 dbaac000 [ 3569.517037] dfa0: 00000000 c020fb00 bef21b74 7f5d3bad 00000003 8004570a bef21ab8 00000001 [ 3569.525685] dfc0: bef21b74 7f5d3bad 00000003 00000036 00000001 00000000 7f5e4eb0 7f5d3bbe [ 3569.534334] dfe0: 7f5e4f10 bef21a3c 7f5d0a54 b6e97e0c a00f0010 00000003 00000000 00000000 [ 3569.543038] [<bf0ab138>] (omap_wdt_get_timeleft [omap_wdt]) from [<c0739c54>] (watchdog_ioctl+0x3cc/0x42c) [ 3569.553266] [<c0739c54>] (watchdog_ioctl) from [<c03988a4>] (do_vfs_ioctl+0x5bc/0x698) [ 3569.561648] [<c03988a4>] (do_vfs_ioctl) from [<c03989d4>] (SyS_ioctl+0x54/0x7c) [ 3569.569400] [<c03989d4>] (SyS_ioctl) from [<c020fb00>] (ret_fast_syscall+0x0/0x3c) [ 3569.577413] Code: e12fff1e e52de004 e8bd4000 e5903060 (e5933088) [ 3569.584089] ---[ end trace cec3039bd3ae610a ]--- Cc: <stable@vger.kernel.org> # v4.2+ Signed-off-by:
Peter Robinson <pbrobinson@gmail.com> Acked-by:
Lars Poeschel <poeschel@lemonage.de> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Sep 09, 2015
-
-
Pratyush Anand authored
/sys/class/watchdog/watchdogn/device/modalias can help to identify the driver/module for a given watchdog node. However, many wdt devices do not set their parent and so, we do not see an entry for device in sysfs for such devices. This patch fixes parent of watchdog_device so that /sys/class/watchdog/watchdogn/device is populated. Exceptions: booke, diag288, octeon, softdog and w83627hf -- They do not have any parent. Not sure, how we can identify driver for these devices. Signed-off-by:
Pratyush Anand <panand@redhat.com> Reviewed-by:
Johannes Thumshirn <jthumshirn@suse.de> Acked-by:
Guenter Roeck <linux@roeck-us.net> Acked-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Acked-by:
Lubomir Rintel <lkundrak@v3.sk> Acked-by:
Maxime Coquelin <maxime.coquelin@st.com> Acked-by:
Thierry Reding <treding@nvidia.com> Acked-by:
Viresh Kumar <viresh.kumar@linaro.org> Acked-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Jul 01, 2015
-
-
Lars Poeschel authored
Add a early_enable module parameter to the omap_wdt that starts the watchdog on module insertion. The default value is 0 which does not start the watchdog - which also does not change the behavior if the parameter is not given. Signed-off-by:
Lars Poeschel <poeschel@lemonage.de> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Jun 22, 2015
-
-
Lars Poeschel authored
The omap watchdog hardware is able to read the watchdog timer counter register. This implements this functionality in the omap_wdt driver, so one is can read the time until the watchdog will trigger the reset in seconds using WDIOC_GETTIMELEFT. Signed-off-by:
Lars Poeschel <poeschel@lemonage.de> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Uwe Kleine-König authored
The omap watchdog has the annoying behaviour that writes to most registers don't have any effect when the watchdog is already running. Quoting the AM335x reference manual: To modify the timer counter value (the WDT_WCRR register), prescaler ratio (the WDT_WCLR[4:2] PTV bit field), delay configuration value (the WDT_WDLY[31:0] DLY_VALUE bit field), or the load value (the WDT_WLDR[31:0] TIMER_LOAD bit field), the watchdog timer must be disabled by using the start/stop sequence (the WDT_WSPR register). Currently the timer is stopped in the .probe callback but still there are possibilities that yield to a situation where omap_wdt_start is entered with the timer running (e.g. when /dev/watchdog is closed without stopping and then reopened). In such a case programming the timeout silently fails! To circumvent this stop the timer before reprogramming. Assuming one of the first things the watchdog user does is setting the timeout explicitly nothing too bad should happen because this explicit setting works fine. Fixes: 7768a13c ("[PATCH] OMAP: Add Watchdog driver support") Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Uwe Kleine-König authored
Instead of using an over-long expression involving the ?: operator use an if and instead of an else branch rely on the fact that the data structure was allocated using devm_kzalloc. This also allows to put the used helper variable into a more local scope. There is no functional change. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Felipe Balbi <balbi@ti.com> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Uwe Kleine-König authored
This way only a single allocation is needed (per device). Also this simplifies the data structure used by the driver because there is no need anymore to link from one struct to the other (by means of watchdog_{set,get}_drvdata). Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Uwe Kleine-König authored
Instead of (partly) open coding watchdog_init_timeout to determine the inital timeout use the core function that exists for exactly this purpose. As a side effect the "timeout-sec" device-tree property is recognized now (though currently unused in the omap device trees). Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Feb 17, 2015
-
-
Tony Lindgren authored
This allows testing the watchdog easily with distros just by doing pkill -9 watchdog. Reported-by:
Thomas Dziedzic <gostrc@gmail.com> Signed-off-by:
Tony Lindgren <tony@atomide.com> Acked-by:
Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by:
Felipe Balbi <balbi@ti.com> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Oct 20, 2014
-
-
Wolfram Sang authored
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Mar 31, 2014
-
-
Jingoo Han authored
Use devm_ioremap_resource() in order to make the code simpler, and remove 'struct resource *mem' from 'struct omap_wdt_dev' and omap_wdt_probe(), resplectively. because the 'mem' variables are not used anymore. Also the redundant return value check of platform_get_resource() is removed, because the value is checked by devm_ioremap_resource(). Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Acked-by:
Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Paul Gortmaker authored
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be> Cc: linux-watchdog@vger.kernel.org
-
- Nov 17, 2013
-
-
Victor Kamensky authored
All OMAP IP blocks expect LE data, but CPU may operate in BE mode. Need to use endian neutral functions to read/write h/w registers. I.e instead of __raw_read[lw] and __raw_write[lw] functions code need to use read[lw]_relaxed and write[lw]_relaxed functions. If the first simply reads/writes register, the second will byteswap it if host operates in BE mode. Changes are trivial sed like replacement of __raw_xxx functions with xxx_relaxed variant. Signed-off-by:
Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by:
Taras Kondratiuk <taras.kondratiuk@linaro.org> Acked-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Jingoo Han authored
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Mar 01, 2013
-
-
Pali Rohár authored
Like other watchdog drivers, this patch adds new option nowayout which overwrite WATCHDOG_NOWAYOUT. Signed-off-by:
Pali Rohar <pali.rohar@gmail.com> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Jan 02, 2013
-
-
Aaro Koskinen authored
We forgot to delete this in the commit 4f4753d9 (watchdog: omap_wdt: convert to devm_ functions), and as a result the following compilation warning was introduced: drivers/watchdog/omap_wdt.c: In function 'omap_wdt_remove': drivers/watchdog/omap_wdt.c:299:19: warning: unused variable 'res' [-Wunused-variable] Signed-off-by:
Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by:
Paul Walmsley <paul@pwsan.com> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Dec 19, 2012
-
-
Aaro Koskinen authored
Eliminate a goto to simplify the code. Signed-off-by:
Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Aaro Koskinen authored
It's not needed to manually reset the driver data. Signed-off-by:
Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Aaro Koskinen authored
Use devm_kzalloc(), devm_request_mem_region() ande devm_ioremap() to simplify the code. Signed-off-by:
Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Aaro Koskinen authored
Convert omap_wdt to new watchdog core. On OMAP boards, there are usually multiple watchdogs. Since the new watchdog core supports multiple watchdogs, all watchdog drivers used on OMAP should be converted. The legacy watchdog device node is still created, so this should not break existing users. Signed-off-by:
Aaro Koskinen <aaro.koskinen@iki.fi> Tested-by:
Jarkko Nikula <jarkko.nikula@jollamobile.com> Tested-by:
Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Nov 30, 2012
-
-
Tony Lindgren authored
Recent changes to the omap_wdt.c removed the dependencies to the core omap code, but forgot to remove mach/hardware.h. We cannot include any plat headers with multiplatform support enabled. cc: Wim Van Sebroeck <wim@iguana.be> cc: linux-watchdog@vger.kernel.org Signed-off-by:
Tony Lindgren <tony@atomide.com>
-
- Nov 28, 2012
-
-
Bill Pemberton authored
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by:
Bill Pemberton <wfp5p@virginia.edu> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bill Pemberton authored
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by:
Bill Pemberton <wfp5p@virginia.edu> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bill Pemberton authored
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by:
Bill Pemberton <wfp5p@virginia.edu> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- Nov 08, 2012
-
-
Paul Walmsley authored
Previously the OMAP watchdog driver used a non-standard way to report the chip reset source via the GETBOOTSTATUS ioctl. This patch converts the driver to use the standard WDIOF_* flags for this purpose. This patch may break existing userspace code that uses the existing non-standard data format returned by the OMAP watchdog driver's GETBOOTSTATUS ioctl. To fetch detailed reset source information, userspace code will need to retrieve it directly from the CGRM or PRM drivers when those are completed. Previously, to fetch the reset source, the driver either read a register outside the watchdog IP block (OMAP1), or called a function exported directly from arch/arm/mach-omap2. Both approaches are broken. This patch also converts the driver to use a platform_data function pointer. This approach is temporary, and is due to the lack of drivers for the OMAP16xx+ Clock Generation and Reset Management IP block and the OMAP2+ Power and Reset Management IP block. Once drivers are available for those IP blocks, the watchdog driver can be converted to call exported functions from those drivers directly. At that point, the platform_data function pointer can be removed. In the short term, this patch is needed to allow the PRM code to be removed from arch/arm/mach-omap2 (it is being moved to a driver). This version integrates a fix from Jon Hunter <jon-hunter@ti.com> that avoids a NULL pointer dereference in a DT-only boot, and integrates a patch commit message fix from Felipe Balbi <balbi@ti.com>. Signed-off-by:
Paul Walmsley <paul@pwsan.com> Cc: Wim Van Sebroeck <wim@iguana.be> Acked-by:
Wim Van Sebroeck <wim@iguana.be> [paul@pwsan.com: integrated pdata fix from Jon Hunter] Cc: Jon Hunter <jon-hunter@ti.com> [paul@pwsan.com: integrated changelog fix from Felipe Balbi] Cc: Felipe Balbi <balbi@ti.com>
-
- Sep 13, 2012
-
-
Tony Lindgren authored
As the plat and mach includes need to disappear for single zImage work, we need to remove plat/hardware.h. Do this by splitting plat/hardware.h into omap1 and omap2+ specific files. The old plat/hardware.h already has omap1 only defines, so it gets moved to mach/hardware.h for omap1. For omap2+, we use the local soc.h that for now just includes the related SoC headers to keep this patch more readable. Note that the local soc.h still includes plat/cpu.h that can be dealt with in later patches. Let's also include plat/serial.h from common.h for all the board-*.c files. This allows making the include files local later on without patching these files again. Note that only minimal changes are done in this patch for the drivers/watchdog/omap_wdt.c driver to keep things compiling. Further patches are needed to eventually remove cpu_is_omap usage in the drivers. Also only minimal changes are done to sound/soc/omap/* to remove the unneeded includes and to define OMAP44XX_MCPDM_L3_BASE locally so there's no need to include omap44xx.h. While at it, also sort some of the includes in the standard way. Cc: linux-watchdog@vger.kernel.org Cc: alsa-devel@alsa-project.org Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com> Cc: Liam Girdwood <lrg@ti.com> Acked-by:
Wim Van Sebroeck <wim@iguana.be> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Tony Lindgren <tony@atomide.com>
-
- Jul 23, 2012
-
-
Lokesh Vutla authored
OMAP watchdog driver is adapted to runtime PM like a general device driver but it is not appropriate. It is causing couple of functional issues. 1. On OMAP4 SYSCLK can't be gated, because of issue with WDTIMER2 module, which constantly stays in "in transition" state. Value of register CM_WKUP_WDTIMER2_CLKCTRL is always 0x00010000 in this case. Issue occurs immediately after first idle, when hwmod framework tries to disable WDTIMER2 functional clock - "wd_timer2_fck". After this module falls to "in transition" state, and SYSCLK gating is blocked. 2. Due to runtime PM, watchdog timer may be completely disabled. In current code base watchdog timer is not disabled only because of issue 1. Otherwise state of WDTIMER2 module will be "Disabled", and there will be no interrupts from omap_wdt. In other words watchdog will not work at all. Watchdong is a special IP and it should not be disabled otherwise purpose of it itself is defeated. Watchdog functional clock should never be disabled. This patch updates the runtime PM handling in driver so that runtime PM is limited only during probe/shutdown and suspend/resume. The patch fixes issue 1 and 2 Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com> Acked-by:
Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Jul 09, 2012
-
-
Xiao Jiang authored
Add device table for omap_wdt to support dt. Signed-off-by:
Xiao Jiang <jgq516@gmail.com> Acked-by:
Wim Van Sebroeck <wim@iguana.be> Signed-off-by:
Tony Lindgren <tony@atomide.com>
-
- Mar 27, 2012
-
-
Joe Perches authored
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 <joe@perches.com> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Jan 27, 2012
-
-
Shubhrajyoti D authored
Currently the watchdog driver calls the pm_runtime_enable and never the disable. This may cause a warning when pm_runtime_enable checks for the count match. Also fixes the error /build/watchdog # insmod omap_wdt.ko [ 44.999389] omap_wdt omap_wdt: Unbalanced pm_runtime_enable! [ 45.011047] OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec /build/watchdog # Attempting to fix the same by calling pm_runtime_disable. Signed-off-by:
Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
- Jan 06, 2012
-
-
Shubhrajyoti D authored
WDIOC_GETBOOTSTATUS ioctl is imlemented for cpu_is_omap16xx and cpu_is_omap24xx cpus only. For other cpus it falls through to WDIOC_KEEPALIVE. This patch prevents the fall through. Cc: sricharan <r.sricharan@ti.com> Signed-off-by:
Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Axel Lin authored
This patch converts the drivers in drivers/watchdog/* 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> Cc: Nicolas Thill <nico@openwrt.org> Cc: Florian Fainelli <florian@openwrt.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Paul Cercueil <paul@crapouillou.net> Cc: Marc Zyngier <maz@misterjones.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Alejandro Cabrera <aldaya@gmail.com> Cc: "George G. Davis" <gdavis@mvista.com> Cc: Sylver Bruneau <sylver.bruneau@googlemail.com> Cc: Vitaly Wool <vital@embeddedalley.com> Cc: Mika Westerberg <mika.westerberg@iki.fi> Cc: Timo Kokkonen <timo.t.kokkonen@nokia.com> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-
Axel Lin authored
Rather than just defining static spinlock_t variables and then initializing them later in init functions, simply define them with DEFINE_SPINLOCK() and remove the calls to spin_lock_init(). Signed-off-by:
Axel Lin <axel.lin@gmail.com> Cc: Nicolas Thill <nico@openwrt.org> Cc: Heiko Ronsdorf <hero@ihg.uni-duisburg.de> Cc: Rodolfo Giometti <giometti@ascensit.com> Cc: Andrey Panin <pazke@donpac.ru> Cc: Guido Guenther <agx@sigxcpu.org> Cc: Curt E Bruns <curt.e.bruns@intel.com> Cc: Deepak Saxena <dsaxena@plexity.net> Cc: Andrew Victor <linux@maxim.org.za> Cc: George G. Davis <gdavis@mvista.com> Cc: Sylver Bruneau <sylver.bruneau@googlemail.com> Signed-off-by:
Wim Van Sebroeck <wim@iguana.be>
-