2 * arch/arm/mach-ixp4xx/nslu2-setup.c
6 * based ixdp425-setup.c:
7 * Copyright (C) 2003-2004 MontaVista Software, Inc.
9 * Author: Mark Rakes <mrakes at mac.com>
10 * Maintainers: http://www.nslu2-linux.org/
12 * Fixed missing init_time in MACHINE_START kas11 10/22/04
13 * Changed to conform to new style __init ixdp425 kas11 10/22/04
16 #include <linux/init.h>
17 #include <linux/device.h>
18 #include <linux/serial.h>
19 #include <linux/tty.h>
20 #include <linux/serial_core.h>
22 #include <asm/types.h>
23 #include <asm/setup.h>
24 #include <asm/memory.h>
25 #include <asm/hardware.h>
26 #include <asm/mach-types.h>
28 #include <asm/mach/arch.h>
29 #include <asm/mach/flash.h>
38 * NSLU2 uses only one serial port
40 static struct uart_port nslu2_serial_ports[] = {
42 .membase = (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET),
43 .mapbase = (IXP4XX_UART1_BASE_PHYS),
44 .irq = IRQ_IXP4XX_UART1,
45 .flags = UPF_SKIP_TEST,
48 .uartclk = IXP4XX_UART_XTAL,
55 .membase = (char*)(IXP4XX_UART2_BASE_VIRT + REG_OFFSET),
56 .mapbase = (IXP4XX_UART2_BASE_PHYS),
57 .irq = IRQ_IXP4XX_UART2,
58 .flags = UPF_SKIP_TEST,
61 .uartclk = IXP4XX_UART_XTAL,
69 void __init nslu2_map_io(void)
71 early_serial_setup(&nslu2_serial_ports[0]);
73 early_serial_setup(&nslu2_serial_ports[1]);
78 static struct flash_platform_data nslu2_flash_data = {
79 .map_name = "cfi_probe",
83 static struct resource nslu2_flash_resource = {
84 .start = NSLU2_FLASH_BASE,
85 .end = NSLU2_FLASH_BASE + NSLU2_FLASH_SIZE,
86 .flags = IORESOURCE_MEM,
89 static struct platform_device nslu2_flash = {
90 .name = "IXP4XX-Flash",
93 .platform_data = &nslu2_flash_data,
96 .resource = &nslu2_flash_resource,
99 static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = {
100 .sda_pin = NSLU2_SDA_PIN,
101 .scl_pin = NSLU2_SCL_PIN,
104 static struct platform_device nslu2_i2c_controller = {
105 .name = "IXP4XX-I2C",
108 .platform_data = &nslu2_i2c_gpio_pins,
113 static struct platform_device *nslu2_devices[] __initdata = {
114 &nslu2_i2c_controller,
118 static void __init nslu2_init(void)
120 platform_add_devices(&nslu2_devices, ARRAY_SIZE(nslu2_devices));
123 MACHINE_START(NSLU2, "Linksys NSLU2")
124 MAINTAINER("www.nslu2-linux.org")
125 BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS,
126 IXP4XX_PERIPHERAL_BASE_VIRT)
128 INITIRQ(ixp4xx_init_irq) //FIXME: all irq are off here
129 INITTIME(ixp4xx_init_time) //this was missing in 2.6.7 code ...soft reboot needed?
131 INIT_MACHINE(nslu2_init)