Commit 094f1275 authored by Dan Williams's avatar Dan Williams Committed by Russell King

[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: default avatarDan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 5455a51e
...@@ -4,6 +4,9 @@ menu "IOP32x Implementation Options" ...@@ -4,6 +4,9 @@ menu "IOP32x Implementation Options"
comment "IOP32x Platform Types" comment "IOP32x Platform Types"
config MACH_EP80219
bool
config MACH_GLANTANK config MACH_GLANTANK
bool "Enable support for the IO-Data GLAN Tank" bool "Enable support for the IO-Data GLAN Tank"
help help
...@@ -19,6 +22,7 @@ config ARCH_IQ80321 ...@@ -19,6 +22,7 @@ config ARCH_IQ80321
config ARCH_IQ31244 config ARCH_IQ31244
bool "Enable support for EP80219/IQ31244" bool "Enable support for EP80219/IQ31244"
select MACH_EP80219
help help
Say Y here if you want to run your kernel on the Intel EP80219 Say Y here if you want to run your kernel on the Intel EP80219
evaluation kit for the Intel 80219 processor (a IOP321 variant) evaluation kit for the Intel 80219 processor (a IOP321 variant)
......
...@@ -39,22 +39,35 @@ ...@@ -39,22 +39,35 @@
#include <asm/arch/time.h> #include <asm/arch/time.h>
/* /*
* The EP80219 and IQ31244 use the same machine ID. To find out * Until March of 2007 iq31244 platforms and ep80219 platforms shared the
* which of the two we're running on, we look at the processor ID. * same machine id, and the processor type was used to select board type.
* However this assumption breaks for an iq80219 board which is an iop219
* processor on an iq31244 board. The force_ep80219 flag has been added
* for old boot loaders using the iq31244 machine id for an ep80219 platform.
*/ */
static int force_ep80219;
static int is_80219(void) static int is_80219(void)
{ {
extern int processor_id; extern int processor_id;
return !!((processor_id & 0xffffffe0) == 0x69052e20); return !!((processor_id & 0xffffffe0) == 0x69052e20);
} }
static int is_ep80219(void)
{
if (machine_is_ep80219() || force_ep80219)
return 1;
else
return 0;
}
/* /*
* EP80219/IQ31244 timer tick configuration. * EP80219/IQ31244 timer tick configuration.
*/ */
static void __init iq31244_timer_init(void) static void __init iq31244_timer_init(void)
{ {
if (is_80219()) { if (is_ep80219()) {
/* 33.333 MHz crystal. */ /* 33.333 MHz crystal. */
iop_init_time(200000000); iop_init_time(200000000);
} else { } else {
...@@ -165,12 +178,18 @@ static struct hw_pci iq31244_pci __initdata = { ...@@ -165,12 +178,18 @@ static struct hw_pci iq31244_pci __initdata = {
static int __init iq31244_pci_init(void) static int __init iq31244_pci_init(void)
{ {
if (machine_is_iq31244()) { if (is_ep80219())
if (is_80219()) {
pci_common_init(&ep80219_pci); pci_common_init(&ep80219_pci);
} else { else if (machine_is_iq31244()) {
pci_common_init(&iq31244_pci); if (is_80219()) {
printk("note: iq31244 board type has been selected\n");
printk("note: to select ep80219 operation:\n");
printk("\t1/ specify \"force_ep80219\" on the kernel"
" command line\n");
printk("\t2/ update boot loader to pass"
" the ep80219 id: %d\n", MACH_TYPE_EP80219);
} }
pci_common_init(&iq31244_pci);
} }
return 0; return 0;
...@@ -277,10 +296,18 @@ static void __init iq31244_init_machine(void) ...@@ -277,10 +296,18 @@ static void __init iq31244_init_machine(void)
platform_device_register(&iq31244_flash_device); platform_device_register(&iq31244_flash_device);
platform_device_register(&iq31244_serial_device); platform_device_register(&iq31244_serial_device);
if (is_80219()) if (is_ep80219())
pm_power_off = ep80219_power_off; pm_power_off = ep80219_power_off;
} }
static int __init force_ep80219_setup(char *str)
{
force_ep80219 = 1;
return 1;
}
__setup("force_ep80219", force_ep80219_setup);
MACHINE_START(IQ31244, "Intel IQ31244") MACHINE_START(IQ31244, "Intel IQ31244")
/* Maintainer: Intel Corp. */ /* Maintainer: Intel Corp. */
.phys_io = IQ31244_UART, .phys_io = IQ31244_UART,
...@@ -291,3 +318,19 @@ MACHINE_START(IQ31244, "Intel IQ31244") ...@@ -291,3 +318,19 @@ MACHINE_START(IQ31244, "Intel IQ31244")
.timer = &iq31244_timer, .timer = &iq31244_timer,
.init_machine = iq31244_init_machine, .init_machine = iq31244_init_machine,
MACHINE_END MACHINE_END
/* There should have been an ep80219 machine identifier from the beginning.
* Boot roms older than March 2007 do not know the ep80219 machine id. Pass
* "force_ep80219" on the kernel command line, otherwise iq31244 operation
* will be selected.
*/
MACHINE_START(EP80219, "Intel EP80219")
/* Maintainer: Intel Corp. */
.phys_io = IQ31244_UART,
.io_pg_offst = ((IQ31244_UART) >> 18) & 0xfffc,
.boot_params = 0xa0000100,
.map_io = iq31244_map_io,
.init_irq = iop32x_init_irq,
.timer = &iq31244_timer,
.init_machine = iq31244_init_machine,
MACHINE_END
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment