aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2007-03-16 14:31:06 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-03-17 18:33:26 -0400
commit094f127588679591a871eb20b136f6b2f2796c98 (patch)
treee794048fc108b1527a4a0fac5ffb6d5136e6750f /arch/arm
parent5455a51e6f333d43e0b6b52d1712557475d8eb9d (diff)
[ARM] 4271/1: iop32x: fix ep80219 detection (support iq80219 platforms)
An iq80219 is a board with an iq31244 layout and an 80219 processor. It breaks the current assumption that all 80219 processors run on ep80219 platforms. This patch adds the "force_ep80219" option to the kernel to override boot loaders that have passed in the iq31244 id, and adds the MACHINE_START definition for ep80219. [ patch assumes that EP80219 has been added to mach-types ] Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-iop32x/Kconfig4
-rw-r--r--arch/arm/mach-iop32x/iq31244.c59
2 files changed, 55 insertions, 8 deletions
diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig
index c072d94070da..9dd49cff21ff 100644
--- a/arch/arm/mach-iop32x/Kconfig
+++ b/arch/arm/mach-iop32x/Kconfig
@@ -4,6 +4,9 @@ menu "IOP32x Implementation Options"
4 4
5comment "IOP32x Platform Types" 5comment "IOP32x Platform Types"
6 6
7config MACH_EP80219
8 bool
9
7config MACH_GLANTANK 10config MACH_GLANTANK
8 bool "Enable support for the IO-Data GLAN Tank" 11 bool "Enable support for the IO-Data GLAN Tank"
9 help 12 help
@@ -19,6 +22,7 @@ config ARCH_IQ80321
19 22
20config ARCH_IQ31244 23config ARCH_IQ31244
21 bool "Enable support for EP80219/IQ31244" 24 bool "Enable support for EP80219/IQ31244"
25 select MACH_EP80219
22 help 26 help
23 Say Y here if you want to run your kernel on the Intel EP80219 27 Say Y here if you want to run your kernel on the Intel EP80219
24 evaluation kit for the Intel 80219 processor (a IOP321 variant) 28 evaluation kit for the Intel 80219 processor (a IOP321 variant)
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index 571ac35bc2c7..60e74309a458 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -39,22 +39,35 @@
39#include <asm/arch/time.h> 39#include <asm/arch/time.h>
40 40
41/* 41/*
42 * The EP80219 and IQ31244 use the same machine ID. To find out 42 * Until March of 2007 iq31244 platforms and ep80219 platforms shared the
43 * which of the two we're running on, we look at the processor ID. 43 * same machine id, and the processor type was used to select board type.
44 * However this assumption breaks for an iq80219 board which is an iop219
45 * processor on an iq31244 board. The force_ep80219 flag has been added
46 * for old boot loaders using the iq31244 machine id for an ep80219 platform.
44 */ 47 */
48static int force_ep80219;
49
45static int is_80219(void) 50static int is_80219(void)
46{ 51{
47 extern int processor_id; 52 extern int processor_id;
48 return !!((processor_id & 0xffffffe0) == 0x69052e20); 53 return !!((processor_id & 0xffffffe0) == 0x69052e20);
49} 54}
50 55
56static int is_ep80219(void)
57{
58 if (machine_is_ep80219() || force_ep80219)
59 return 1;
60 else
61 return 0;
62}
63
51 64
52/* 65/*
53 * EP80219/IQ31244 timer tick configuration. 66 * EP80219/IQ31244 timer tick configuration.
54 */ 67 */
55static void __init iq31244_timer_init(void) 68static void __init iq31244_timer_init(void)
56{ 69{
57 if (is_80219()) { 70 if (is_ep80219()) {
58 /* 33.333 MHz crystal. */ 71 /* 33.333 MHz crystal. */
59 iop_init_time(200000000); 72 iop_init_time(200000000);
60 } else { 73 } else {
@@ -165,12 +178,18 @@ static struct hw_pci iq31244_pci __initdata = {
165 178
166static int __init iq31244_pci_init(void) 179static int __init iq31244_pci_init(void)
167{ 180{
168 if (machine_is_iq31244()) { 181 if (is_ep80219())
182 pci_common_init(&ep80219_pci);
183 else if (machine_is_iq31244()) {
169 if (is_80219()) { 184 if (is_80219()) {
170 pci_common_init(&ep80219_pci); 185 printk("note: iq31244 board type has been selected\n");
171 } else { 186 printk("note: to select ep80219 operation:\n");
172 pci_common_init(&iq31244_pci); 187 printk("\t1/ specify \"force_ep80219\" on the kernel"
188 " command line\n");
189 printk("\t2/ update boot loader to pass"
190 " the ep80219 id: %d\n", MACH_TYPE_EP80219);
173 } 191 }
192 pci_common_init(&iq31244_pci);
174 } 193 }
175 194
176 return 0; 195 return 0;
@@ -277,10 +296,18 @@ static void __init iq31244_init_machine(void)
277 platform_device_register(&iq31244_flash_device); 296 platform_device_register(&iq31244_flash_device);
278 platform_device_register(&iq31244_serial_device); 297 platform_device_register(&iq31244_serial_device);
279 298
280 if (is_80219()) 299 if (is_ep80219())
281 pm_power_off = ep80219_power_off; 300 pm_power_off = ep80219_power_off;
282} 301}
283 302
303static int __init force_ep80219_setup(char *str)
304{
305 force_ep80219 = 1;
306 return 1;
307}
308
309__setup("force_ep80219", force_ep80219_setup);
310
284MACHINE_START(IQ31244, "Intel IQ31244") 311MACHINE_START(IQ31244, "Intel IQ31244")
285 /* Maintainer: Intel Corp. */ 312 /* Maintainer: Intel Corp. */
286 .phys_io = IQ31244_UART, 313 .phys_io = IQ31244_UART,
@@ -291,3 +318,19 @@ MACHINE_START(IQ31244, "Intel IQ31244")
291 .timer = &iq31244_timer, 318 .timer = &iq31244_timer,
292 .init_machine = iq31244_init_machine, 319 .init_machine = iq31244_init_machine,
293MACHINE_END 320MACHINE_END
321
322/* There should have been an ep80219 machine identifier from the beginning.
323 * Boot roms older than March 2007 do not know the ep80219 machine id. Pass
324 * "force_ep80219" on the kernel command line, otherwise iq31244 operation
325 * will be selected.
326 */
327MACHINE_START(EP80219, "Intel EP80219")
328 /* Maintainer: Intel Corp. */
329 .phys_io = IQ31244_UART,
330 .io_pg_offst = ((IQ31244_UART) >> 18) & 0xfffc,
331 .boot_params = 0xa0000100,
332 .map_io = iq31244_map_io,
333 .init_irq = iop32x_init_irq,
334 .timer = &iq31244_timer,
335 .init_machine = iq31244_init_machine,
336MACHINE_END