mpc8xx watchdog timer (2.4.22-bk26)
PATCH 1/1 mpc8xx watchdog timer (2.4.22-bk26)
Hi,
the attached patch adds support for the internal watchdog of the mpc8xx series of CPUs including the watchdog user space interface. It has been tested on the D-Box2 board which requires this patch because the watchdog timer is enabled by its boot loader. It should work on other 8xx boards as well.
Any comments?
Regards,
Andreas
===== arch/ppc/kernel/Makefile 1.34 vs edited =====
arch/ppc/kernel/Makefile +3 -0
@@ -64,6 +64,9 @@ obj-$(CONFIG_PPC4xx_DMA) += ppc4xx_dma.o obj-$(CONFIG_PPC4xx_EDMA) += ppc4xx_sgdma.o obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o +ifdef CONFIG_8xx_WDT +obj-y += m8xx_wdt.o +endif ifeq ($(CONFIG_8xx),y) obj-$(CONFIG_PCI) += qspan_pci.o ifndef CONFIG_MATH_EMULATION
===== arch/ppc/kernel/m8xx_setup.c 1.22 vs edited =====
arch/ppc/kernel/m8xx_setup.c +8 -0
@@ -58,6 +58,7 @@extern unsigned long find_available_memory (void );extern void m8xx_cpm_reset (uint ); +extern void m8xx_wdt_handler_install (bd_t *bp);void __init m8xx_setup_arch (void )
@@ -184,6 +185,13 @@if (request_irq (DEC_INTERRUPT , timebase_interrupt,0 ,"tbint" ,NULL ) !=0 )panic ("Could not allocate timer IRQ!" ); + +#ifdef CONFIG_8xx_WDT +/* Install watchdog timer handler early because it might be +* already enabled by the bootloader +*/ +m8xx_wdt_handler_install (binfo); +#endif }/* The RTC on the MPC8xx is an internal register.
===== arch/ppc/kernel/ppc_ksyms.c 1.36 vs edited =====
arch/ppc/kernel/ppc_ksyms.c +6 -0
@@ -357,6 +357,12 @@EXPORT_SYMBOL (cpm_free_handler);EXPORT_SYMBOL (m8xx_cpm_hostalloc);EXPORT_SYMBOL (m8xx_cpm_dpalloc); +#ifdef CONFIG_8xx_WDT +extern int m8xx_wdt_get_timeout (void ); +extern void m8xx_wdt_reset (void ); +EXPORT_SYMBOL (m8xx_wdt_get_timeout); +EXPORT_SYMBOL (m8xx_wdt_reset); +#endif /* CONFIG_8xx_WDT */ #endif /* CONFIG_8xx */ /* Those should really be inline */
===== drivers/char/Config.in 1.58 vs edited =====
drivers/char/Config.in +1 -0
@@ -254,6 +254,7 @@ fi tristate ' ZF MachZ Watchdog' CONFIG_MACHZ_WDT dep_tristate ' AMD 766/768 TCO Timer/Watchdog' CONFIG_AMD7XX_TCO $CONFIG_EXPERIMENTAL + dep_tristate ' MPC8xx Watchdog Timer' CONFIG_8xx_WDT $CONFIG_8xx fi endmenu
===== drivers/char/Makefile 1.37 vs edited =====
drivers/char/Makefile +1 -0
@@ -305,6 +305,7 @@ obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o obj-$(CONFIG_AMD7XX_TCO) += amd7xx_tco.o +obj-$(CONFIG_8xx_WDT) += mpc8xx_wdt.o subdir-$(CONFIG_MWAVE) += mwave ifeq ($(CONFIG_MWAVE),y)
===== arch/ppc/kernel/m8xx_wdt.c 1.0 vs 1.1 =====
arch/ppc/kernel/m8xx_wdt.c new file +103 -0
103 lines not on this page · raw message
===== drivers/char/mpc8xx_wdt.c 1.0 vs 1.1 =====
drivers/char/mpc8xx_wdt.c new file +183 -0
183 lines not on this page · raw message