2 * arch/arm/mach-ixp4xx/ixdp425-setup.c
4 * IXDP425/IXCDP1100 board-setup
6 * Copyright (C) 2003-2005 MontaVista Software, Inc.
8 * Author: Deepak Saxena <dsaxena@plexity.net>
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/device.h>
14 #include <linux/serial.h>
15 #include <linux/tty.h>
16 #include <linux/serial_8250.h>
17 #include <linux/slab.h>
19 #include <asm/types.h>
20 #include <asm/setup.h>
21 #include <asm/memory.h>
22 #include <asm/hardware.h>
23 #include <asm/mach-types.h>
25 #include <asm/mach/arch.h>
26 #include <asm/mach/flash.h>
28 static struct flash_platform_data ixdp425_flash_data
= {
29 .map_name
= "cfi_probe",
33 static struct resource ixdp425_flash_resource
= {
34 .flags
= IORESOURCE_MEM
,
37 static struct platform_device ixdp425_flash
= {
38 .name
= "IXP4XX-Flash",
41 .platform_data
= &ixdp425_flash_data
,
44 .resource
= &ixdp425_flash_resource
,
47 static struct ixp4xx_i2c_pins ixdp425_i2c_gpio_pins
= {
48 .sda_pin
= IXDP425_SDA_PIN
,
49 .scl_pin
= IXDP425_SCL_PIN
,
52 static struct platform_device ixdp425_i2c_controller
= {
56 .platform_data
= &ixdp425_i2c_gpio_pins
,
61 static struct resource ixdp425_uart_resources
[] = {
63 .start
= IXP4XX_UART1_BASE_PHYS
,
64 .end
= IXP4XX_UART1_BASE_PHYS
+ 0x0fff,
65 .flags
= IORESOURCE_MEM
68 .start
= IXP4XX_UART2_BASE_PHYS
,
69 .end
= IXP4XX_UART2_BASE_PHYS
+ 0x0fff,
70 .flags
= IORESOURCE_MEM
74 static struct plat_serial8250_port ixdp425_uart_data
[] = {
76 .mapbase
= IXP4XX_UART1_BASE_PHYS
,
77 .membase
= (char *)IXP4XX_UART1_BASE_VIRT
+ REG_OFFSET
,
78 .irq
= IRQ_IXP4XX_UART1
,
79 .flags
= UPF_BOOT_AUTOCONF
| UPF_SKIP_TEST
,
82 .uartclk
= IXP4XX_UART_XTAL
,
85 .mapbase
= IXP4XX_UART2_BASE_PHYS
,
86 .membase
= (char *)IXP4XX_UART2_BASE_VIRT
+ REG_OFFSET
,
87 .irq
= IRQ_IXP4XX_UART2
,
88 .flags
= UPF_BOOT_AUTOCONF
| UPF_SKIP_TEST
,
91 .uartclk
= IXP4XX_UART_XTAL
,
96 static struct platform_device ixdp425_uart
= {
98 .id
= PLAT8250_DEV_PLATFORM
,
99 .dev
.platform_data
= ixdp425_uart_data
,
101 .resource
= ixdp425_uart_resources
104 static struct platform_device
*ixdp425_devices
[] __initdata
= {
105 &ixdp425_i2c_controller
,
110 static void __init
ixdp425_init(void)
114 ixdp425_flash_resource
.start
= IXP4XX_EXP_BUS_BASE(0);
115 ixdp425_flash_resource
.end
=
116 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size
- 1;
118 platform_add_devices(ixdp425_devices
, ARRAY_SIZE(ixdp425_devices
));
121 #ifdef CONFIG_ARCH_IXDP425
122 MACHINE_START(IXDP425
, "Intel IXDP425 Development Platform")
123 /* Maintainer: MontaVista Software, Inc. */
124 .phys_io
= IXP4XX_PERIPHERAL_BASE_PHYS
,
125 .io_pg_offst
= ((IXP4XX_PERIPHERAL_BASE_VIRT
) >> 18) & 0xfffc,
126 .map_io
= ixp4xx_map_io
,
127 .init_irq
= ixp4xx_init_irq
,
128 .timer
= &ixp4xx_timer
,
129 .boot_params
= 0x0100,
130 .init_machine
= ixdp425_init
,
134 #ifdef CONFIG_MACH_IXDP465
135 MACHINE_START(IXDP465
, "Intel IXDP465 Development Platform")
136 /* Maintainer: MontaVista Software, Inc. */
137 .phys_io
= IXP4XX_PERIPHERAL_BASE_PHYS
,
138 .io_pg_offst
= ((IXP4XX_PERIPHERAL_BASE_VIRT
) >> 18) & 0xfffc,
139 .map_io
= ixp4xx_map_io
,
140 .init_irq
= ixp4xx_init_irq
,
141 .timer
= &ixp4xx_timer
,
142 .boot_params
= 0x0100,
143 .init_machine
= ixdp425_init
,
147 #ifdef CONFIG_ARCH_PRPMC1100
148 MACHINE_START(IXCDP1100
, "Intel IXCDP1100 Development Platform")
149 /* Maintainer: MontaVista Software, Inc. */
150 .phys_io
= IXP4XX_PERIPHERAL_BASE_PHYS
,
151 .io_pg_offst
= ((IXP4XX_PERIPHERAL_BASE_VIRT
) >> 18) & 0xfffc,
152 .map_io
= ixp4xx_map_io
,
153 .init_irq
= ixp4xx_init_irq
,
154 .timer
= &ixp4xx_timer
,
155 .boot_params
= 0x0100,
156 .init_machine
= ixdp425_init
,
161 * Avila is functionally equivalent to IXDP425 except that it adds
162 * a CF IDE slot hanging off the expansion bus. When we have a
163 * driver for IXP4xx CF IDE with driver model support we'll move
164 * Avila to it's own setup file.
166 #ifdef CONFIG_ARCH_AVILA
167 MACHINE_START(AVILA
, "Gateworks Avila Network Platform")
168 /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */
169 .phys_io
= IXP4XX_PERIPHERAL_BASE_PHYS
,
170 .io_pg_offst
= ((IXP4XX_PERIPHERAL_BASE_VIRT
) >> 18) & 0xfffc,
171 .map_io
= ixp4xx_map_io
,
172 .init_irq
= ixp4xx_init_irq
,
173 .timer
= &ixp4xx_timer
,
174 .boot_params
= 0x0100,
175 .init_machine
= ixdp425_init
,