vserver 1.9.5.x5
[linux-2.6.git] / arch / arm / mach-ixp4xx / prpmc1100-setup.c
1 /*
2  * arch/arm/mach-ixp4xx/prpmc1100-setup.c
3  *
4  * Motorola PrPMC1100 board setup
5  *
6  * Copyright (C) 2003-2004 MontaVista Software, Inc.
7  *
8  * Author: Deepak Saxena <dsaxena@plexity.net>
9  */
10
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_core.h>
17
18 #include <asm/types.h>
19 #include <asm/setup.h>
20 #include <asm/memory.h>
21 #include <asm/hardware.h>
22 #include <asm/irq.h>
23 #include <asm/mach-types.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/flash.h>
26
27 #ifdef  __ARMEB__
28 #define REG_OFFSET      3
29 #else
30 #define REG_OFFSET      0
31 #endif
32
33 /*
34  * Only one serial port is connected on the PrPMC1100
35  */
36 static struct uart_port prpmc1100_serial_port = {
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
49 void __init prpmc1100_map_io(void)
50 {
51         early_serial_setup(&prpmc1100_serial_port);
52
53         ixp4xx_map_io();
54 }
55
56 static struct flash_platform_data prpmc1100_flash_data = {
57         .map_name       = "cfi_probe",
58         .width          = 2,
59 };
60
61 static struct resource prpmc1100_flash_resource = {
62         .start          = PRPMC1100_FLASH_BASE,
63         .end            = PRPMC1100_FLASH_BASE + PRPMC1100_FLASH_SIZE,
64         .flags          = IORESOURCE_MEM,
65 };
66
67 static struct platform_device prpmc1100_flash = {
68         .name           = "IXP4XX-Flash",
69         .id             = 0,
70         .dev            = {
71                 .platform_data = &prpmc1100_flash_data,
72         },
73         .num_resources  = 1,
74         .resource       = &prpmc1100_flash_resource,
75 };
76
77 static struct platform_device *prpmc1100_devices[] __initdata = {
78         &prpmc1100_flash
79 };
80
81 static void __init prpmc1100_init(void)
82 {
83         ixp4xx_sys_init();
84
85         platform_add_devices(prpmc1100_devices, ARRAY_SIZE(prpmc1100_devices));
86 }
87
88 MACHINE_START(PRPMC1100, "Motorola PrPMC1100")
89         MAINTAINER("MontaVista Software, Inc.")
90         BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS,
91                 IXP4XX_PERIPHERAL_BASE_VIRT)
92         MAPIO(prpmc1100_map_io)
93         INITIRQ(ixp4xx_init_irq)
94         .timer          = &ixp4xx_timer,
95         BOOT_PARAMS(0x0100)
96         INIT_MACHINE(prpmc1100_init)
97 MACHINE_END
98