MX25 watchdog
cover MX25 watchdog
This series adds support for the new watchdog driver on the i.MX25 PDK platform. A little fix to the watchdog driver itself is also added.
Baruch Siach (3):
mx25: add watchdog clock
mx25pdk: register watchdog device
imx2_wdt: fix section mismatch
arch/arm/mach-mx25/clock.c | 2 ++ arch/arm/mach-mx25/mach-mx25pdk.c | 1 + drivers/watchdog/imx2_wdt.c | 1 - 3 files changed, 3 insertions(+), 1 deletions(-)
PATCH 1/3 mx25: add watchdog clock
--- arch/arm/mach-mx25/clock.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-mx25/clock.c +2 -0
@@ -191,6 +191,7 @@ DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL);DEFINE_CLOCK (fec_clk,0 ,CCM_CGCR1 ,15 , get_rate_ipg,NULL , &fec_ahb_clk);DEFINE_CLOCK (dryice_clk,0 ,CCM_CGCR1 ,8 , get_rate_ipg,NULL ,NULL );DEFINE_CLOCK (lcdc_clk,0 ,CCM_CGCR1 ,29 , get_rate_lcdc,NULL , &lcdc_per_clk); +DEFINE_CLOCK (wdt_clk,0 ,CCM_CGCR1 ,19 , get_rate_ipg,NULL ,NULL );#define _REGISTER_CLOCK (d, n, c) \ { \
@@ -225,6 +226,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("fec.0", NULL, fec_clk) _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) + _REGISTER_CLOCK("imx-wdt.0", NULL, wdt_clk) };int __init mx25_clocks_init (void )
Signature · 1 line
1.7.1
PATCH 1/3 mx25: add watchdog clock
Hi Baruch,
Quoted 10 lines · Baruch Siach
Signed-off-by Baruch Siach <[email protected]>--- arch/arm/mach-mx25/clock.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/mach-mx25/clock.c +0
-0
arch/arm/mach-mx25/clock.c DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL); · line 194
Quoted 4 lines
arch/arm/mach-mx25/clock.c +1
-0@@ -191,6 +191,7 @@ DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL);DEFINE_CLOCK (fec_clk,0 ,CCM_CGCR1 ,15 , get_rate_ipg,NULL , &fec_ahb_clk);DEFINE_CLOCK (dryice_clk,0 ,CCM_CGCR1 ,8 , get_rate_ipg,NULL ,NULL );DEFINE_CLOCK (lcdc_clk,0 ,CCM_CGCR1 ,29 , get_rate_lcdc,NULL , &lcdc_per_clk); +DEFINE_CLOCK (wdt_clk,0 ,CCM_CGCR1 ,19 , get_rate_ipg,NULL ,NULL );
That is clk_gpt1 according to my RM (Rev 1)?
Quoted 14 lines
arch/arm/mach-mx25/clock.c +1
-0#define _REGISTER_CLOCK (d, n, c) \ { \@@ -225,6 +226,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("fec.0", NULL, fec_clk) _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) + _REGISTER_CLOCK("imx-wdt.0", NULL, wdt_clk) };int __init mx25_clocks_init (void )Signature · 1 line
1.7.1
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100610/869bbe0d/attachment.sig>
PATCH 1/3 mx25: add watchdog clock
Hi Wolfram,
Quoted 6 lines · Wolfram Sang
Quoted 5 lines · Baruch Siach
Signed-off-by Baruch Siach <[email protected]>--- arch/arm/mach-mx25/clock.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
Quoted 11 lines
arch/arm/mach-mx25/clock.c DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL); · line 194
Quoted 9 lines
arch/arm/mach-mx25/clock.c +1
-0@@ -191,6 +191,7 @@ DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL);DEFINE_CLOCK (fec_clk,0 ,CCM_CGCR1 ,15 , get_rate_ipg,NULL , &fec_ahb_clk);DEFINE_CLOCK (dryice_clk,0 ,CCM_CGCR1 ,8 , get_rate_ipg,NULL ,NULL );DEFINE_CLOCK (lcdc_clk,0 ,CCM_CGCR1 ,29 , get_rate_lcdc,NULL , &lcdc_per_clk); +DEFINE_CLOCK (wdt_clk,0 ,CCM_CGCR1 ,19 , get_rate_ipg,NULL ,NULL );That is
clk_gpt1according to my RM (Rev 1)?
Right. It should be CCM_CGCR2. I'll fix this.
Note that this bit is marked "Reserved" in the RM. But a look at the Freescale supplied BSP reveals the following line in crm_regs.h:
#define MXC_CCM_CGCR2_WDOG_OFFSET (51-32)
baruch
Quoted 13 lines
Quoted 13 lines
arch/arm/mach-mx25/clock.c +1
-0#define _REGISTER_CLOCK (d, n, c) \ { \@@ -225,6 +226,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("fec.0", NULL, fec_clk) _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) + _REGISTER_CLOCK("imx-wdt.0", NULL, wdt_clk) };int __init mx25_clocks_init (void )Signature · 1 line
1.7.1
Signature · 3 lines
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 1/3 mx25: add watchdog clock
Quoted 21 lines · Baruch Siach
Hi Wolfram,
Quoted 6 lines · Wolfram Sang
Quoted 5 lines · Baruch Siach
Signed-off-by Baruch Siach <[email protected]>--- arch/arm/mach-mx25/clock.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)Quoted 11 lines
arch/arm/mach-mx25/clock.c DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL); · line 194
Quoted 9 lines
arch/arm/mach-mx25/clock.c +1
-0@@ -191,6 +191,7 @@ DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL);DEFINE_CLOCK (fec_clk,0 ,CCM_CGCR1 ,15 , get_rate_ipg,NULL , &fec_ahb_clk);DEFINE_CLOCK (dryice_clk,0 ,CCM_CGCR1 ,8 , get_rate_ipg,NULL ,NULL );DEFINE_CLOCK (lcdc_clk,0 ,CCM_CGCR1 ,29 , get_rate_lcdc,NULL , &lcdc_per_clk); +DEFINE_CLOCK (wdt_clk,0 ,CCM_CGCR1 ,19 , get_rate_ipg,NULL ,NULL );That is
clk_gpt1according to my RM (Rev 1)?
Quoted 6 lines
Right. It should be
CCM_CGCR2. I'll fix this.Note that this bit is marked "Reserved" in the RM. But a look at the Freescale supplied BSP reveals the following line in
crm_regs.h:#define
MXC_CCM_CGCR2_WDOG_OFFSET(51-32)
OK. Please add this information also in a short comment above the clock definition.
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100610/819481d9/attachment.sig>
PATCH 1/3 mx25: add watchdog clock
Hi Wolfram,
Quoted 22 lines · Wolfram Sang
Quoted 21 lines · Baruch Siach
Quoted 6 lines · Wolfram Sang
Quoted 5 lines · Baruch Siach
Signed-off-by Baruch Siach <[email protected]>--- arch/arm/mach-mx25/clock.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)Quoted 11 lines
arch/arm/mach-mx25/clock.c DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL); · line 194
Quoted 9 lines
arch/arm/mach-mx25/clock.c +1
-0@@ -191,6 +191,7 @@ DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL);DEFINE_CLOCK (fec_clk,0 ,CCM_CGCR1 ,15 , get_rate_ipg,NULL , &fec_ahb_clk);DEFINE_CLOCK (dryice_clk,0 ,CCM_CGCR1 ,8 , get_rate_ipg,NULL ,NULL );DEFINE_CLOCK (lcdc_clk,0 ,CCM_CGCR1 ,29 , get_rate_lcdc,NULL , &lcdc_per_clk); +DEFINE_CLOCK (wdt_clk,0 ,CCM_CGCR1 ,19 , get_rate_ipg,NULL ,NULL );That is
clk_gpt1according to my RM (Rev 1)?Right. It should be
CCM_CGCR2. I'll fix this.
Quoted 7 lines
Quoted 4 lines
Note that this bit is marked "Reserved" in the RM. But a look at the Freescale supplied BSP reveals the following line in
crm_regs.h:#define
MXC_CCM_CGCR2_WDOG_OFFSET(51-32)OK. Please add this information also in a short comment above the clock definition.
There are 12 other IPG clock bit that are wrongly marked "Reserved" in the RM. Should we add a comment for each?
baruch
Signature · 3 lines
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 1/3 mx25: add watchdog clock
Quoted 27 lines · Baruch Siach
Hi Wolfram,
Quoted 25 lines · Wolfram Sang
Quoted 24 lines · Baruch Siach
Quoted 6 lines · Wolfram Sang
Quoted 5 lines · Baruch Siach
Signed-off-by Baruch Siach <[email protected]>--- arch/arm/mach-mx25/clock.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)Quoted 11 lines
arch/arm/mach-mx25/clock.c DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL); · line 194
Quoted 9 lines
arch/arm/mach-mx25/clock.c +1
-0@@ -191,6 +191,7 @@ DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL);DEFINE_CLOCK (fec_clk,0 ,CCM_CGCR1 ,15 , get_rate_ipg,NULL , &fec_ahb_clk);DEFINE_CLOCK (dryice_clk,0 ,CCM_CGCR1 ,8 , get_rate_ipg,NULL ,NULL );DEFINE_CLOCK (lcdc_clk,0 ,CCM_CGCR1 ,29 , get_rate_lcdc,NULL , &lcdc_per_clk); +DEFINE_CLOCK (wdt_clk,0 ,CCM_CGCR1 ,19 , get_rate_ipg,NULL ,NULL );That is
clk_gpt1according to my RM (Rev 1)?Right. It should be
CCM_CGCR2. I'll fix this.Note that this bit is marked "Reserved" in the RM. But a look at the Freescale supplied BSP reveals the following line in
crm_regs.h:
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
#define
MXC_CCM_CGCR2_WDOG_OFFSET(51-32)OK. Please add this information also in a short comment above the clock definition.
There are 12 other IPG clock bit that are wrongly marked "Reserved" in the RM. Should we add a comment for each?
Hmm, an introductory "global" comment should do IMO. Like "Some bits are marked reserved in the reference manual (v1), but have been used in the official BSPs, so we copied that". What do you think?
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100610/1619f567/attachment.sig>
PATCH 1/3 mx25: add watchdog clock
Quoted 33 lines · Wolfram Sang
Quoted 32 lines · Baruch Siach
Hi Wolfram,
Quoted 29 lines · Wolfram Sang
Quoted 19 lines · Baruch Siach
Quoted 6 lines · Wolfram Sang
Quoted 5 lines · Baruch Siach
Signed-off-by Baruch Siach <[email protected]>--- arch/arm/mach-mx25/clock.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)Quoted 11 lines
arch/arm/mach-mx25/clock.c DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL); · line 194
Quoted 9 lines
arch/arm/mach-mx25/clock.c +1
-0@@ -191,6 +191,7 @@ DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL);DEFINE_CLOCK (fec_clk,0 ,CCM_CGCR1 ,15 , get_rate_ipg,NULL , &fec_ahb_clk);DEFINE_CLOCK (dryice_clk,0 ,CCM_CGCR1 ,8 , get_rate_ipg,NULL ,NULL );DEFINE_CLOCK (lcdc_clk,0 ,CCM_CGCR1 ,29 , get_rate_lcdc,NULL , &lcdc_per_clk); +DEFINE_CLOCK (wdt_clk,0 ,CCM_CGCR1 ,19 , get_rate_ipg,NULL ,NULL );That is
clk_gpt1according to my RM (Rev 1)?Quoted 6 lines
Right. It should be
CCM_CGCR2. I'll fix this.Note that this bit is marked "Reserved" in the RM. But a look at the Freescale supplied BSP reveals the following line in
crm_regs.h:#define
MXC_CCM_CGCR2_WDOG_OFFSET(51-32)OK. Please add this information also in a short comment above the clock definition.
Quoted 6 lines
Quoted 2 lines
There are 12 other IPG clock bit that are wrongly marked "Reserved" in the RM. Should we add a comment for each?
Hmm, an introductory "global" comment should do IMO. Like "Some bits are marked reserved in the reference manual (v1), but have been used in the official BSPs, so we copied that". What do you think?
OK. But I think this should be in a separate patch, since this comment covers clocks already in use, and some others not yet in use.
I'll post a patch later today.
baruch
Signature · 3 lines
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 1/1 mx25: add watchdog clock
In reply to Wolfram Sang--- arch/arm/mach-mx25/clock.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-mx25/clock.c +2 -0
@@ -191,6 +191,7 @@ DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL);DEFINE_CLOCK (fec_clk,0 ,CCM_CGCR1 ,15 , get_rate_ipg,NULL , &fec_ahb_clk);DEFINE_CLOCK (dryice_clk,0 ,CCM_CGCR1 ,8 , get_rate_ipg,NULL ,NULL );DEFINE_CLOCK (lcdc_clk,0 ,CCM_CGCR1 ,29 , get_rate_lcdc,NULL , &lcdc_per_clk); +DEFINE_CLOCK (wdt_clk,0 ,CCM_CGCR2 ,19 , get_rate_ipg,NULL ,NULL );#define _REGISTER_CLOCK (d, n, c) \ { \
@@ -225,6 +226,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("fec.0", NULL, fec_clk) _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) + _REGISTER_CLOCK("imx-wdt.0", NULL, wdt_clk) };int __init mx25_clocks_init (void )
Signature · 1 line
1.7.1
PATCH 2/3 mx25pdk: register watchdog device
In reply to Baruch Siach--- arch/arm/mach-mx25/mach-mx25pdk.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-mx25/mach-mx25pdk.c +1 -0
@@ -147,6 +147,7 @@ static void __init mx25pdk_init(void)mxc_register_device (&mxc_nand_device, &mx25pdk_nand_board_info);mxc_register_device (&mx25_rtc_device,NULL );mxc_register_device (&mx25_fb_device, &mx25pdk_fb_pdata); +mxc_register_device (&mxc_wdt,NULL );mx25pdk_fec_reset ();mxc_register_device (&mx25_fec_device, &mx25_fec_pdata);
Signature · 1 line
1.7.1
PATCH 3/3 imx2_wdt: fix section mismatch
In reply to Baruch Siach--- drivers/watchdog/imx2_wdt.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/watchdog/imx2_wdt.c +0 -1
@@ -330,7 +330,6 @@ static void imx2_wdt_shutdown(struct platform_device *pdev) }static struct platform_driver imx2_wdt_driver = { - .probe = imx2_wdt_probe, .remove =__exit_p (imx2_wdt_remove), .shutdown = imx2_wdt_shutdown, .driver = {
Signature · 1 line
1.7.1
PATCH 3/3 imx2_wdt: fix section mismatch
Quoted 2 lines · Baruch Siach
Signed-off-by Baruch Siach <[email protected]>Cc Wim Van Sebroeck <[email protected]>
Thanks
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 3/3 imx2_wdt: fix section mismatch
In reply to Baruch Siachdrivers/watchdog/imx2_wdt.c static void imx2_wdt_shutdown(struct platform_device *pdev) · line 335
Quoted 12 lines
drivers/watchdog/imx2_wdt.c +0
-1@@ -330,7 +330,6 @@ static void imx2_wdt_shutdown(struct platform_device *pdev) }static struct platform_driver imx2_wdt_driver = { - .probe = imx2_wdt_probe, .remove =__exit_p (imx2_wdt_remove), .shutdown = imx2_wdt_shutdown, .driver = {
Added to linux-2.6-watchdog-next.
Kind regards,
Wim.
cover MX25 watchdog
In reply to Baruch SiachQuoted 8 lines · Baruch Siach
This series adds support for the new watchdog driver on the i.MX25 PDK platform. A little fix to the watchdog driver itself is also added.
Baruch Siach (3):
mx25: add watchdog clock
mx25pdk: register watchdog device
imx2_wdt: fix section mismatch
Quoted 4 lines
arch/arm/mach-mx25/clock.c | 2 ++ arch/arm/mach-mx25/mach-mx25pdk.c | 1 + drivers/watchdog/imx2_wdt.c | 1 - 3 files changed, 3 insertions(+), 1 deletions(-)
Assuming the fixed register in patch 1, whole series is:
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100610/f335e6bc/attachment.sig>