2 * arch/ppc/platforms/lite5200.c
4 * Platform support file for the Freescale LITE5200 based on MPC52xx.
5 * A maximum of this file should be moved to syslib/mpc52xx_?????
6 * so that new platform based on MPC52xx need a minimal platform file
7 * ( avoid code duplication )
10 * Maintainer : Sylvain Munaut <tnt@246tNt.com>
12 * Based on the 2.4 code written by Kent Borg,
13 * Dale Farnsworth <dale.farnsworth@mvista.com> and
14 * Wolfgang Denk <wd@denx.de>
16 * Copyright 2004 Sylvain Munaut <tnt@246tNt.com>
17 * Copyright 2003 Motorola Inc.
18 * Copyright 2003 MontaVista Software Inc.
19 * Copyright 2003 DENX Software Engineering (wd@denx.de)
21 * This file is licensed under the terms of the GNU General Public License
22 * version 2. This program is licensed "as is" without any warranty of any
23 * kind, whether express or implied.
26 #include <linux/config.h>
27 #include <linux/initrd.h>
28 #include <linux/seq_file.h>
29 #include <linux/kdev_t.h>
30 #include <linux/root_dev.h>
31 #include <linux/console.h>
33 #include <asm/bootinfo.h>
36 #include <asm/mpc52xx.h>
39 /* Board data given by U-Boot */
41 EXPORT_SYMBOL(__res); /* For modules */
44 /* ======================================================================== */
45 /* OCP device definition */
46 /* For board/shared resources like PSCs */
47 /* ======================================================================== */
48 /* Be sure not to load conficting devices : e.g. loading the UART drivers for
49 * PSC1 and then also loading a AC97 for this same PSC.
50 * For details about how to create an entry, look in the doc of the concerned
51 * driver ( eg drivers/serial/mpc52xx_uart.c for the PSC in uart mode )
54 struct ocp_def board_ocp[] = {
56 .vendor = OCP_VENDOR_FREESCALE,
57 .function = OCP_FUNC_PSC_UART,
59 .paddr = MPC52xx_PSC1,
60 .irq = MPC52xx_PSC1_IRQ,
63 { /* Terminating entry */
64 .vendor = OCP_VENDOR_INVALID
69 /* ======================================================================== */
70 /* Platform specific code */
71 /* ======================================================================== */
74 icecube_show_cpuinfo(struct seq_file *m)
76 seq_printf(m, "machine\t\t: Freescale LITE5200\n");
81 icecube_setup_arch(void)
84 /* Add board OCP definitions */
85 mpc52xx_add_board_devices(board_ocp);
89 platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
90 unsigned long r6, unsigned long r7)
92 /* Generic MPC52xx platform initialization */
93 /* TODO Create one and move a max of stuff in it.
94 Put this init in the syslib */
96 struct bi_record *bootinfo = find_bootinfo();
99 parse_bootinfo(bootinfo);
101 /* Load the bd_t board info structure */
103 memcpy((void*)&__res,(void*)(r3+KERNELBASE),
106 #ifdef CONFIG_BLK_DEV_INITRD
107 /* Load the initrd */
109 initrd_start = r4 + KERNELBASE;
110 initrd_end = r5 + KERNELBASE;
114 /* Load the command line */
116 *(char *)(r7+KERNELBASE) = 0;
117 strcpy(cmd_line, (char *)(r6+KERNELBASE));
124 /* No ISA bus AFAIK */
128 /* Setup the ppc_md struct */
129 ppc_md.setup_arch = icecube_setup_arch;
130 ppc_md.show_cpuinfo = icecube_show_cpuinfo;
131 ppc_md.show_percpuinfo = NULL;
132 ppc_md.init_IRQ = mpc52xx_init_irq;
133 ppc_md.get_irq = mpc52xx_get_irq;
135 ppc_md.find_end_of_memory = mpc52xx_find_end_of_memory;
136 ppc_md.setup_io_mappings = mpc52xx_map_io;
138 ppc_md.restart = mpc52xx_restart;
139 ppc_md.power_off = mpc52xx_power_off;
140 ppc_md.halt = mpc52xx_halt;
142 /* No time keeper on the IceCube */
143 ppc_md.time_init = NULL;
144 ppc_md.get_rtc_time = NULL;
145 ppc_md.set_rtc_time = NULL;
147 ppc_md.calibrate_decr = mpc52xx_calibrate_decr;
148 #ifdef CONFIG_SERIAL_TEXT_DEBUG
149 ppc_md.progress = mpc52xx_progress;