OMAP3 SRF: Add CORE rate table param in OMAP-PM
[linux-ginger.git] / arch / arm / mach-ixp4xx / gateway7001-setup.c
blob59b73a0ddfa93fba8b4ef21206566e190496cf6b
1 /*
2 * arch/arm/mach-ixp4xx/gateway7001-setup.c
4 * Board setup for the Gateway 7001 board
6 * Copyright (C) 2007 Imre Kaloz <kaloz@openwrt.org>
8 * based on coyote-setup.c:
9 * Copyright (C) 2003-2005 MontaVista Software, Inc.
11 * Author: Imre Kaloz <Kaloz@openwrt.org>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/device.h>
17 #include <linux/serial.h>
18 #include <linux/tty.h>
19 #include <linux/serial_8250.h>
20 #include <linux/slab.h>
22 #include <asm/types.h>
23 #include <asm/setup.h>
24 #include <asm/memory.h>
25 #include <mach/hardware.h>
26 #include <asm/irq.h>
27 #include <asm/mach-types.h>
28 #include <asm/mach/arch.h>
29 #include <asm/mach/flash.h>
31 static struct flash_platform_data gateway7001_flash_data = {
32 .map_name = "cfi_probe",
33 .width = 2,
36 static struct resource gateway7001_flash_resource = {
37 .flags = IORESOURCE_MEM,
40 static struct platform_device gateway7001_flash = {
41 .name = "IXP4XX-Flash",
42 .id = 0,
43 .dev = {
44 .platform_data = &gateway7001_flash_data,
46 .num_resources = 1,
47 .resource = &gateway7001_flash_resource,
50 static struct resource gateway7001_uart_resource = {
51 .start = IXP4XX_UART2_BASE_PHYS,
52 .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
53 .flags = IORESOURCE_MEM,
56 static struct plat_serial8250_port gateway7001_uart_data[] = {
58 .mapbase = IXP4XX_UART2_BASE_PHYS,
59 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
60 .irq = IRQ_IXP4XX_UART2,
61 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
62 .iotype = UPIO_MEM,
63 .regshift = 2,
64 .uartclk = IXP4XX_UART_XTAL,
66 { },
69 static struct platform_device gateway7001_uart = {
70 .name = "serial8250",
71 .id = PLAT8250_DEV_PLATFORM,
72 .dev = {
73 .platform_data = gateway7001_uart_data,
75 .num_resources = 1,
76 .resource = &gateway7001_uart_resource,
79 static struct platform_device *gateway7001_devices[] __initdata = {
80 &gateway7001_flash,
81 &gateway7001_uart
84 static void __init gateway7001_init(void)
86 ixp4xx_sys_init();
88 gateway7001_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
89 gateway7001_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
91 *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
92 *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
94 platform_add_devices(gateway7001_devices, ARRAY_SIZE(gateway7001_devices));
97 #ifdef CONFIG_MACH_GATEWAY7001
98 MACHINE_START(GATEWAY7001, "Gateway 7001 AP")
99 /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
100 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
101 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
102 .map_io = ixp4xx_map_io,
103 .init_irq = ixp4xx_init_irq,
104 .timer = &ixp4xx_timer,
105 .boot_params = 0x0100,
106 .init_machine = gateway7001_init,
107 MACHINE_END
108 #endif