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>
18 #include <asm/types.h>
19 #include <asm/setup.h>
20 #include <asm/memory.h>
21 #include <asm/hardware.h>
22 #include <asm/mach-types.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/flash.h>
27 static struct flash_platform_data ixdp425_flash_data = {
28 .map_name = "cfi_probe",
32 static struct resource ixdp425_flash_resource = {
33 .start = IXDP425_FLASH_BASE,
34 .end = IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE - 1,
35 .flags = IORESOURCE_MEM,
38 static struct platform_device ixdp425_flash = {
39 .name = "IXP4XX-Flash",
42 .platform_data = &ixdp425_flash_data,
45 .resource = &ixdp425_flash_resource,
48 static struct ixp4xx_i2c_pins ixdp425_i2c_gpio_pins = {
49 .sda_pin = IXDP425_SDA_PIN,
50 .scl_pin = IXDP425_SCL_PIN,
53 static struct platform_device ixdp425_i2c_controller = {
57 .platform_data = &ixdp425_i2c_gpio_pins,
62 static struct resource ixdp425_uart_resources[] = {
64 .start = IXP4XX_UART1_BASE_PHYS,
65 .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
66 .flags = IORESOURCE_MEM
69 .start = IXP4XX_UART2_BASE_PHYS,
70 .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
71 .flags = IORESOURCE_MEM
75 static struct plat_serial8250_port ixdp425_uart_data[] = {
77 .mapbase = IXP4XX_UART1_BASE_PHYS,
78 .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
79 .irq = IRQ_IXP4XX_UART1,
80 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
83 .uartclk = IXP4XX_UART_XTAL,
86 .mapbase = IXP4XX_UART2_BASE_PHYS,
87 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
88 .irq = IRQ_IXP4XX_UART1,
89 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
92 .uartclk = IXP4XX_UART_XTAL,
97 static struct platform_device ixdp425_uart = {
99 .id = PLAT8250_DEV_PLATFORM,
100 .dev.platform_data = ixdp425_uart_data,
102 .resource = ixdp425_uart_resources
105 static struct platform_device *ixdp425_devices[] __initdata = {
106 &ixdp425_i2c_controller,
112 static void __init ixdp425_init(void)
117 * IXP465 has 32MB window
119 if (machine_is_ixdp465()) {
120 ixdp425_flash_resource.end += IXDP425_FLASH_SIZE;
123 platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices));
126 MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
127 /* Maintainer: MontaVista Software, Inc. */
128 .phys_ram = PHYS_OFFSET,
129 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
130 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
131 .map_io = ixp4xx_map_io,
132 .init_irq = ixp4xx_init_irq,
133 .timer = &ixp4xx_timer,
134 .boot_params = 0x0100,
135 .init_machine = ixdp425_init,
138 MACHINE_START(IXDP465, "Intel IXDP465 Development Platform")
139 /* Maintainer: MontaVista Software, Inc. */
140 .phys_ram = PHYS_OFFSET,
141 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
142 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
143 .map_io = ixp4xx_map_io,
144 .init_irq = ixp4xx_init_irq,
145 .timer = &ixp4xx_timer,
146 .boot_params = 0x0100,
147 .init_machine = ixdp425_init,
150 MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform")
151 /* Maintainer: MontaVista Software, Inc. */
152 .phys_ram = PHYS_OFFSET,
153 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
154 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
155 .map_io = ixp4xx_map_io,
156 .init_irq = ixp4xx_init_irq,
157 .timer = &ixp4xx_timer,
158 .boot_params = 0x0100,
159 .init_machine = ixdp425_init,
163 * Avila is functionally equivalent to IXDP425 except that it adds
164 * a CF IDE slot hanging off the expansion bus. When we have a
165 * driver for IXP4xx CF IDE with driver model support we'll move
166 * Avila to it's own setup file.
168 #ifdef CONFIG_ARCH_AVILA
169 MACHINE_START(AVILA, "Gateworks Avila Network Platform")
170 /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */
171 .phys_ram = PHYS_OFFSET,
172 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
173 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
174 .map_io = ixp4xx_map_io,
175 .init_irq = ixp4xx_init_irq,
176 .timer = &ixp4xx_timer,
177 .boot_params = 0x0100,
178 .init_machine = ixdp425_init,