MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / arch / arm / mach-ixp4xx / ixdp425-setup.c
blobdbcaa464ba9c85759adf8beeb9e344cf1f7b0f4f
1 /*
2 * arch/arm/mach-ixp4xx/ixdp425-setup.c
4 * IXDP425/IXCDP1100 board-setup
6 * Copyright (C) 2003-2004 MontaVista Software, Inc.
8 * Author: Deepak Saxena <dsaxena@plexity.net>
9 */
11 #include <linux/init.h>
12 #include <linux/device.h>
13 #include <linux/serial.h>
14 #include <linux/tty.h>
15 #include <linux/serial_core.h>
17 #include <asm/types.h>
18 #include <asm/setup.h>
19 #include <asm/memory.h>
20 #include <asm/hardware.h>
21 #include <asm/mach-types.h>
22 #include <asm/irq.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach/flash.h>
26 #ifdef __ARMEB__
27 #define REG_OFFSET 3
28 #else
29 #define REG_OFFSET 0
30 #endif
33 * IXDP425 uses both chipset serial ports
35 static struct uart_port ixdp425_serial_ports[] = {
37 .membase = (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET),
38 .mapbase = (IXP4XX_UART1_BASE_PHYS),
39 .irq = IRQ_IXP4XX_UART1,
40 .flags = UPF_SKIP_TEST,
41 .iotype = UPIO_MEM,
42 .regshift = 2,
43 .uartclk = IXP4XX_UART_XTAL,
44 .line = 0,
45 .type = PORT_XSCALE,
46 .fifosize = 32
47 } , {
48 .membase = (char*)(IXP4XX_UART2_BASE_VIRT + REG_OFFSET),
49 .mapbase = (IXP4XX_UART2_BASE_PHYS),
50 .irq = IRQ_IXP4XX_UART2,
51 .flags = UPF_SKIP_TEST,
52 .iotype = UPIO_MEM,
53 .regshift = 2,
54 .uartclk = IXP4XX_UART_XTAL,
55 .line = 1,
56 .type = PORT_XSCALE,
57 .fifosize = 32
61 void __init ixdp425_map_io(void)
63 early_serial_setup(&ixdp425_serial_ports[0]);
64 early_serial_setup(&ixdp425_serial_ports[1]);
66 ixp4xx_map_io();
69 static struct flash_platform_data ixdp425_flash_data = {
70 .map_name = "cfi_probe",
71 .width = 2,
74 static struct resource ixdp425_flash_resource = {
75 .start = IXDP425_FLASH_BASE,
76 .end = IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE,
77 .flags = IORESOURCE_MEM,
80 static struct platform_device ixdp425_flash = {
81 .name = "IXP4XX-Flash",
82 .id = 0,
83 .dev = {
84 .platform_data = &ixdp425_flash_data,
86 .num_resources = 1,
87 .resource = &ixdp425_flash_resource,
90 static struct ixp4xx_i2c_pins ixdp425_i2c_gpio_pins = {
91 .sda_pin = IXDP425_SDA_PIN,
92 .scl_pin = IXDP425_SCL_PIN,
95 static struct platform_device ixdp425_i2c_controller = {
96 .name = "IXP4XX-I2C",
97 .id = 0,
98 .dev = {
99 .platform_data = &ixdp425_i2c_gpio_pins,
101 .num_resources = 0
104 static struct platform_device *ixdp425_devices[] __initdata = {
105 &ixdp425_i2c_controller,
106 &ixdp425_flash
109 static void __init ixdp425_init(void)
111 platform_add_devices(&ixdp425_devices, ARRAY_SIZE(ixdp425_devices));
114 MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
115 MAINTAINER("MontaVista Software, Inc.")
116 BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS,
117 IXP4XX_PERIPHERAL_BASE_VIRT)
118 MAPIO(ixdp425_map_io)
119 INITIRQ(ixp4xx_init_irq)
120 INITTIME(ixp4xx_init_time)
121 BOOT_PARAMS(0x0100)
122 INIT_MACHINE(ixdp425_init)
123 MACHINE_END
125 MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform")
126 MAINTAINER("MontaVista Software, Inc.")
127 BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS,
128 IXP4XX_PERIPHERAL_BASE_VIRT)
129 MAPIO(ixdp425_map_io)
130 INITIRQ(ixp4xx_init_irq)
131 INITTIME(ixp4xx_init_time)
132 BOOT_PARAMS(0x0100)
133 INIT_MACHINE(ixdp425_init)
134 MACHINE_END
137 * Avila is functionally equivalent to IXDP425 except that it adds
138 * a CF IDE slot hanging off the expansion bus. When we have a
139 * driver for IXP4xx CF IDE with driver model support we'll move
140 * Avila to it's own setup file.
142 #ifdef CONFIG_ARCH_AVILA
143 MACHINE_START(AVILA, "Gateworks Avila Network Platform")
144 MAINTAINER("Deepak Saxena <dsaxena@plexity.net>")
145 BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS,
146 IXP4XX_PERIPHERAL_BASE_VIRT)
147 MAPIO(ixdp425_map_io)
148 INITIRQ(ixp4xx_init_irq)
149 INITTIME(ixp4xx_init_time)
150 BOOT_PARAMS(0x0100)
151 INIT_MACHINE(ixdp425_init)
152 MACHINE_END
153 #endif