aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/platforms/ev64360.c
diff options
context:
space:
mode:
authorLee Nicks <allinux@gmail.com>2005-11-07 03:58:10 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:53:26 -0500
commit2104da90a9aeef31ff6441d171a7d0492088f1d0 (patch)
tree97aceb3d7c14bd4db3e46c0abe8999b99971fa16 /arch/ppc/platforms/ev64360.c
parentd311b0d3d8fcc279132f7251704b23ec264a194f (diff)
[PATCH] ppc32: add watchdog & RTC support for Marvell EV64360BP board
This patch adds watchdog, RTC support for Marvell EV64360BP board. Signed-off-by: Lee Nicks <allinux@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc/platforms/ev64360.c')
-rw-r--r--arch/ppc/platforms/ev64360.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/ppc/platforms/ev64360.c b/arch/ppc/platforms/ev64360.c
index b1324564456e..b9d844f88c2b 100644
--- a/arch/ppc/platforms/ev64360.c
+++ b/arch/ppc/platforms/ev64360.c
@@ -52,6 +52,8 @@ static u32 ev64360_bus_frequency;
52 52
53unsigned char __res[sizeof(bd_t)]; 53unsigned char __res[sizeof(bd_t)];
54 54
55TODC_ALLOC();
56
55static int __init 57static int __init
56ev64360_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) 58ev64360_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
57{ 59{
@@ -182,6 +184,9 @@ ev64360_setup_peripherals(void)
182 EV64360_RTC_WINDOW_BASE, EV64360_RTC_WINDOW_SIZE, 0); 184 EV64360_RTC_WINDOW_BASE, EV64360_RTC_WINDOW_SIZE, 0);
183 bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN); 185 bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN);
184 186
187 TODC_INIT(TODC_TYPE_DS1501, 0, 0,
188 ioremap(EV64360_RTC_WINDOW_BASE, EV64360_RTC_WINDOW_SIZE), 8);
189
185 mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN, 190 mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN,
186 EV64360_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE, 0); 191 EV64360_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE, 0);
187 bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN); 192 bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN);
@@ -496,6 +501,13 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
496 ppc_md.power_off = ev64360_power_off; 501 ppc_md.power_off = ev64360_power_off;
497 ppc_md.halt = ev64360_halt; 502 ppc_md.halt = ev64360_halt;
498 ppc_md.find_end_of_memory = ev64360_find_end_of_memory; 503 ppc_md.find_end_of_memory = ev64360_find_end_of_memory;
504 ppc_md.init = NULL;
505
506 ppc_md.time_init = todc_time_init;
507 ppc_md.set_rtc_time = todc_set_rtc_time;
508 ppc_md.get_rtc_time = todc_get_rtc_time;
509 ppc_md.nvram_read_val = todc_direct_read_val;
510 ppc_md.nvram_write_val = todc_direct_write_val;
499 ppc_md.calibrate_decr = ev64360_calibrate_decr; 511 ppc_md.calibrate_decr = ev64360_calibrate_decr;
500 512
501#if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) 513#if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE)