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/kernel.h>
17 #include <linux/init.h>
18 #include <linux/device.h>
19 #include <linux/serial.h>
20 #include <linux/tty.h>
21 #include <linux/serial_core.h>
23 #include <asm/types.h>
24 #include <asm/setup.h>
25 #include <asm/memory.h>
26 #include <asm/hardware.h>
27 #include <asm/mach-types.h>
29 #include <asm/mach/arch.h>
30 #include <asm/mach/flash.h>
39 * NSLU2 uses only one serial port
41 static struct uart_port nslu2_serial_ports[] = {
43 .membase = (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET),
44 .mapbase = (IXP4XX_UART1_BASE_PHYS),
45 .irq = IRQ_IXP4XX_UART1,
46 .flags = UPF_SKIP_TEST,
49 .uartclk = IXP4XX_UART_XTAL,
56 .membase = (char*)(IXP4XX_UART2_BASE_VIRT + REG_OFFSET),
57 .mapbase = (IXP4XX_UART2_BASE_PHYS),
58 .irq = IRQ_IXP4XX_UART2,
59 .flags = UPF_SKIP_TEST,
62 .uartclk = IXP4XX_UART_XTAL,
70 void __init nslu2_map_io(void)
72 early_serial_setup(&nslu2_serial_ports[0]);
74 early_serial_setup(&nslu2_serial_ports[1]);
79 static struct flash_platform_data nslu2_flash_data = {
80 .map_name = "cfi_probe",
84 static struct resource nslu2_flash_resource = {
85 .start = NSLU2_FLASH_BASE,
86 .end = NSLU2_FLASH_BASE + NSLU2_FLASH_SIZE,
87 .flags = IORESOURCE_MEM,
90 static struct platform_device nslu2_flash = {
91 .name = "IXP4XX-Flash",
94 .platform_data = &nslu2_flash_data,
97 .resource = &nslu2_flash_resource,
100 static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = {
101 .sda_pin = NSLU2_SDA_PIN,
102 .scl_pin = NSLU2_SCL_PIN,
105 static struct platform_device nslu2_i2c_controller = {
106 .name = "IXP4XX-I2C",
109 .platform_data = &nslu2_i2c_gpio_pins,
114 static struct platform_device *nslu2_devices[] __initdata = {
115 &nslu2_i2c_controller,
119 static void __init nslu2_init(void)
121 platform_add_devices(&nslu2_devices, ARRAY_SIZE(nslu2_devices));
124 MACHINE_START(NSLU2, "Linksys NSLU2")
125 MAINTAINER("www.nslu2-linux.org")
126 BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS,
127 IXP4XX_PERIPHERAL_BASE_VIRT)
129 INITIRQ(ixp4xx_init_irq) //FIXME: all irq are off here
130 .timer = &ixp4xx_timer,
131 // INITTIME(ixp4xx_init_time) //this was missing in 2.6.7 code ...soft reboot needed?
133 INIT_MACHINE(nslu2_init)