diff options
Diffstat (limited to 'arch/ppc/platforms/4xx/xilinx_ml403.c')
-rw-r--r-- | arch/ppc/platforms/4xx/xilinx_ml403.c | 65 |
1 files changed, 4 insertions, 61 deletions
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.c b/arch/ppc/platforms/4xx/xilinx_ml403.c index c98e40a8799f..bc3ace3762e7 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml403.c +++ b/arch/ppc/platforms/4xx/xilinx_ml403.c | |||
@@ -1,11 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/xilinx_ml403.c | ||
3 | * | ||
4 | * Xilinx ML403 evaluation board initialization | 2 | * Xilinx ML403 evaluation board initialization |
5 | * | 3 | * |
6 | * Author: Grant Likely <grant.likely@secretlab.ca> | 4 | * Author: Grant Likely <grant.likely@secretlab.ca> |
7 | * | 5 | * |
8 | * 2005 (c) Secret Lab Technologies Ltd. | 6 | * 2005-2007 (c) Secret Lab Technologies Ltd. |
9 | * 2002-2004 (c) MontaVista Software, Inc. | 7 | * 2002-2004 (c) MontaVista Software, Inc. |
10 | * | 8 | * |
11 | * This file is licensed under the terms of the GNU General Public License | 9 | * This file is licensed under the terms of the GNU General Public License |
@@ -22,9 +20,9 @@ | |||
22 | #include <linux/serialP.h> | 20 | #include <linux/serialP.h> |
23 | #include <asm/io.h> | 21 | #include <asm/io.h> |
24 | #include <asm/machdep.h> | 22 | #include <asm/machdep.h> |
25 | #include <asm/ppc_sys.h> | ||
26 | 23 | ||
27 | #include <syslib/gen550.h> | 24 | #include <syslib/gen550.h> |
25 | #include <syslib/virtex_devices.h> | ||
28 | #include <platforms/4xx/xparameters/xparameters.h> | 26 | #include <platforms/4xx/xparameters/xparameters.h> |
29 | 27 | ||
30 | /* | 28 | /* |
@@ -57,25 +55,9 @@ | |||
57 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c | 55 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c |
58 | */ | 56 | */ |
59 | 57 | ||
60 | /* Board specifications structures */ | ||
61 | struct ppc_sys_spec *cur_ppc_sys_spec; | ||
62 | struct ppc_sys_spec ppc_sys_specs[] = { | ||
63 | { | ||
64 | /* Only one entry, always assume the same design */ | ||
65 | .ppc_sys_name = "Xilinx ML403 Reference Design", | ||
66 | .mask = 0x00000000, | ||
67 | .value = 0x00000000, | ||
68 | .num_devices = 1, | ||
69 | .device_list = (enum ppc_sys_devices[]) | ||
70 | { | ||
71 | VIRTEX_UART, | ||
72 | }, | ||
73 | }, | ||
74 | }; | ||
75 | const char* virtex_machine_name = "ML403 Reference Design"; | 58 | const char* virtex_machine_name = "ML403 Reference Design"; |
76 | 59 | ||
77 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | 60 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) |
78 | |||
79 | static volatile unsigned *powerdown_base = | 61 | static volatile unsigned *powerdown_base = |
80 | (volatile unsigned *) XPAR_POWER_0_POWERDOWN_BASEADDR; | 62 | (volatile unsigned *) XPAR_POWER_0_POWERDOWN_BASEADDR; |
81 | 63 | ||
@@ -100,47 +82,10 @@ ml403_map_io(void) | |||
100 | #endif | 82 | #endif |
101 | } | 83 | } |
102 | 84 | ||
103 | /* Early serial support functions */ | ||
104 | static void __init | ||
105 | ml403_early_serial_init(int num, struct plat_serial8250_port *pdata) | ||
106 | { | ||
107 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | ||
108 | struct uart_port serial_req; | ||
109 | |||
110 | memset(&serial_req, 0, sizeof(serial_req)); | ||
111 | serial_req.mapbase = pdata->mapbase; | ||
112 | serial_req.membase = pdata->membase; | ||
113 | serial_req.irq = pdata->irq; | ||
114 | serial_req.uartclk = pdata->uartclk; | ||
115 | serial_req.regshift = pdata->regshift; | ||
116 | serial_req.iotype = pdata->iotype; | ||
117 | serial_req.flags = pdata->flags; | ||
118 | gen550_init(num, &serial_req); | ||
119 | #endif | ||
120 | } | ||
121 | |||
122 | void __init | ||
123 | ml403_early_serial_map(void) | ||
124 | { | ||
125 | #ifdef CONFIG_SERIAL_8250 | ||
126 | struct plat_serial8250_port *pdata; | ||
127 | int i = 0; | ||
128 | |||
129 | pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(VIRTEX_UART); | ||
130 | while(pdata && pdata->flags) | ||
131 | { | ||
132 | pdata->membase = ioremap(pdata->mapbase, 0x100); | ||
133 | ml403_early_serial_init(i, pdata); | ||
134 | pdata++; | ||
135 | i++; | ||
136 | } | ||
137 | #endif /* CONFIG_SERIAL_8250 */ | ||
138 | } | ||
139 | |||
140 | void __init | 85 | void __init |
141 | ml403_setup_arch(void) | 86 | ml403_setup_arch(void) |
142 | { | 87 | { |
143 | ml403_early_serial_map(); | 88 | virtex_early_serial_map(); |
144 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | 89 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ |
145 | 90 | ||
146 | /* Identify the system */ | 91 | /* Identify the system */ |
@@ -160,8 +105,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
160 | { | 105 | { |
161 | ppc4xx_init(r3, r4, r5, r6, r7); | 106 | ppc4xx_init(r3, r4, r5, r6, r7); |
162 | 107 | ||
163 | identify_ppc_sys_by_id(mfspr(SPRN_PVR)); | ||
164 | |||
165 | ppc_md.setup_arch = ml403_setup_arch; | 108 | ppc_md.setup_arch = ml403_setup_arch; |
166 | ppc_md.setup_io_mappings = ml403_map_io; | 109 | ppc_md.setup_io_mappings = ml403_map_io; |
167 | ppc_md.init_IRQ = ml403_init_irq; | 110 | ppc_md.init_IRQ = ml403_init_irq; |
@@ -171,7 +114,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
171 | #endif | 114 | #endif |
172 | 115 | ||
173 | #ifdef CONFIG_KGDB | 116 | #ifdef CONFIG_KGDB |
174 | ppc_md.early_serial_map = ml403_early_serial_map; | 117 | ppc_md.early_serial_map = virtex_early_serial_map; |
175 | #endif | 118 | #endif |
176 | } | 119 | } |
177 | 120 | ||