initial commit with v2.6.9
[linux-2.6.9-moxart.git] / arch / arm / mach-sa1100 / xp860.c
blobab2a523c3b146fcc8b5aae6b1057830c59f1bc73
1 /*
2 * linux/arch/arm/mach-sa1100/xp860.c
3 */
5 #include <linux/init.h>
6 #include <linux/kernel.h>
7 #include <linux/delay.h>
8 #include <linux/pm.h>
9 #include <linux/tty.h>
10 #include <linux/ioport.h>
12 #include <asm/hardware.h>
13 #include <asm/setup.h>
15 #include <asm/mach/arch.h>
16 #include <asm/mach/map.h>
17 #include <asm/mach/serial_sa1100.h>
18 #include <asm/hardware/sa1111.h>
20 #include "generic.h"
23 static void xp860_power_off(void)
25 local_irq_disable();
26 GPDR |= GPIO_GPIO20;
27 GPSR = GPIO_GPIO20;
28 mdelay(1000);
29 GPCR = GPIO_GPIO20;
30 while(1);
33 static struct resource sa1111_resources[] = {
34 [0] = {
35 .start = 0x40000000,
36 .end = 0x40001fff,
37 .flags = IORESOURCE_MEM,
41 static u64 sa1111_dmamask = 0xffffffffUL;
43 static struct platform_device sa1111_device = {
44 .name = "sa1111",
45 .id = 0,
46 .dev = {
47 .dma_mask = &sa1111_dmamask,
48 .coherent_dma_mask = 0xffffffff,
50 .num_resources = ARRAY_SIZE(sa1111_resources),
51 .resource = sa1111_resources,
54 static struct platform_device *devices[] __initdata = {
55 &sa1111_device,
59 * Note: I replaced the sa1111_init() without the full SA1111 initialisation
60 * because this machine doesn't appear to use the DMA features. If this is
61 * wrong, please look at neponset.c to fix it properly.
63 static int __init xp860_init(void)
65 pm_power_off = xp860_power_off;
67 return platform_add_devices(devices, ARRAY_SIZE(devices));
70 arch_initcall(xp860_init);
72 static struct map_desc xp860_io_desc[] __initdata = {
73 /* virtual physical length type */
74 { 0xf0000000, 0x10000000, 0x00100000, MT_DEVICE }, /* SCSI */
75 { 0xf1000000, 0x18000000, 0x00100000, MT_DEVICE }, /* LAN */
76 { 0xf4000000, 0x40000000, 0x00800000, MT_DEVICE } /* SA-1111 */
79 static void __init xp860_map_io(void)
81 sa1100_map_io();
82 iotable_init(xp860_io_desc, ARRAY_SIZE(xp860_io_desc));
84 sa1100_register_uart(0, 3);
85 sa1100_register_uart(1, 1);
88 MACHINE_START(XP860, "XP860")
89 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
90 MAPIO(xp860_map_io)
91 INITIRQ(sa1100_init_irq)
92 INITTIME(sa1100_init_time)
93 MACHINE_END