2 * Xilinx ML300 evaluation board initialization
4 * Author: MontaVista Software, Inc.
7 * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the
8 * terms of the GNU General Public License version 2. This program is licensed
9 * "as is" without any warranty of any kind, whether express or implied.
12 #include <linux/init.h>
13 #include <linux/irq.h>
14 #include <linux/tty.h>
15 #include <linux/serial.h>
16 #include <linux/serial_core.h>
17 #include <linux/serial_8250.h>
18 #include <linux/serialP.h>
20 #include <asm/machdep.h>
22 #include <syslib/gen550.h>
23 #include <syslib/virtex_devices.h>
24 #include <platforms/4xx/xparameters/xparameters.h>
27 * As an overview of how the following functions (platform_init,
28 * ml300_map_io, ml300_setup_arch and ml300_init_IRQ) fit into the
29 * kernel startup procedure, here's a call tree:
31 * start_here arch/ppc/kernel/head_4xx.S
32 * early_init arch/ppc/kernel/setup.c
33 * machine_init arch/ppc/kernel/setup.c
34 * platform_init this file
35 * ppc4xx_init arch/ppc/syslib/ppc4xx_setup.c
38 * "setup some default ppc_md pointers"
39 * MMU_init arch/ppc/mm/init.c
40 * *ppc_md.setup_io_mappings == ml300_map_io this file
41 * ppc4xx_map_io arch/ppc/syslib/ppc4xx_setup.c
42 * start_kernel init/main.c
43 * setup_arch arch/ppc/kernel/setup.c
44 * #if defined(CONFIG_KGDB)
45 * *ppc_md.kgdb_map_scc() == gen550_kgdb_map_scc
47 * *ppc_md.setup_arch == ml300_setup_arch this file
48 * ppc4xx_setup_arch arch/ppc/syslib/ppc4xx_setup.c
49 * ppc4xx_find_bridges arch/ppc/syslib/ppc405_pci.c
50 * init_IRQ arch/ppc/kernel/irq.c
51 * *ppc_md.init_IRQ == ml300_init_IRQ this file
52 * ppc4xx_init_IRQ arch/ppc/syslib/ppc4xx_setup.c
53 * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c
56 const char* virtex_machine_name
= "ML300 Reference Design";
58 #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR)
59 static volatile unsigned *powerdown_base
=
60 (volatile unsigned *) XPAR_POWER_0_POWERDOWN_BASEADDR
;
63 xilinx_power_off(void)
66 out_be32(powerdown_base
, XPAR_POWER_0_POWERDOWN_VALUE
);
76 #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR)
77 powerdown_base
= ioremap((unsigned long) powerdown_base
,
78 XPAR_POWER_0_POWERDOWN_HIGHADDR
-
79 XPAR_POWER_0_POWERDOWN_BASEADDR
+ 1);
84 ml300_setup_arch(void)
86 virtex_early_serial_map();
87 ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */
89 /* Identify the system */
90 printk(KERN_INFO
"Xilinx ML300 Reference System (Virtex-II Pro)\n");
93 /* Called after board_setup_irq from ppc4xx_init_IRQ(). */
101 platform_init(unsigned long r3
, unsigned long r4
, unsigned long r5
,
102 unsigned long r6
, unsigned long r7
)
104 ppc4xx_init(r3
, r4
, r5
, r6
, r7
);
106 ppc_md
.setup_arch
= ml300_setup_arch
;
107 ppc_md
.setup_io_mappings
= ml300_map_io
;
108 ppc_md
.init_IRQ
= ml300_init_irq
;
110 #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR)
111 ppc_md
.power_off
= xilinx_power_off
;
115 ppc_md
.early_serial_map
= virtex_early_serial_map
;