2 * arch/ppc/platforms/tqm8260_setup.c
4 * TQM8260 platform support
6 * Author: Allen Curtis <acurtis@onz.com>
7 * Derived from: m8260_setup.c by Dan Malek, MVista
9 * Copyright 2002 Ones and Zeros, Inc.
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
17 #include <linux/config.h>
18 #include <linux/seq_file.h>
20 #include <asm/immap_cpm2.h>
21 #include <asm/mpc8260.h>
22 #include <asm/machdep.h>
24 static void (*callback_setup_arch)(void);
26 extern unsigned char __res[sizeof(bd_t)];
28 extern void m8260_init(unsigned long r3, unsigned long r4,
29 unsigned long r5, unsigned long r6, unsigned long r7);
32 tqm8260_show_cpuinfo(struct seq_file *m)
34 bd_t *binfo = (bd_t *)__res;
36 seq_printf(m, "vendor\t\t: IN2 Systems\n"
37 "machine\t\t: TQM8260 PowerPC\n"
38 "mem size\t\t: 0x%08x\n"
45 tqm8260_set_rtc_time(unsigned long time)
47 ((cpm2_map_t *)CPM_MAP_ADDR)->im_sit.sit_tmcnt = time;
48 ((cpm2_map_t *)CPM_MAP_ADDR)->im_sit.sit_tmcntsc = 0x3;
54 tqm8260_get_rtc_time(void)
56 return ((cpm2_map_t *)CPM_MAP_ADDR)->im_sit.sit_tmcnt;
60 tqm8260_setup_arch(void)
62 printk("IN2 Systems TQM8260 port\n");
63 callback_setup_arch();
67 platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
68 unsigned long r6, unsigned long r7)
70 /* Generic 8260 platform initialization */
71 m8260_init(r3, r4, r5, r6, r7);
73 /* Anything special for this platform */
74 ppc_md.show_cpuinfo = tqm8260_show_cpuinfo;
75 ppc_md.set_rtc_time = tqm8260_set_rtc_time;
76 ppc_md.get_rtc_time = tqm8260_get_rtc_time;
78 callback_setup_arch = ppc_md.setup_arch;
79 ppc_md.setup_arch = tqm8260_setup_arch;