* [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes
@ 2010-11-16 10:25 Paul Walmsley
2010-11-16 10:25 ` [PATCH 1/3] OMAP2+: wd_timer: separate watchdog disable code from the rest of mach-omap2/devices.c Paul Walmsley
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Paul Walmsley @ 2010-11-16 10:25 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel; +Cc: Charulatha V
Update the OMAP watchdog timer integration code to take advantage of
the new hwmod upgrades added by the "OMAP2+: hwmod core upgrades for
2.6.38: first set" series, posted previously. So that series needs
to be applied before these patches.
Charu, it would be great if you could take a look at these.
Tested on an OMAP34xx BeagleBoard with omap2plus_defconfig.
- Paul
---
wdt_2.6.38
text data bss dec hex filename
5709076 470560 5608992 11788628 b3e154 vmlinux.omap2plus_defconfig.orig
5708892 470560 5608992 11788444 b3e09c vmlinux.omap2plus_defconfig.patched
Paul Walmsley (3):
OMAP2+: wd_timer: separate watchdog disable code from the rest of mach-omap2/devices.c
OMAP2+: wd_timer: disable on boot via hwmod postsetup mechanism
OMAP: wd_timer: remove old, dead probing code
arch/arm/mach-omap2/Makefile | 2 -
arch/arm/mach-omap2/devices.c | 64 +---------------------------
arch/arm/mach-omap2/io.c | 18 ++++++++
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 6 ++-
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 6 ++-
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 6 ++-
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 6 ++-
arch/arm/mach-omap2/wd_timer.c | 54 ++++++++++++++++++++++++
arch/arm/mach-omap2/wd_timer.h | 17 +++++++
arch/arm/plat-omap/devices.c | 38 -----------------
10 files changed, 108 insertions(+), 109 deletions(-)
create mode 100644 arch/arm/mach-omap2/wd_timer.c
create mode 100644 arch/arm/mach-omap2/wd_timer.h
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] OMAP2+: wd_timer: separate watchdog disable code from the rest of mach-omap2/devices.c
2010-11-16 10:25 [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes Paul Walmsley
@ 2010-11-16 10:25 ` Paul Walmsley
2010-11-22 11:07 ` DebBarma, Tarun Kanti
2010-11-16 10:25 ` [PATCH 2/3] OMAP2+: wd_timer: disable on boot via hwmod postsetup mechanism Paul Walmsley
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Paul Walmsley @ 2010-11-16 10:25 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel; +Cc: Charulatha Varadarajan
Split the wd_timer disable code out into its own file,
mach-omap2/wd_timer.c; it belongs in its own file rather than
cluttering up devices.c.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Charulatha Varadarajan <charu@ti.com>
---
arch/arm/mach-omap2/Makefile | 2 +
arch/arm/mach-omap2/devices.c | 55 +++-----------------------------
arch/arm/mach-omap2/wd_timer.c | 68 ++++++++++++++++++++++++++++++++++++++++
arch/arm/mach-omap2/wd_timer.h | 17 ++++++++++
4 files changed, 91 insertions(+), 51 deletions(-)
create mode 100644 arch/arm/mach-omap2/wd_timer.c
create mode 100644 arch/arm/mach-omap2/wd_timer.h
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index b0810b9..fbacad5 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -4,7 +4,7 @@
# Common support
obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o pm.o \
- common.o
+ common.o wd_timer.o
omap-2-3-common = irq.o sdrc.o prm2xxx_3xxx.o
hwmod-common = omap_hwmod.o \
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 5a0c148..cd6a46a 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -33,6 +33,7 @@
#include "mux.h"
#include "control.h"
+#include "wd_timer.h"
#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
@@ -951,69 +952,23 @@ static inline void omap_init_vout(void) {}
/*-------------------------------------------------------------------------*/
-/*
- * Inorder to avoid any assumptions from bootloader regarding WDT
- * settings, WDT module is reset during init. This enables the watchdog
- * timer. Hence it is required to disable the watchdog after the WDT reset
- * during init. Otherwise the system would reboot as per the default
- * watchdog timer registers settings.
- */
-#define OMAP_WDT_WPS (0x34)
-#define OMAP_WDT_SPR (0x48)
-
static int omap2_disable_wdt(struct omap_hwmod *oh, void *unused)
{
- void __iomem *base;
- int ret;
-
- if (!oh) {
- pr_err("%s: Could not look up wdtimer_hwmod\n", __func__);
- return -EINVAL;
- }
-
- base = omap_hwmod_get_mpu_rt_va(oh);
- if (!base) {
- pr_err("%s: Could not get the base address for %s\n",
- oh->name, __func__);
- return -EINVAL;
- }
-
- /* Enable the clocks before accessing the WDT registers */
- ret = omap_hwmod_enable(oh);
- if (ret) {
- pr_err("%s: Could not enable clocks for %s\n",
- oh->name, __func__);
- return ret;
- }
-
- /* sequence required to disable watchdog */
- __raw_writel(0xAAAA, base + OMAP_WDT_SPR);
- while (__raw_readl(base + OMAP_WDT_WPS) & 0x10)
- cpu_relax();
-
- __raw_writel(0x5555, base + OMAP_WDT_SPR);
- while (__raw_readl(base + OMAP_WDT_WPS) & 0x10)
- cpu_relax();
-
- ret = omap_hwmod_idle(oh);
- if (ret)
- pr_err("%s: Could not disable clocks for %s\n",
- oh->name, __func__);
-
- return ret;
+ return omap2_wd_timer_disable(oh);
}
static void __init omap_disable_wdt(void)
{
if (cpu_class_is_omap2())
omap_hwmod_for_each_by_class("wd_timer",
- omap2_disable_wdt, NULL);
+ omap2_disable_wdt, NULL);
return;
}
static int __init omap2_init_devices(void)
{
- /* please keep these calls, and their implementations above,
+ /*
+ * please keep these calls, and their implementations above,
* in alphabetical order so they're easier to sort through.
*/
omap_disable_wdt();
diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c
new file mode 100644
index 0000000..06c256d
--- /dev/null
+++ b/arch/arm/mach-omap2/wd_timer.c
@@ -0,0 +1,68 @@
+/*
+ * OMAP2+ MPU WD_TIMER-specific code
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include <linux/io.h>
+#include <linux/err.h>
+
+#include <plat/omap_hwmod.h>
+
+/*
+ * In order to avoid any assumptions from bootloader regarding WDT
+ * settings, WDT module is reset during init. This enables the watchdog
+ * timer. Hence it is required to disable the watchdog after the WDT reset
+ * during init. Otherwise the system would reboot as per the default
+ * watchdog timer registers settings.
+ */
+#define OMAP_WDT_WPS 0x34
+#define OMAP_WDT_SPR 0x48
+
+
+int omap2_wd_timer_disable(struct omap_hwmod *oh)
+{
+ void __iomem *base;
+ int ret;
+
+ if (!oh) {
+ pr_err("%s: Could not look up wdtimer_hwmod\n", __func__);
+ return -EINVAL;
+ }
+
+ base = omap_hwmod_get_mpu_rt_va(oh);
+ if (!base) {
+ pr_err("%s: Could not get the base address for %s\n",
+ oh->name, __func__);
+ return -EINVAL;
+ }
+
+ /* Enable the clocks before accessing the WDT registers */
+ ret = omap_hwmod_enable(oh);
+ if (ret) {
+ pr_err("%s: Could not enable clocks for %s\n",
+ oh->name, __func__);
+ return ret;
+ }
+
+ /* sequence required to disable watchdog */
+ __raw_writel(0xAAAA, base + OMAP_WDT_SPR);
+ while (__raw_readl(base + OMAP_WDT_WPS) & 0x10)
+ cpu_relax();
+
+ __raw_writel(0x5555, base + OMAP_WDT_SPR);
+ while (__raw_readl(base + OMAP_WDT_WPS) & 0x10)
+ cpu_relax();
+
+ ret = omap_hwmod_idle(oh);
+ if (ret)
+ pr_err("%s: Could not disable clocks for %s\n",
+ oh->name, __func__);
+
+ return ret;
+}
+
diff --git a/arch/arm/mach-omap2/wd_timer.h b/arch/arm/mach-omap2/wd_timer.h
new file mode 100644
index 0000000..e0054a2
--- /dev/null
+++ b/arch/arm/mach-omap2/wd_timer.h
@@ -0,0 +1,17 @@
+/*
+ * OMAP2+ MPU WD_TIMER-specific function prototypes
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef __ARCH_ARM_MACH_OMAP2_WD_TIMER_H
+#define __ARCH_ARM_MACH_OMAP2_WD_TIMER_H
+
+#include <plat/omap_hwmod.h>
+
+extern int omap2_wd_timer_disable(struct omap_hwmod *oh);
+
+#endif
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] OMAP2+: wd_timer: disable on boot via hwmod postsetup mechanism
2010-11-16 10:25 [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes Paul Walmsley
2010-11-16 10:25 ` [PATCH 1/3] OMAP2+: wd_timer: separate watchdog disable code from the rest of mach-omap2/devices.c Paul Walmsley
@ 2010-11-16 10:25 ` Paul Walmsley
2010-11-16 10:25 ` [PATCH 3/3] OMAP: wd_timer: remove old, dead probing code Paul Walmsley
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Paul Walmsley @ 2010-11-16 10:25 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel
Cc: Kevin Hilman, Benoît Cousson, Charulatha Varadarajan
The OMAP watchdog timer IP blocks require a specific set of register
writes to occur before they will be disabled[1], even if the device
clocks appear to be disabled in the CM_*CLKEN registers. In the MPU
watchdog case, failure to execute this reset sequence will eventually
cause the watchdog to reset the OMAP unexpectedly.
Previously, the code to disable this watchdog was manually called from
mach-omap2/devices.c during device initialization. This causes the
watchdog to be unconditionally disabled for a portion of kernel
initialization. This should be controllable by the board-*.c files,
since some system integrators will want full watchdog coverage of
kernel initialization. Also, the watchdog disable code was not
connected to the hwmod shutdown code. This means that calling
omap_hwmod_shutdown() will not, in fact, disable the watchdog, and the
goal of omap_hwmod_shutdown() is to be able to shutdown any on-chip
OMAP device.
To resolve the latter problem, populate the pre_shutdown pointer in
the watchdog timer hwmod classes with a function that executes the
watchdog shutdown sequence. This allows the hwmod code to fully
disable the watchdog.
Then, to allow some board files to support watchdog coverage
throughout kernel initialization, add common code to mach-omap2/io.c
to cause the MPU watchdog to be disabled on boot unless a board file
specifically requests it to remain enabled. Board files can do this
by changing the watchdog timer hwmod's postsetup state between the
omap2_init_common_infrastructure() and omap2_init_common_devices()
function calls.
1. OMAP34xx Multimedia Device Silicon Revision 3.1.x Rev. ZH
[SWPU222H], Section 16.4.3.6, "Start/Stop Sequence for WDTs (Using
WDTi.WSPR Register)"
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Charulatha Varadarajan <charu@ti.com>
---
arch/arm/mach-omap2/devices.c | 15 ---------------
arch/arm/mach-omap2/io.c | 18 ++++++++++++++++++
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 6 ++++--
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 6 ++++--
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 6 ++++--
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 6 ++++--
arch/arm/mach-omap2/wd_timer.c | 16 +---------------
7 files changed, 35 insertions(+), 38 deletions(-)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index cd6a46a..b5cafd3 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -33,7 +33,6 @@
#include "mux.h"
#include "control.h"
-#include "wd_timer.h"
#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
@@ -952,26 +951,12 @@ static inline void omap_init_vout(void) {}
/*-------------------------------------------------------------------------*/
-static int omap2_disable_wdt(struct omap_hwmod *oh, void *unused)
-{
- return omap2_wd_timer_disable(oh);
-}
-
-static void __init omap_disable_wdt(void)
-{
- if (cpu_class_is_omap2())
- omap_hwmod_for_each_by_class("wd_timer",
- omap2_disable_wdt, NULL);
- return;
-}
-
static int __init omap2_init_devices(void)
{
/*
* please keep these calls, and their implementations above,
* in alphabetical order so they're easier to sort through.
*/
- omap_disable_wdt();
omap_hsmmc_reset();
omap_init_audio();
omap_init_camera();
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 39ab1ec..5b4f30e 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -341,6 +341,24 @@ void __init omap2_init_common_infrastructure(void)
#endif
omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state);
+ /*
+ * Set the default postsetup state for unusual modules (like
+ * MPU WDT).
+ *
+ * The postsetup_state is not actually used until
+ * omap_hwmod_late_init(), so boards that desire full watchdog
+ * coverage of kernel initialization can reprogram the
+ * postsetup_state between the calls to
+ * omap2_init_common_infra() and omap2_init_common_devices().
+ *
+ * XXX ideally we could detect whether the MPU WDT was currently
+ * enabled here and make this conditional
+ */
+ postsetup_state = _HWMOD_STATE_DISABLED;
+ omap_hwmod_for_each_by_class("wd_timer",
+ _set_hwmod_postsetup_state,
+ &postsetup_state);
+
/* The OPP tables have to be registered before a clk init */
omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps);
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index a1a3dd6..9a5f0d7 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -23,6 +23,7 @@
#include "cm-regbits-24xx.h"
#include "prm-regbits-24xx.h"
+#include "wd_timer.h"
/*
* OMAP2420 hardware module integration data
@@ -307,8 +308,9 @@ static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = {
};
static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = {
- .name = "wd_timer",
- .sysc = &omap2420_wd_timer_sysc,
+ .name = "wd_timer",
+ .sysc = &omap2420_wd_timer_sysc,
+ .pre_shutdown = &omap2_wd_timer_disable
};
/* wd_timer2 */
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index e4b8d7d..0b89f54 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -23,6 +23,7 @@
#include "prm-regbits-24xx.h"
#include "cm-regbits-24xx.h"
+#include "wd_timer.h"
/*
* OMAP2430 hardware module integration data
@@ -305,8 +306,9 @@ static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
};
static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
- .name = "wd_timer",
- .sysc = &omap2430_wd_timer_sysc,
+ .name = "wd_timer",
+ .sysc = &omap2430_wd_timer_sysc,
+ .pre_shutdown = &omap2_wd_timer_disable
};
/* wd_timer2 */
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index ed6bf4a..794ed33 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -26,6 +26,7 @@
#include "prm-regbits-34xx.h"
#include "cm-regbits-34xx.h"
+#include "wd_timer.h"
/*
* OMAP3xxx hardware module integration data
@@ -415,8 +416,9 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = {
};
static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
- .name = "wd_timer",
- .sysc = &omap3xxx_wd_timer_sysc,
+ .name = "wd_timer",
+ .sysc = &omap3xxx_wd_timer_sysc,
+ .pre_shutdown = &omap2_wd_timer_disable
};
/* wd_timer2 */
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 0d5c6eb..2ab1749 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -27,6 +27,7 @@
#include "cm.h"
#include "prm-regbits-44xx.h"
+#include "wd_timer.h"
/* Base offset for all OMAP4 interrupts external to MPUSS */
#define OMAP44XX_IRQ_GIC_START 32
@@ -716,8 +717,9 @@ static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
};
static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
- .name = "wd_timer",
- .sysc = &omap44xx_wd_timer_sysc,
+ .name = "wd_timer",
+ .sysc = &omap44xx_wd_timer_sysc,
+ .pre_shutdown = &omap2_wd_timer_disable
};
/* wd_timer2 */
diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c
index 06c256d..b0c4907 100644
--- a/arch/arm/mach-omap2/wd_timer.c
+++ b/arch/arm/mach-omap2/wd_timer.c
@@ -27,7 +27,6 @@
int omap2_wd_timer_disable(struct omap_hwmod *oh)
{
void __iomem *base;
- int ret;
if (!oh) {
pr_err("%s: Could not look up wdtimer_hwmod\n", __func__);
@@ -41,14 +40,6 @@ int omap2_wd_timer_disable(struct omap_hwmod *oh)
return -EINVAL;
}
- /* Enable the clocks before accessing the WDT registers */
- ret = omap_hwmod_enable(oh);
- if (ret) {
- pr_err("%s: Could not enable clocks for %s\n",
- oh->name, __func__);
- return ret;
- }
-
/* sequence required to disable watchdog */
__raw_writel(0xAAAA, base + OMAP_WDT_SPR);
while (__raw_readl(base + OMAP_WDT_WPS) & 0x10)
@@ -58,11 +49,6 @@ int omap2_wd_timer_disable(struct omap_hwmod *oh)
while (__raw_readl(base + OMAP_WDT_WPS) & 0x10)
cpu_relax();
- ret = omap_hwmod_idle(oh);
- if (ret)
- pr_err("%s: Could not disable clocks for %s\n",
- oh->name, __func__);
-
- return ret;
+ return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] OMAP: wd_timer: remove old, dead probing code
2010-11-16 10:25 [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes Paul Walmsley
2010-11-16 10:25 ` [PATCH 1/3] OMAP2+: wd_timer: separate watchdog disable code from the rest of mach-omap2/devices.c Paul Walmsley
2010-11-16 10:25 ` [PATCH 2/3] OMAP2+: wd_timer: disable on boot via hwmod postsetup mechanism Paul Walmsley
@ 2010-11-16 10:25 ` Paul Walmsley
2010-11-16 12:47 ` Sergei Shtylyov
2010-12-21 22:30 ` Paul Walmsley
2010-11-16 10:37 ` [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes Varadarajan, Charulatha
2010-11-16 16:48 ` Paul Walmsley
4 siblings, 2 replies; 10+ messages in thread
From: Paul Walmsley @ 2010-11-16 10:25 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel; +Cc: Charulatha Varadarajan
After commit f2ce62312650211f6cf665cd6dc519c334c4071e, watchdog
probing is handled by files in mach-omap1/ and mach-omap2/, and the
plat-omap/devices.c probing code is no longer used. Remove the dead
code in plat-omap/devices.c.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Charulatha Varadarajan <charu@ti.com>
---
arch/arm/plat-omap/devices.c | 38 --------------------------------------
1 files changed, 0 insertions(+), 38 deletions(-)
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 6f42a18..f2d6ecc 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -234,44 +234,6 @@ static inline void omap_init_uwire(void) {}
/*-------------------------------------------------------------------------*/
-#if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
-
-static struct resource wdt_resources[] = {
- {
- .flags = IORESOURCE_MEM,
- },
-};
-
-static struct platform_device omap_wdt_device = {
- .name = "omap_wdt",
- .id = -1,
- .num_resources = ARRAY_SIZE(wdt_resources),
- .resource = wdt_resources,
-};
-
-static void omap_init_wdt(void)
-{
- if (cpu_is_omap16xx())
- wdt_resources[0].start = 0xfffeb000;
- else if (cpu_is_omap2420())
- wdt_resources[0].start = 0x48022000; /* WDT2 */
- else if (cpu_is_omap2430())
- wdt_resources[0].start = 0x49016000; /* WDT2 */
- else if (cpu_is_omap343x())
- wdt_resources[0].start = 0x48314000; /* WDT2 */
- else if (cpu_is_omap44xx())
- wdt_resources[0].start = 0x4a314000;
- else
- return;
-
- wdt_resources[0].end = wdt_resources[0].start + 0x4f;
-
- (void) platform_device_register(&omap_wdt_device);
-}
-#else
-static inline void omap_init_wdt(void) {}
-#endif
-
#if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE)
static phys_addr_t omap_dsp_phys_mempool_base;
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes
2010-11-16 10:25 [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes Paul Walmsley
` (2 preceding siblings ...)
2010-11-16 10:25 ` [PATCH 3/3] OMAP: wd_timer: remove old, dead probing code Paul Walmsley
@ 2010-11-16 10:37 ` Varadarajan, Charulatha
2010-11-16 16:48 ` Paul Walmsley
4 siblings, 0 replies; 10+ messages in thread
From: Varadarajan, Charulatha @ 2010-11-16 10:37 UTC (permalink / raw)
To: Paul Walmsley; +Cc: linux-omap, linux-arm-kernel
Paul,
Thanks for the series.
On Tue, Nov 16, 2010 at 15:55, Paul Walmsley <paul@pwsan.com> wrote:
> Update the OMAP watchdog timer integration code to take advantage of
> the new hwmod upgrades added by the "OMAP2+: hwmod core upgrades for
> 2.6.38: first set" series, posted previously. So that series needs
> to be applied before these patches.
>
> Charu, it would be great if you could take a look at these.
It looks fine for me.
-V Charulatha
>
> Tested on an OMAP34xx BeagleBoard with omap2plus_defconfig.
>
>
> - Paul
>
> ---
>
> wdt_2.6.38
> text data bss dec hex filename
> 5709076 470560 5608992 11788628 b3e154 vmlinux.omap2plus_defconfig.orig
> 5708892 470560 5608992 11788444 b3e09c vmlinux.omap2plus_defconfig.patched
>
> Paul Walmsley (3):
> OMAP2+: wd_timer: separate watchdog disable code from the rest of mach-omap2/devices.c
> OMAP2+: wd_timer: disable on boot via hwmod postsetup mechanism
> OMAP: wd_timer: remove old, dead probing code
>
>
> arch/arm/mach-omap2/Makefile | 2 -
> arch/arm/mach-omap2/devices.c | 64 +---------------------------
> arch/arm/mach-omap2/io.c | 18 ++++++++
> arch/arm/mach-omap2/omap_hwmod_2420_data.c | 6 ++-
> arch/arm/mach-omap2/omap_hwmod_2430_data.c | 6 ++-
> arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 6 ++-
> arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 6 ++-
> arch/arm/mach-omap2/wd_timer.c | 54 ++++++++++++++++++++++++
> arch/arm/mach-omap2/wd_timer.h | 17 +++++++
> arch/arm/plat-omap/devices.c | 38 -----------------
> 10 files changed, 108 insertions(+), 109 deletions(-)
> create mode 100644 arch/arm/mach-omap2/wd_timer.c
> create mode 100644 arch/arm/mach-omap2/wd_timer.h
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] OMAP: wd_timer: remove old, dead probing code
2010-11-16 10:25 ` [PATCH 3/3] OMAP: wd_timer: remove old, dead probing code Paul Walmsley
@ 2010-11-16 12:47 ` Sergei Shtylyov
2010-11-16 16:29 ` Paul Walmsley
2010-12-21 22:30 ` Paul Walmsley
1 sibling, 1 reply; 10+ messages in thread
From: Sergei Shtylyov @ 2010-11-16 12:47 UTC (permalink / raw)
To: Paul Walmsley; +Cc: linux-omap, linux-arm-kernel, Charulatha Varadarajan
Hello.
On 16-11-2010 13:25, Paul Walmsley wrote:
> After commit f2ce62312650211f6cf665cd6dc519c334c4071e, watchdog
Linus has asked to also specify the commit summary in parens...
> probing is handled by files in mach-omap1/ and mach-omap2/, and the
> plat-omap/devices.c probing code is no longer used. Remove the dead
> code in plat-omap/devices.c.
> Signed-off-by: Paul Walmsley<paul@pwsan.com>
> Cc: Charulatha Varadarajan<charu@ti.com>
WBR, Sergei
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] OMAP: wd_timer: remove old, dead probing code
2010-11-16 12:47 ` Sergei Shtylyov
@ 2010-11-16 16:29 ` Paul Walmsley
0 siblings, 0 replies; 10+ messages in thread
From: Paul Walmsley @ 2010-11-16 16:29 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: linux-omap, linux-arm-kernel, Charulatha Varadarajan,
Paul Walmsley
On Tue, 16 Nov 2010, Sergei Shtylyov wrote:
> On 16-11-2010 13:25, Paul Walmsley wrote:
>
> > After commit f2ce62312650211f6cf665cd6dc519c334c4071e, watchdog
>
> Linus has asked to also specify the commit summary in parens...
Thanks, will do.
- Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes
2010-11-16 10:25 [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes Paul Walmsley
` (3 preceding siblings ...)
2010-11-16 10:37 ` [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes Varadarajan, Charulatha
@ 2010-11-16 16:48 ` Paul Walmsley
4 siblings, 0 replies; 10+ messages in thread
From: Paul Walmsley @ 2010-11-16 16:48 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel; +Cc: Charulatha V
On Tue, 16 Nov 2010, Paul Walmsley wrote:
> Update the OMAP watchdog timer integration code to take advantage of
> the new hwmod upgrades added by the "OMAP2+: hwmod core upgrades for
> 2.6.38: first set" series, posted previously. So that series needs
> to be applied before these patches.
>
> Charu, it would be great if you could take a look at these.
>
> Tested on an OMAP34xx BeagleBoard with omap2plus_defconfig.
And these patches are also available as 'wdt_2.6.38' from
git://git.pwsan.com/linux-2.6
- Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/3] OMAP2+: wd_timer: separate watchdog disable code from the rest of mach-omap2/devices.c
2010-11-16 10:25 ` [PATCH 1/3] OMAP2+: wd_timer: separate watchdog disable code from the rest of mach-omap2/devices.c Paul Walmsley
@ 2010-11-22 11:07 ` DebBarma, Tarun Kanti
0 siblings, 0 replies; 10+ messages in thread
From: DebBarma, Tarun Kanti @ 2010-11-22 11:07 UTC (permalink / raw)
To: Paul Walmsley, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: Varadarajan, Charulatha
Hi Paul,
<<snip>>
...
> +
> +int omap2_wd_timer_disable(struct omap_hwmod *oh)
> +{
> + void __iomem *base;
> + int ret;
> +
> + if (!oh) {
> + pr_err("%s: Could not look up wdtimer_hwmod\n", __func__);
> + return -EINVAL;
> + }
> +
Just a minor observation. I was wondering if we need this check because
omap_hwmod_for_each_by_class(...) would call this only for valid oh.
list_for_each_entry(temp_oh, &omap_hwmod_list, node) {
if (!strcmp(temp_oh->class->name, classname)) {
pr_debug("omap_hwmod: %s: %s: calling callback fn\n",
__func__, temp_oh->name);
ret = (*fn)(temp_oh, user);
--
Tarun
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] OMAP: wd_timer: remove old, dead probing code
2010-11-16 10:25 ` [PATCH 3/3] OMAP: wd_timer: remove old, dead probing code Paul Walmsley
2010-11-16 12:47 ` Sergei Shtylyov
@ 2010-12-21 22:30 ` Paul Walmsley
1 sibling, 0 replies; 10+ messages in thread
From: Paul Walmsley @ 2010-12-21 22:30 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel; +Cc: Charulatha Varadarajan
Hi,
On Tue, 16 Nov 2010, Paul Walmsley wrote:
> After commit f2ce62312650211f6cf665cd6dc519c334c4071e, watchdog
> probing is handled by files in mach-omap1/ and mach-omap2/, and the
> plat-omap/devices.c probing code is no longer used. Remove the dead
> code in plat-omap/devices.c.
>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Charulatha Varadarajan <charu@ti.com>
Dropping this patch since Tony merged Anand Gadiyar's fix for the same
issue dated 3 December 2010.
- Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-12-21 22:30 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-16 10:25 [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes Paul Walmsley
2010-11-16 10:25 ` [PATCH 1/3] OMAP2+: wd_timer: separate watchdog disable code from the rest of mach-omap2/devices.c Paul Walmsley
2010-11-22 11:07 ` DebBarma, Tarun Kanti
2010-11-16 10:25 ` [PATCH 2/3] OMAP2+: wd_timer: disable on boot via hwmod postsetup mechanism Paul Walmsley
2010-11-16 10:25 ` [PATCH 3/3] OMAP: wd_timer: remove old, dead probing code Paul Walmsley
2010-11-16 12:47 ` Sergei Shtylyov
2010-11-16 16:29 ` Paul Walmsley
2010-12-21 22:30 ` Paul Walmsley
2010-11-16 10:37 ` [PATCH 0/3] OMAP: wd_timer: update integration code to use new hwmod changes Varadarajan, Charulatha
2010-11-16 16:48 ` Paul Walmsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox