Merge branch 'master' of /home/sam/kernel/linux-2.6/
[pandora-kernel.git] / arch / ppc / platforms / ev64360.c
index b132456..90ed375 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/ev64360.c
- *
  * Board setup routines for the Marvell EV-64360-BP Evaluation Board.
  *
  * Author: Lee Nicks <allinux@gmail.com>
@@ -13,7 +11,6 @@
  * Free Software Foundation; either version 2 of the License, or (at your
  * option) any later version.
  */
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/kdev_t.h>
@@ -52,6 +49,8 @@ static u32            ev64360_bus_frequency;
 
 unsigned char  __res[sizeof(bd_t)];
 
+TODC_ALLOC();
+
 static int __init
 ev64360_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
 {
@@ -182,6 +181,9 @@ ev64360_setup_peripherals(void)
                 EV64360_RTC_WINDOW_BASE, EV64360_RTC_WINDOW_SIZE, 0);
        bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN);
 
+       TODC_INIT(TODC_TYPE_DS1501, 0, 0,
+               ioremap(EV64360_RTC_WINDOW_BASE, EV64360_RTC_WINDOW_SIZE), 8);
+
        mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN,
                 EV64360_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE, 0);
        bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN);
@@ -295,7 +297,7 @@ ev64360_fixup_eth_pdata(struct platform_device *pdev)
 }
 #endif
 
-static int __init
+static int
 ev64360_platform_notify(struct device *dev)
 {
        static struct {
@@ -496,6 +498,13 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ppc_md.power_off = ev64360_power_off;
        ppc_md.halt = ev64360_halt;
        ppc_md.find_end_of_memory = ev64360_find_end_of_memory;
+       ppc_md.init = NULL;
+
+       ppc_md.time_init = todc_time_init;
+       ppc_md.set_rtc_time = todc_set_rtc_time;
+       ppc_md.get_rtc_time = todc_get_rtc_time;
+       ppc_md.nvram_read_val = todc_direct_read_val;
+       ppc_md.nvram_write_val = todc_direct_write_val;
        ppc_md.calibrate_decr = ev64360_calibrate_decr;
 
 #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE)