linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] WDT Driver for Book-E [1/2] Architecture specific part.
  2005-03-03 17:11     ` Matt Porter
@ 2005-03-04  9:38       ` Takeharu KATO
  2005-03-04 15:54         ` Kumar Gala
  0 siblings, 1 reply; 4+ messages in thread
From: Takeharu KATO @ 2005-03-04  9:38 UTC (permalink / raw)
  To: Matt Porter; +Cc: ppcembed

Matt and Kurmar:

I performed name-cleanup in the driver.

Moreover, I tested this driver with PowerPC405GPr(Sycamore)
in addition to PowerPC440GP(ebony)/MPC8555(MPC8555-CDS).

This driver consist of two patches as follows:

1) Architecture specific part(booke_wdt-arch.patch)
This is the architecture specific part of the driver.
It contains WDT exception handlers
and kernel command line processing
routines.

2) Device driver part(booke_wdt-drv.patch)
This is the core of this WDT
driver.

At first, I post the architecture specific part with this mail.

Please apply.

Regards,

Signed-off-by: Takeharu KATO <kato.takeharu@jp.fujitsu.com>

--- linux-2.6.11/arch/ppc/kernel/head_44x.S	2005-03-04 17:12:42.944450424 +0900
+++ linux-2.6.11-booke-wdt/arch/ppc/kernel/head_44x.S	2005-03-04 13:21:31.000000000 +0900
@@ -444,8 +444,12 @@ interrupt_base:
  	EXCEPTION(0x1010, FixedIntervalTimer, UnknownException, EXC_XFER_EE)

  	/* Watchdog Timer Interrupt */
-	/* TODO: Add watchdog support */
+#if defined(CONFIG_BOOKE_WDT)
+	CRITICAL_EXCEPTION(0x1020, WatchdogTimer, booke_wdt_exception)
+#else
  	CRITICAL_EXCEPTION(0x1020, WatchdogTimer, UnknownException)
+#endif  /*  CONFIG_BOOKE_WDT  */
+	

  	/* Data TLB Error Interrupt */
  	START_EXCEPTION(DataTLBError)
--- linux-2.6.11/arch/ppc/kernel/head_4xx.S	2005-03-04 17:16:48.089182760 +0900
+++ linux-2.6.11-booke-wdt/arch/ppc/kernel/head_4xx.S	2005-03-04 13:21:31.000000000 +0900
@@ -469,27 +469,23 @@ label:

  /* 0x1000 - Programmable Interval Timer (PIT) Exception */
  	START_EXCEPTION(0x1000, Decrementer)
-	NORMAL_EXCEPTION_PROLOG
-	lis	r0,TSR_PIS@h
-	mtspr	SPRN_TSR,r0		/* Clear the PIT exception */
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	EXC_XFER_LITE(0x1000, timer_interrupt)
-
+	b	DecrementerHandler
  #if 0
  /* NOTE:
- * FIT and WDT handlers are not implemented yet.
+ * FIT handler are not implemented yet.
   */

  /* 0x1010 - Fixed Interval Timer (FIT) Exception
  */
  	STND_EXCEPTION(0x1010,	FITException,		UnknownException)

-/* 0x1020 - Watchdog Timer (WDT) Exception
-*/
-
-	CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException)
  #endif

+  /* 0x1020 - Watchdog Timer (WDT) Exception
+  */
+	START_EXCEPTION(0x1020, WDTException)
+	b	WatchDogHandler
+
  /* 0x1100 - Data TLB Miss Exception
   * As the name implies, translation is not in the MMU, so search the
   * page tables and fix it.  The only purpose of this function is to
@@ -771,6 +767,14 @@ label:
  		(MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
  		NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)

+
+DecrementerHandler:
+	NORMAL_EXCEPTION_PROLOG
+	lis	r0,TSR_PIS@h
+	mtspr	SPRN_TSR,r0		/* Clear the PIT exception */
+	addi	r3,r1,STACK_FRAME_OVERHEAD
+	EXC_XFER_LITE(0x1000, timer_interrupt)
+
  /*
   * The other Data TLB exceptions bail out to this point
   * if they can't resolve the lightweight TLB fault.
@@ -844,6 +848,19 @@ finish_tlb_load:
  	rfi			/* Should sync shadow TLBs */
  	b	.		/* prevent prefetch past rfi */

+/*
+ * WatchDog Exception
+ */
+WatchDogHandler:
+	CRITICAL_EXCEPTION_PROLOG;
+	addi	r3,r1,STACK_FRAME_OVERHEAD;
+#if defined(CONFIG_BOOKE_WDT)
+	EXC_XFER_TEMPLATE(booke_wdt_exception, 0x1022, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)),NOCOPY, 
crit_transfer_to_handler, ret_from_crit_exc)
+
+#else
+	EXC_XFER_TEMPLATE(UnknownException, 0x1022, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)),NOCOPY, 
crit_transfer_to_handler, ret_from_crit_exc)
+#endif  /*  CONFIG_BOOKE_WDT  */
+
  /* extern void giveup_fpu(struct task_struct *prev)
   *
   * The PowerPC 4xx family of processors do not have an FPU, so this just
--- linux-2.6.11/arch/ppc/kernel/head_e500.S	2005-03-04 17:15:36.641044528 +0900
+++ linux-2.6.11-booke-wdt/arch/ppc/kernel/head_e500.S	2005-03-04 13:21:31.000000000 +0900
@@ -494,8 +494,11 @@ interrupt_base:
  	EXCEPTION(0x3100, FixedIntervalTimer, UnknownException, EXC_XFER_EE)

  	/* Watchdog Timer Interrupt */
-	/* TODO: Add watchdog support */
+#if defined(CONFIG_BOOKE_WDT)
+	CRITICAL_EXCEPTION(0x3200, WatchdogTimer, booke_wdt_exception)
+#else
  	CRITICAL_EXCEPTION(0x3200, WatchdogTimer, UnknownException)
+#endif  /*  CONFIG_BOOKE_WDT  */

  	/* Data TLB Error Interrupt */
  	START_EXCEPTION(DataTLBError)
--- linux-2.6.11/arch/ppc/platforms/85xx/mpc8540_ads.c	2005-03-04 17:13:11.927044400 +0900
+++ linux-2.6.11-booke-wdt/arch/ppc/platforms/85xx/mpc8540_ads.c	2005-03-04 13:21:31.000000000 +0900
@@ -54,6 +54,7 @@

  #include <syslib/ppc85xx_setup.h>

+
  /* ************************************************************************
   *
   * Setup the architecture
@@ -187,6 +188,14 @@ platform_init(unsigned long r3, unsigned
  		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
  	}

+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */
+
  	identify_ppc_sys_by_id(mfspr(SVR));

  	/* setup the PowerPC module struct */
--- linux-2.6.11/arch/ppc/platforms/85xx/mpc8560_ads.c	2005-03-04 17:17:54.566076736 +0900
+++ linux-2.6.11-booke-wdt/arch/ppc/platforms/85xx/mpc8560_ads.c	2005-03-04 13:21:31.000000000 +0900
@@ -197,6 +197,14 @@ platform_init(unsigned long r3, unsigned
  		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
  	}

+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */
+
  	identify_ppc_sys_by_id(mfspr(SVR));

  	/* setup the PowerPC module struct */
--- linux-2.6.11/arch/ppc/platforms/85xx/mpc85xx_cds_common.c	2005-03-04 17:16:27.056380232 +0900
+++ linux-2.6.11-booke-wdt/arch/ppc/platforms/85xx/mpc85xx_cds_common.c	2005-03-04 
13:21:31.000000000 +0900
@@ -437,6 +437,14 @@ platform_init(unsigned long r3, unsigned
                  strcpy(cmd_line, (char *) (r6 + KERNELBASE));
          }

+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */
+
  	identify_ppc_sys_by_id(mfspr(SVR));

          /* setup the PowerPC module struct */
--- linux-2.6.11/arch/ppc/platforms/85xx/sbc8560.c	2005-03-04 17:17:22.985877656 +0900
+++ linux-2.6.11-booke-wdt/arch/ppc/platforms/85xx/sbc8560.c	2005-03-04 13:21:31.000000000 +0900
@@ -198,6 +198,14 @@ platform_init(unsigned long r3, unsigned
  		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
  	}

+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */
+
  	identify_ppc_sys_by_id(mfspr(SVR));

  	/* setup the PowerPC module struct */
--- linux-2.6.11/arch/ppc/platforms/85xx/stx_gp3.c	2005-03-04 17:14:12.883777568 +0900
+++ linux-2.6.11-booke-wdt/arch/ppc/platforms/85xx/stx_gp3.c	2005-03-04 13:21:31.000000000 +0900
@@ -68,6 +68,7 @@ unsigned long isa_mem_base = 0;
  unsigned long pci_dram_offset = 0;
  #endif

+
  /* Internal interrupts are all Level Sensitive, and Positive Polarity */
  static u8 gp3_openpic_initsenses[] __initdata = {
  	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* Internal  0: L2 Cache */
@@ -357,6 +358,14 @@ platform_init(unsigned long r3, unsigned
  		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
  	}

+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */
+
  	identify_ppc_sys_by_id(mfspr(SVR));

  	/* setup the PowerPC module struct */
--- linux-2.6.11/arch/ppc/syslib/ppc4xx_setup.c	2005-03-04 17:10:56.867576560 +0900
+++ linux-2.6.11-booke-wdt/arch/ppc/syslib/ppc4xx_setup.c	2005-03-04 13:21:31.000000000 +0900
@@ -48,10 +48,6 @@
  extern void abort(void);
  extern void ppc4xx_find_bridges(void);

-extern void ppc4xx_wdt_heartbeat(void);
-extern int wdt_enable;
-extern unsigned long wdt_period;
-
  /* Global Variables */
  bd_t __res;

@@ -257,22 +253,14 @@ ppc4xx_init(unsigned long r3, unsigned l
  		*(char *) (r7 + KERNELBASE) = 0;
  		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
  	}
-#if defined(CONFIG_PPC405_WDT)
-/* Look for wdt= option on command line */
-	if (strstr(cmd_line, "wdt=")) {
-		int valid_wdt = 0;
-		char *p, *q;
-		for (q = cmd_line; (p = strstr(q, "wdt=")) != 0;) {
-			q = p + 4;
-			if (p > cmd_line && p[-1] != ' ')
-				continue;
-			wdt_period = simple_strtoul(q, &q, 0);
-			valid_wdt = 1;
-			++q;
-		}
-		wdt_enable = valid_wdt;
-	}
-#endif
+
+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */

  	/* Initialize machine-dependent vectors */

@@ -319,3 +307,5 @@ void platform_machine_check(struct pt_re
  #endif

  }
+
+

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] WDT Driver for Book-E [1/2] Architecture specific part.
  2005-03-04  9:38       ` [PATCH] WDT Driver for Book-E [1/2] Architecture specific part Takeharu KATO
@ 2005-03-04 15:54         ` Kumar Gala
  2005-03-08 17:08           ` Takeharu KATO
  0 siblings, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2005-03-04 15:54 UTC (permalink / raw)
  To: Takeharu KATO; +Cc: ppcembed

Out of interest how did you test this?  If I find some time I will test =20=

it on an e500 system, just havent given much thought on how to test the =20=

watchdog though.

- kumar

On Mar 4, 2005, at 3:38 AM, Takeharu KATO wrote:

> Matt and Kurmar:
>
> I performed name-cleanup in the driver.
>
> Moreover, I tested this driver with PowerPC405GPr(Sycamore)
> in addition to PowerPC440GP(ebony)/MPC8555(MPC8555-CDS).
>
> This driver consist of two patches as follows:
>
> 1) Architecture specific part(booke_wdt-arch.patch)
>  This is the architecture specific part of the driver.
>  It contains WDT exception handlers
>  and kernel command line processing
>  routines.
>
> 2) Device driver part(booke_wdt-drv.patch)
>  This is the core of this WDT
>  driver.
>
> At first, I post the architecture specific part with this mail.
>
> Please apply.
>
> Regards,
>
> Signed-off-by: Takeharu KATO <kato.takeharu@jp.fujitsu.com>
>
> --- linux-2.6.11/arch/ppc/kernel/head_44x.S=A0=A0=A0=A0 2005-03-04 =20
> 17:12:42.944450424 +0900
>  +++ linux-2.6.11-booke-wdt/arch/ppc/kernel/head_44x.S=A0=A0 =
2005-03-04 =20
> 13:21:31.000000000 +0900
>  @@ -444,8 +444,12 @@ interrupt_base:
> =A0 =A0=A0=A0=A0=A0 EXCEPTION(0x1010, FixedIntervalTimer, =
UnknownException, =20
> EXC_XFER_EE)
>
> =A0 =A0=A0=A0=A0=A0 /* Watchdog Timer Interrupt */
>  -=A0=A0=A0=A0=A0=A0 /* TODO: Add watchdog support */
>  +#if defined(CONFIG_BOOKE_WDT)
> +=A0=A0=A0=A0=A0=A0 CRITICAL_EXCEPTION(0x1020, WatchdogTimer, =
booke_wdt_exception)
> +#else
>  =A0 =A0=A0=A0=A0=A0 CRITICAL_EXCEPTION(0x1020, WatchdogTimer, =
UnknownException)
> +#endif=A0 /*=A0 CONFIG_BOOKE_WDT=A0 */
>  +=A0=A0=A0=A0=A0=A0
>
>  =A0 =A0=A0=A0=A0=A0 /* Data TLB Error Interrupt */
>  =A0 =A0=A0=A0=A0=A0 START_EXCEPTION(DataTLBError)
> --- linux-2.6.11/arch/ppc/kernel/head_4xx.S=A0=A0=A0=A0 2005-03-04 =20
> 17:16:48.089182760 +0900
>  +++ linux-2.6.11-booke-wdt/arch/ppc/kernel/head_4xx.S=A0=A0 =
2005-03-04 =20
> 13:21:31.000000000 +0900
>  @@ -469,27 +469,23 @@ label:
>
> =A0 /* 0x1000 - Programmable Interval Timer (PIT) Exception */
>  =A0 =A0=A0=A0=A0=A0 START_EXCEPTION(0x1000, Decrementer)
>  -=A0=A0=A0=A0=A0=A0 NORMAL_EXCEPTION_PROLOG
> -=A0=A0=A0=A0=A0=A0 lis=A0=A0=A0=A0 r0,TSR_PIS@h
> -=A0=A0=A0=A0=A0=A0 mtspr=A0=A0 SPRN_TSR,r0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=
=A0 /* Clear the PIT exception */
>  -=A0=A0=A0=A0=A0=A0 addi=A0=A0=A0 r3,r1,STACK_FRAME_OVERHEAD
> -=A0=A0=A0=A0=A0=A0 EXC_XFER_LITE(0x1000, timer_interrupt)
> -
>  +=A0=A0=A0=A0=A0=A0 b=A0=A0=A0=A0=A0=A0 DecrementerHandler
> =A0 #if 0
>  =A0 /* NOTE:
>  - * FIT and WDT handlers are not implemented yet.
>  + * FIT handler are not implemented yet.
>  =A0=A0 */
>
> =A0 /* 0x1010 - Fixed Interval Timer (FIT) Exception
>  =A0 */
>  =A0 =A0=A0=A0=A0=A0 STND_EXCEPTION(0x1010,=A0 FITException,=A0=A0 =
=A0=A0=A0=A0=A0=A0=A0 =20
> UnknownException)
>
> -/* 0x1020 - Watchdog Timer (WDT) Exception
>  -*/
>  -
>  -=A0=A0=A0=A0=A0=A0 CRITICAL_EXCEPTION(0x1020, WDTException, =
UnknownException)
> =A0 #endif
>
> +=A0 /* 0x1020 - Watchdog Timer (WDT) Exception
>  +=A0 */
>  +=A0=A0=A0=A0=A0=A0 START_EXCEPTION(0x1020, WDTException)
> +=A0=A0=A0=A0=A0=A0 b=A0=A0=A0=A0=A0=A0 WatchDogHandler
> +
>  =A0 /* 0x1100 - Data TLB Miss Exception
>  =A0=A0 * As the name implies, translation is not in the MMU, so =
search the
>  =A0=A0 * page tables and fix it.=A0 The only purpose of this function =
is to
>  @@ -771,6 +767,14 @@ label:
>  =A0 =A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 (MSR_KERNEL & =
~(MSR_ME|MSR_DE|MSR_CE)), \
>  =A0 =A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 NOCOPY, =
crit_transfer_to_handler, ret_from_crit_exc)
>
> +
>  +DecrementerHandler:
> +=A0=A0=A0=A0=A0=A0 NORMAL_EXCEPTION_PROLOG
> +=A0=A0=A0=A0=A0=A0 lis=A0=A0=A0=A0 r0,TSR_PIS@h
> +=A0=A0=A0=A0=A0=A0 mtspr=A0=A0 SPRN_TSR,r0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=
=A0 /* Clear the PIT exception */
>  +=A0=A0=A0=A0=A0=A0 addi=A0=A0=A0 r3,r1,STACK_FRAME_OVERHEAD
> +=A0=A0=A0=A0=A0=A0 EXC_XFER_LITE(0x1000, timer_interrupt)
> +
>  =A0 /*
>  =A0=A0 * The other Data TLB exceptions bail out to this point
>  =A0=A0 * if they can't resolve the lightweight TLB fault.
>  @@ -844,6 +848,19 @@ finish_tlb_load:
> =A0 =A0=A0=A0=A0=A0 rfi=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=
=A0=A0 /* Should sync shadow TLBs */
>  =A0 =A0=A0=A0=A0=A0 b=A0=A0=A0=A0=A0=A0 .=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=
=A0=A0=A0 /* prevent prefetch past rfi */
>
> +/*
>  + * WatchDog Exception
>  + */
>  +WatchDogHandler:
> +=A0=A0=A0=A0=A0=A0 CRITICAL_EXCEPTION_PROLOG;
> +=A0=A0=A0=A0=A0=A0 addi=A0=A0=A0 r3,r1,STACK_FRAME_OVERHEAD;
> +#if defined(CONFIG_BOOKE_WDT)
> +=A0=A0=A0=A0=A0=A0 EXC_XFER_TEMPLATE(booke_wdt_exception, 0x1022, =
(MSR_KERNEL & =20
> ~(MSR_ME|MSR_DE|MSR_CE)),NOCOPY,
>  crit_transfer_to_handler, ret_from_crit_exc)
> +
>  +#else
>  +=A0=A0=A0=A0=A0=A0 EXC_XFER_TEMPLATE(UnknownException, 0x1022, =
(MSR_KERNEL & =20
> ~(MSR_ME|MSR_DE|MSR_CE)),NOCOPY,
>  crit_transfer_to_handler, ret_from_crit_exc)
> +#endif=A0 /*=A0 CONFIG_BOOKE_WDT=A0 */
>  +
>  =A0 /* extern void giveup_fpu(struct task_struct *prev)
>  =A0=A0 *
>  =A0=A0 * The PowerPC 4xx family of processors do not have an FPU, so =
this =20
> just
>  --- linux-2.6.11/arch/ppc/kernel/head_e500.S=A0=A0=A0 2005-03-04 =20
> 17:15:36.641044528 +0900
>  +++ linux-2.6.11-booke-wdt/arch/ppc/kernel/head_e500.S=A0 2005-03-04 =20=

> 13:21:31.000000000 +0900
>  @@ -494,8 +494,11 @@ interrupt_base:
> =A0 =A0=A0=A0=A0=A0 EXCEPTION(0x3100, FixedIntervalTimer, =
UnknownException, =20
> EXC_XFER_EE)
>
> =A0 =A0=A0=A0=A0=A0 /* Watchdog Timer Interrupt */
>  -=A0=A0=A0=A0=A0=A0 /* TODO: Add watchdog support */
>  +#if defined(CONFIG_BOOKE_WDT)
> +=A0=A0=A0=A0=A0=A0 CRITICAL_EXCEPTION(0x3200, WatchdogTimer, =
booke_wdt_exception)
> +#else
>  =A0 =A0=A0=A0=A0=A0 CRITICAL_EXCEPTION(0x3200, WatchdogTimer, =
UnknownException)
> +#endif=A0 /*=A0 CONFIG_BOOKE_WDT=A0 */
>
> =A0 =A0=A0=A0=A0=A0 /* Data TLB Error Interrupt */
>  =A0 =A0=A0=A0=A0=A0 START_EXCEPTION(DataTLBError)
> --- linux-2.6.11/arch/ppc/platforms/85xx/mpc8540_ads.c=A0 2005-03-04 =20=

> 17:13:11.927044400 +0900
>  +++ =20
> linux-2.6.11-booke-wdt/arch/ppc/platforms/85xx/mpc8540_ads.c=A0=A0=A0=A0=
=A0=A0=A0 =20
> 2005-03-04 13:21:31.000000000 +0900
>  @@ -54,6 +54,7 @@
>
> =A0 #include <syslib/ppc85xx_setup.h>
>
> +
>  =A0 /* =20
> =
***********************************************************************=20=

> *
> =A0=A0 *
>  =A0=A0 * Setup the architecture
>  @@ -187,6 +188,14 @@ platform_init(unsigned long r3, unsigned
>  =A0 =A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 strcpy(cmd_line, (char *) =
(r6 + KERNELBASE));
> =A0 =A0=A0=A0=A0=A0 }
>
> +#ifdef CONFIG_BOOKE_WDT
> +=A0=A0=A0=A0 {
>  +=A0=A0=A0=A0=A0=A0 extern void booke_wdt_setup_options(char =
*cmd_line);
>  +
>  +=A0=A0=A0=A0=A0=A0 booke_wdt_setup_options(cmd_line);
> +=A0=A0=A0=A0 }
>  +#endif=A0 /*=A0 CONFIG_BOOKE_WDT=A0 */
>  +
>  =A0 =A0=A0=A0=A0=A0 identify_ppc_sys_by_id(mfspr(SVR));
>
> =A0 =A0=A0=A0=A0=A0 /* setup the PowerPC module struct */
>  --- linux-2.6.11/arch/ppc/platforms/85xx/mpc8560_ads.c=A0 2005-03-04 =20=

> 17:17:54.566076736 +0900
>  +++ =20
> linux-2.6.11-booke-wdt/arch/ppc/platforms/85xx/mpc8560_ads.c=A0=A0=A0=A0=
=A0=A0=A0 =20
> 2005-03-04 13:21:31.000000000 +0900
>  @@ -197,6 +197,14 @@ platform_init(unsigned long r3, unsigned
>  =A0 =A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 strcpy(cmd_line, (char *) =
(r6 + KERNELBASE));
> =A0 =A0=A0=A0=A0=A0 }
>
> +#ifdef CONFIG_BOOKE_WDT
> +=A0=A0=A0=A0 {
>  +=A0=A0=A0=A0=A0=A0 extern void booke_wdt_setup_options(char =
*cmd_line);
>  +
>  +=A0=A0=A0=A0=A0=A0 booke_wdt_setup_options(cmd_line);
> +=A0=A0=A0=A0 }
>  +#endif=A0 /*=A0 CONFIG_BOOKE_WDT=A0 */
>  +
>  =A0 =A0=A0=A0=A0=A0 identify_ppc_sys_by_id(mfspr(SVR));
>
> =A0 =A0=A0=A0=A0=A0 /* setup the PowerPC module struct */
>  --- linux-2.6.11/arch/ppc/platforms/85xx/mpc85xx_cds_common.c=A0=A0 =20=

> 2005-03-04 17:16:27.056380232 +0900
>  +++ =20
> linux-2.6.11-booke-wdt/arch/ppc/platforms/85xx/mpc85xx_cds_common.c =20=

> 2005-03-04
> 13:21:31.000000000 +0900
>  @@ -437,6 +437,14 @@ platform_init(unsigned long r3, unsigned
>  =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 strcpy(cmd_line, =
(char *) (r6 + KERNELBASE));
> =A0=A0=A0=A0=A0=A0=A0=A0=A0 }
>
> +#ifdef CONFIG_BOOKE_WDT
> +=A0=A0=A0=A0 {
>  +=A0=A0=A0=A0=A0=A0 extern void booke_wdt_setup_options(char =
*cmd_line);
>  +
>  +=A0=A0=A0=A0=A0=A0 booke_wdt_setup_options(cmd_line);
> +=A0=A0=A0=A0 }
>  +#endif=A0 /*=A0 CONFIG_BOOKE_WDT=A0 */
>  +
>  =A0 =A0=A0=A0=A0=A0 identify_ppc_sys_by_id(mfspr(SVR));
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0 /* setup the PowerPC module struct */
>  --- linux-2.6.11/arch/ppc/platforms/85xx/sbc8560.c=A0=A0=A0=A0=A0 =
2005-03-04 =20
> 17:17:22.985877656 +0900
>  +++ linux-2.6.11-booke-wdt/arch/ppc/platforms/85xx/sbc8560.c=A0=A0=A0 =
=20
> 2005-03-04 13:21:31.000000000 +0900
>  @@ -198,6 +198,14 @@ platform_init(unsigned long r3, unsigned
>  =A0 =A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 strcpy(cmd_line, (char *) =
(r6 + KERNELBASE));
> =A0 =A0=A0=A0=A0=A0 }
>
> +#ifdef CONFIG_BOOKE_WDT
> +=A0=A0=A0=A0 {
>  +=A0=A0=A0=A0=A0=A0 extern void booke_wdt_setup_options(char =
*cmd_line);
>  +
>  +=A0=A0=A0=A0=A0=A0 booke_wdt_setup_options(cmd_line);
> +=A0=A0=A0=A0 }
>  +#endif=A0 /*=A0 CONFIG_BOOKE_WDT=A0 */
>  +
>  =A0 =A0=A0=A0=A0=A0 identify_ppc_sys_by_id(mfspr(SVR));
>
> =A0 =A0=A0=A0=A0=A0 /* setup the PowerPC module struct */
>  --- linux-2.6.11/arch/ppc/platforms/85xx/stx_gp3.c=A0=A0=A0=A0=A0 =
2005-03-04 =20
> 17:14:12.883777568 +0900
>  +++ linux-2.6.11-booke-wdt/arch/ppc/platforms/85xx/stx_gp3.c=A0=A0=A0 =
=20
> 2005-03-04 13:21:31.000000000 +0900
>  @@ -68,6 +68,7 @@ unsigned long isa_mem_base =3D 0;
>  =A0 unsigned long pci_dram_offset =3D 0;
>  =A0 #endif
>
> +
>  =A0 /* Internal interrupts are all Level Sensitive, and Positive =20
> Polarity */
>  =A0 static u8 gp3_openpic_initsenses[] __initdata =3D {
>  =A0 =A0=A0=A0=A0=A0 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),=A0=A0=A0=
=A0=A0 /* Internal=A0 =20
> 0: L2 Cache */
>  @@ -357,6 +358,14 @@ platform_init(unsigned long r3, unsigned
>  =A0 =A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 strcpy(cmd_line, (char *) =
(r6 + KERNELBASE));
> =A0 =A0=A0=A0=A0=A0 }
>
> +#ifdef CONFIG_BOOKE_WDT
> +=A0=A0=A0=A0 {
>  +=A0=A0=A0=A0=A0=A0 extern void booke_wdt_setup_options(char =
*cmd_line);
>  +
>  +=A0=A0=A0=A0=A0=A0 booke_wdt_setup_options(cmd_line);
> +=A0=A0=A0=A0 }
>  +#endif=A0 /*=A0 CONFIG_BOOKE_WDT=A0 */
>  +
>  =A0 =A0=A0=A0=A0=A0 identify_ppc_sys_by_id(mfspr(SVR));
>
> =A0 =A0=A0=A0=A0=A0 /* setup the PowerPC module struct */
>  --- linux-2.6.11/arch/ppc/syslib/ppc4xx_setup.c 2005-03-04 =20
> 17:10:56.867576560 +0900
>  +++ linux-2.6.11-booke-wdt/arch/ppc/syslib/ppc4xx_setup.c=A0=A0=A0=A0=A0=
=A0 =20
> 2005-03-04 13:21:31.000000000 +0900
>  @@ -48,10 +48,6 @@
>  =A0 extern void abort(void);
>  =A0 extern void ppc4xx_find_bridges(void);
>
> -extern void ppc4xx_wdt_heartbeat(void);
> -extern int wdt_enable;
>  -extern unsigned long wdt_period;
>  -
>  =A0 /* Global Variables */
>  =A0 bd_t __res;
>
> @@ -257,22 +253,14 @@ ppc4xx_init(unsigned long r3, unsigned l
>  =A0 =A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 *(char *) (r7 + KERNELBASE) =
=3D 0;
>  =A0 =A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 strcpy(cmd_line, (char *) =
(r6 + KERNELBASE));
> =A0 =A0=A0=A0=A0=A0 }
>  -#if defined(CONFIG_PPC405_WDT)
> -/* Look for wdt=3D option on command line */
>  -=A0=A0=A0=A0=A0=A0 if (strstr(cmd_line, "wdt=3D")) {
>  -=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 int valid_wdt =3D 0;
>  -=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 char *p, *q;
>  -=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 for (q =3D cmd_line; (p =3D =
strstr(q, "wdt=3D")) !=3D 0;) {
> -=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 q =3D =
p + 4;
>  -=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 if (p =
> cmd_line && p[-1] !=3D ' ')
>  -=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =
=A0=A0=A0=A0=A0=A0=A0 continue;
> -=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =
wdt_period =3D simple_strtoul(q, &q, 0);
>  -=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =
valid_wdt =3D 1;
>  -=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 ++q;
>  -=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 }
>  -=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 wdt_enable =3D valid_wdt;
>  -=A0=A0=A0=A0=A0=A0 }
>  -#endif
>  +
>  +#ifdef CONFIG_BOOKE_WDT
> +=A0=A0=A0=A0 {
>  +=A0=A0=A0=A0=A0=A0 extern void booke_wdt_setup_options(char =
*cmd_line);
>  +
>  +=A0=A0=A0=A0=A0=A0 booke_wdt_setup_options(cmd_line);
> +=A0=A0=A0=A0 }
>  +#endif=A0 /*=A0 CONFIG_BOOKE_WDT=A0 */
>
> =A0 =A0=A0=A0=A0=A0 /* Initialize machine-dependent vectors */
>
> @@ -319,3 +307,5 @@ void platform_machine_check(struct pt_re
>  =A0 #endif
>
> =A0 }
>  +
>  +
>
>
> =20=

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] WDT Driver for Book-E [1/2] Architecture specific part.
  2005-03-04 15:54         ` Kumar Gala
@ 2005-03-08 17:08           ` Takeharu KATO
  0 siblings, 0 replies; 4+ messages in thread
From: Takeharu KATO @ 2005-03-08 17:08 UTC (permalink / raw)
  To: Kumar Gala; +Cc: ppcembed

Hi Kumar:

Kumar Gala wrote:
> Out of interest how did you test this?  If I find some time I will test  
> it on an e500 system, just havent given much thought on how to test the  
> watchdog though.
> 
> - kumar
> 
I tested the WDT driver with folowing test programs:

1) API test program which tests ioctl commands.
2) Test program which tests the behavior of the driver when
    system hung up due to making interrupt disabled(MSR[EE]=0 case).
    This test program is made as a kernel module.

Shall I send these programs off-list?

Regards,
-- 
Takeharu KATO

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] WDT Driver for Book-E [1/2]  Architecture specific part.
@ 2005-03-09  4:55 Takeharu KATO
  0 siblings, 0 replies; 4+ messages in thread
From: Takeharu KATO @ 2005-03-09  4:55 UTC (permalink / raw)
  To: ppcembed

Matt,Kurmar and Josh:

I performed minor cleanups which Josh pointed out.
It has been fine-tuned that it suits current linux-2.6.11(linus-tree).
(These changes has been performed on architecture specific part.).

I tested the driver on PowerPC440GP(ebony) again and I confirmed
that the driver work.

At first, I post the architecture specific part with this mail.

Please apply.

Regards,

Signed-off-by: Takeharu KATO <kato.takeharu@jp.fujitsu.com>

diff -Nupr linux-2.6.11/arch/ppc/kernel/head_44x.S linux-2.6.11-wdt/arch/ppc/kernel/head_44x.S
--- linux-2.6.11/arch/ppc/kernel/head_44x.S	2005-03-09 12:55:02.725778464 +0900
+++ linux-2.6.11-wdt/arch/ppc/kernel/head_44x.S	2005-03-09 13:07:38.355905224 +0900
@@ -444,8 +444,11 @@ interrupt_base:
 	EXCEPTION(0x1010, FixedIntervalTimer, UnknownException, EXC_XFER_EE)

 	/* Watchdog Timer Interrupt */
-	/* TODO: Add watchdog support */
+#if defined(CONFIG_BOOKE_WDT)
+	CRITICAL_EXCEPTION(0x1020, WatchdogTimer, booke_wdt_exception)
+#else
 	CRITICAL_EXCEPTION(0x1020, WatchdogTimer, UnknownException)
+#endif  /*  CONFIG_BOOKE_WDT  */

 	/* Data TLB Error Interrupt */
 	START_EXCEPTION(DataTLBError)
diff -Nupr linux-2.6.11/arch/ppc/kernel/head_4xx.S linux-2.6.11-wdt/arch/ppc/kernel/head_4xx.S
--- linux-2.6.11/arch/ppc/kernel/head_4xx.S	2005-03-09 12:58:03.942229376 +0900
+++ linux-2.6.11-wdt/arch/ppc/kernel/head_4xx.S	2005-03-09 13:07:38.357904920 +0900
@@ -469,27 +469,24 @@ label:

 /* 0x1000 - Programmable Interval Timer (PIT) Exception */
 	START_EXCEPTION(0x1000, Decrementer)
-	NORMAL_EXCEPTION_PROLOG
-	lis	r0,TSR_PIS@h
-	mtspr	SPRN_TSR,r0		/* Clear the PIT exception */
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	EXC_XFER_LITE(0x1000, timer_interrupt)
+	b    DecrementerHandler

 #if 0
 /* NOTE:
- * FIT and WDT handlers are not implemented yet.
+ * FIT handler is not implemented yet.
  */

 /* 0x1010 - Fixed Interval Timer (FIT) Exception
 */
 	STND_EXCEPTION(0x1010,	FITException,		UnknownException)

-/* 0x1020 - Watchdog Timer (WDT) Exception
-*/
-
-	CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException)
 #endif

+/* 0x1020 - Watchdog Timer (WDT) Exception
+ */
+	START_EXCEPTION(0x1020, WDTException)
+	b    WatchDogHandler
+
 /* 0x1100 - Data TLB Miss Exception
  * As the name implies, translation is not in the MMU, so search the
  * page tables and fix it.  The only purpose of this function is to
@@ -771,6 +768,13 @@ label:
 		(MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
 		NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)

+DecrementerHandler:
+	NORMAL_EXCEPTION_PROLOG
+	lis    r0,TSR_PIS@h
+	mtspr    SPRN_TSR,r0        /* Clear the PIT exception */
+	addi    r3,r1,STACK_FRAME_OVERHEAD
+	EXC_XFER_LITE(0x1000, timer_interrupt)
+
 /*
  * The other Data TLB exceptions bail out to this point
  * if they can't resolve the lightweight TLB fault.
@@ -843,6 +847,19 @@ finish_tlb_load:
 	PPC405_ERR77_SYNC
 	rfi			/* Should sync shadow TLBs */
 	b	.		/* prevent prefetch past rfi */
+/*
+ * WatchDog Exception
+ */
+WatchDogHandler:
+	CRITICAL_EXCEPTION_PROLOG;
+	addi    r3,r1,STACK_FRAME_OVERHEAD;
+#if defined(CONFIG_BOOKE_WDT)
+	EXC_XFER_TEMPLATE(booke_wdt_exception, 0x1022, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)),NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)
+
+#else
+	EXC_XFER_TEMPLATE(UnknownException, 0x1022, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)),NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)
+#endif  /*  CONFIG_BOOKE_WDT  */
+

 /* extern void giveup_fpu(struct task_struct *prev)
  *
diff -Nupr linux-2.6.11/arch/ppc/kernel/head_e500.S linux-2.6.11-wdt/arch/ppc/kernel/head_e500.S
--- linux-2.6.11/arch/ppc/kernel/head_e500.S	2005-03-09 12:57:14.058812808 +0900
+++ linux-2.6.11-wdt/arch/ppc/kernel/head_e500.S	2005-03-09 13:07:38.357904920 +0900
@@ -494,8 +494,11 @@ interrupt_base:
 	EXCEPTION(0x3100, FixedIntervalTimer, UnknownException, EXC_XFER_EE)

 	/* Watchdog Timer Interrupt */
-	/* TODO: Add watchdog support */
+#if defined(CONFIG_BOOKE_WDT)
+	CRITICAL_EXCEPTION(0x3200, WatchdogTimer, booke_wdt_exception)
+#else
 	CRITICAL_EXCEPTION(0x3200, WatchdogTimer, UnknownException)
+#endif  /*  CONFIG_BOOKE_WDT  */

 	/* Data TLB Error Interrupt */
 	START_EXCEPTION(DataTLBError)
diff -Nupr linux-2.6.11/arch/ppc/kernel/time.c linux-2.6.11-wdt/arch/ppc/kernel/time.c
diff -Nupr linux-2.6.11/arch/ppc/platforms/85xx/mpc8540_ads.c linux-2.6.11-wdt/arch/ppc/platforms/85xx/mpc8540_ads.c
--- linux-2.6.11/arch/ppc/platforms/85xx/mpc8540_ads.c	2005-03-09 12:55:23.468625072 +0900
+++ linux-2.6.11-wdt/arch/ppc/platforms/85xx/mpc8540_ads.c	2005-03-09 13:07:38.358904768 +0900
@@ -187,6 +187,14 @@ platform_init(unsigned long r3, unsigned
 		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
 	}

+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */
+
 	identify_ppc_sys_by_id(mfspr(SVR));

 	/* setup the PowerPC module struct */
diff -Nupr linux-2.6.11/arch/ppc/platforms/85xx/mpc8560_ads.c linux-2.6.11-wdt/arch/ppc/platforms/85xx/mpc8560_ads.c
--- linux-2.6.11/arch/ppc/platforms/85xx/mpc8560_ads.c	2005-03-09 12:59:02.157379328 +0900
+++ linux-2.6.11-wdt/arch/ppc/platforms/85xx/mpc8560_ads.c	2005-03-09 13:07:38.358904768 +0900
@@ -197,6 +197,14 @@ platform_init(unsigned long r3, unsigned
 		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
 	}

+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */
+
 	identify_ppc_sys_by_id(mfspr(SVR));

 	/* setup the PowerPC module struct */
diff -Nupr linux-2.6.11/arch/ppc/platforms/85xx/mpc85xx_cds_common.c linux-2.6.11-wdt/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
--- linux-2.6.11/arch/ppc/platforms/85xx/mpc85xx_cds_common.c	2005-03-09 12:57:51.908058848 +0900
+++ linux-2.6.11-wdt/arch/ppc/platforms/85xx/mpc85xx_cds_common.c	2005-03-09 13:07:38.359904616 +0900
@@ -448,6 +448,14 @@ platform_init(unsigned long r3, unsigned
 		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
 	}

+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */
+
 	identify_ppc_sys_by_id(mfspr(SVR));

 	/* setup the PowerPC module struct */
diff -Nupr linux-2.6.11/arch/ppc/platforms/85xx/mpc85xx_cds_common.c.orig linux-2.6.11-wdt/arch/ppc/platforms/85xx/mpc85xx_cds_common.c.orig
diff -Nupr linux-2.6.11/arch/ppc/platforms/85xx/sbc8560.c linux-2.6.11-wdt/arch/ppc/platforms/85xx/sbc8560.c
--- linux-2.6.11/arch/ppc/platforms/85xx/sbc8560.c	2005-03-09 12:58:37.742091016 +0900
+++ linux-2.6.11-wdt/arch/ppc/platforms/85xx/sbc8560.c	2005-03-09 13:07:38.360904464 +0900
@@ -198,6 +198,14 @@ platform_init(unsigned long r3, unsigned
 		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
 	}

+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */
+
 	identify_ppc_sys_by_id(mfspr(SVR));

 	/* setup the PowerPC module struct */
diff -Nupr linux-2.6.11/arch/ppc/platforms/85xx/stx_gp3.c linux-2.6.11-wdt/arch/ppc/platforms/85xx/stx_gp3.c
--- linux-2.6.11/arch/ppc/platforms/85xx/stx_gp3.c	2005-03-09 12:56:20.477958336 +0900
+++ linux-2.6.11-wdt/arch/ppc/platforms/85xx/stx_gp3.c	2005-03-09 13:07:38.361904312 +0900
@@ -349,6 +349,14 @@ platform_init(unsigned long r3, unsigned
 		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
 	}

+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */
+
 	identify_ppc_sys_by_id(mfspr(SVR));

 	/* setup the PowerPC module struct */
diff -Nupr linux-2.6.11/arch/ppc/platforms/85xx/stx_gp3.c.orig linux-2.6.11-wdt/arch/ppc/platforms/85xx/stx_gp3.c.orig
diff -Nupr linux-2.6.11/arch/ppc/syslib/open_pic.c linux-2.6.11-wdt/arch/ppc/syslib/open_pic.c
diff -Nupr linux-2.6.11/arch/ppc/syslib/ppc4xx_setup.c linux-2.6.11-wdt/arch/ppc/syslib/ppc4xx_setup.c
--- linux-2.6.11/arch/ppc/syslib/ppc4xx_setup.c	2005-03-09 12:54:06.589312504 +0900
+++ linux-2.6.11-wdt/arch/ppc/syslib/ppc4xx_setup.c	2005-03-09 13:07:38.361904312 +0900
@@ -48,10 +48,6 @@
 extern void abort(void);
 extern void ppc4xx_find_bridges(void);

-extern void ppc4xx_wdt_heartbeat(void);
-extern int wdt_enable;
-extern unsigned long wdt_period;
-
 /* Global Variables */
 bd_t __res;

@@ -257,22 +253,14 @@ ppc4xx_init(unsigned long r3, unsigned l
 		*(char *) (r7 + KERNELBASE) = 0;
 		strcpy(cmd_line, (char *) (r6 + KERNELBASE));
 	}
-#if defined(CONFIG_PPC405_WDT)
-/* Look for wdt= option on command line */
-	if (strstr(cmd_line, "wdt=")) {
-		int valid_wdt = 0;
-		char *p, *q;
-		for (q = cmd_line; (p = strstr(q, "wdt=")) != 0;) {
-			q = p + 4;
-			if (p > cmd_line && p[-1] != ' ')
-				continue;
-			wdt_period = simple_strtoul(q, &q, 0);
-			valid_wdt = 1;
-			++q;
-		}
-		wdt_enable = valid_wdt;
-	}
-#endif
+
+#ifdef CONFIG_BOOKE_WDT
+     {
+       extern void booke_wdt_setup_options(char *cmd_line);
+
+       booke_wdt_setup_options(cmd_line);
+     }
+#endif  /*  CONFIG_BOOKE_WDT  */

 	/* Initialize machine-dependent vectors */

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-09  4:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-09  4:55 [PATCH] WDT Driver for Book-E [1/2] Architecture specific part Takeharu KATO
  -- strict thread matches above, loose matches on Subject: below --
2005-03-03 12:13 PowerPC4xx Watchdog Takeharu KATO
2005-03-03 14:53 ` Kumar Gala
2005-03-03 15:21   ` Takeharu KATO
2005-03-03 17:11     ` Matt Porter
2005-03-04  9:38       ` [PATCH] WDT Driver for Book-E [1/2] Architecture specific part Takeharu KATO
2005-03-04 15:54         ` Kumar Gala
2005-03-08 17:08           ` Takeharu KATO

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).