2 * arch/ppc/platforms/sbc82xx.c
4 * SBC82XX platform support
6 * Author: Guy Streeter <streeter@redhat.com>
8 * Derived from: est8260_setup.c by Allen Curtis, ONZ
10 * Copyright 2004 Red Hat, Inc.
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
18 #include <linux/config.h>
19 #include <linux/seq_file.h>
20 #include <linux/stddef.h>
22 #include <asm/mpc8260.h>
23 #include <asm/machdep.h>
26 #include <asm/immap_8260.h>
28 static void (*callback_setup_arch)(void);
30 extern unsigned char __res[sizeof(bd_t)];
32 extern void m8260_init(unsigned long r3, unsigned long r4,
33 unsigned long r5, unsigned long r6, unsigned long r7);
35 extern void (*late_time_init)(void);
38 sbc82xx_show_cpuinfo(struct seq_file *m)
40 bd_t *binfo = (bd_t *)__res;
42 seq_printf(m, "vendor\t\t: Wind River\n"
43 "machine\t\t: SBC PowerQUICC II\n"
45 "mem size\t\t: 0x%08lx\n"
46 "console baud\t\t: %ld\n"
54 sbc82xx_setup_arch(void)
56 printk("SBC PowerQUICC II Port\n");
57 callback_setup_arch();
63 * Timer init happens before mem_init but after paging init, so we cannot
64 * directly use ioremap() at that time.
65 * late_time_init() is call after paging init.
68 static void sbc82xx_time_init(void)
70 volatile memctl8260_t *mc = &immr->im_memctl;
71 TODC_INIT(TODC_TYPE_MK48T59, 0, 0, SBC82xx_TODC_NVRAM_ADDR, 0);
73 /* Set up CS11 for RTC chip */
75 mc->memc_or11=0xffff0836;
76 mc->memc_br11=0x80000801;
78 todc_info->nvram_data =
79 (unsigned int)ioremap(todc_info->nvram_data, 0x2000);
80 BUG_ON(!todc_info->nvram_data);
81 ppc_md.get_rtc_time = todc_get_rtc_time;
82 ppc_md.set_rtc_time = todc_set_rtc_time;
83 ppc_md.nvram_read_val = todc_direct_read_val;
84 ppc_md.nvram_write_val = todc_direct_write_val;
87 #endif /* CONFIG_GEN_RTC */
90 platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
91 unsigned long r6, unsigned long r7)
93 /* Generic 8260 platform initialization */
94 m8260_init(r3, r4, r5, r6, r7);
96 /* u-boot may be using one of the FCC Ethernet devices.
97 Use the MAC address to the SCC. */
98 __res[offsetof(bd_t, bi_enetaddr[5])] &= ~3;
100 /* Anything special for this platform */
101 ppc_md.show_cpuinfo = sbc82xx_show_cpuinfo;
103 callback_setup_arch = ppc_md.setup_arch;
104 ppc_md.setup_arch = sbc82xx_setup_arch;
105 #ifdef CONFIG_GEN_RTC
106 ppc_md.time_init = NULL;
107 ppc_md.get_rtc_time = NULL;
108 ppc_md.set_rtc_time = NULL;
109 ppc_md.nvram_read_val = NULL;
110 ppc_md.nvram_write_val = NULL;
111 late_time_init = sbc82xx_time_init;
112 #endif /* CONFIG_GEN_RTC */