2 * linux/arch/arm/mach-sa1100/adsbitsy.c
6 * Pieces specific to the ADS Bitsy
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 #include <linux/kernel.h>
13 #include <linux/init.h>
14 #include <linux/ptrace.h>
15 #include <linux/ioport.h>
16 #include <linux/serial_core.h>
18 #include <asm/hardware.h>
19 #include <asm/mach-types.h>
20 #include <asm/setup.h>
23 #include <asm/mach/irq.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/map.h>
26 #include <asm/mach/serial_sa1100.h>
30 static struct resource sa1111_resources
[] = {
34 .flags
= IORESOURCE_MEM
,
39 .flags
= IORESOURCE_IRQ
,
43 static u64 sa1111_dmamask
= 0xffffffffUL
;
45 static struct platform_device sa1111_device
= {
49 .dma_mask
= &sa1111_dmamask
,
50 .coherent_dma_mask
= 0xffffffff,
52 .num_resources
= ARRAY_SIZE(sa1111_resources
),
53 .resource
= sa1111_resources
,
56 static struct platform_device
*devices
[] __initdata
= {
60 static int __init
adsbitsy_init(void)
64 if (!machine_is_adsbitsy())
68 * Ensure that the memory bus request/grant signals are setup,
69 * and the grant is held in its inactive state
83 ret
= platform_add_devices(devices
, ARRAY_SIZE(devices
));
88 * Enable PWM control for LCD
90 sa1111_enable_device(SKPCR_PWMCLKEN
);
93 SKPWM1
= 0x01; // Backlight
99 arch_initcall(adsbitsy_init
);
101 static void __init
adsbitsy_init_irq(void)
103 /* First the standard SA1100 IRQs */
107 static struct map_desc adsbitsy_io_desc
[] __initdata
= {
108 /* virtual physical length type */
109 { 0xf4000000, 0x18000000, 0x00800000, MT_DEVICE
} /* SA1111 */
112 static int adsbitsy_uart_open(struct uart_port
*port
, struct uart_info
*info
)
114 if (port
->mapbase
== _Ser1UTCR0
) {
115 Ser1SDCR0
|= SDCR0_UART
;
116 #error Fixme // Set RTS High (should be done in the set_mctrl fn)
118 } else if (port
->mapbase
== _Ser2UTCR0
) {
119 Ser2UTCR4
= Ser2HSCR0
= 0;
120 #error Fixme // Set RTS High (should be done in the set_mctrl fn)
122 } else if (port
->mapbase
== _Ser2UTCR0
) {
123 #error Fixme // Set RTS High (should be done in the set_mctrl fn)
129 static struct sa1100_port_fns adsbitsy_port_fns __initdata
= {
130 .open
= adsbitsy_uart_open
,
133 static void __init
adsbitsy_map_io(void)
136 iotable_init(adsbitsy_io_desc
, ARRAY_SIZE(adsbitsy_io_desc
));
138 sa1100_register_uart_fns(&adsbitsy_port_fns
);
139 sa1100_register_uart(0, 3);
140 sa1100_register_uart(1, 1);
141 sa1100_register_uart(2, 2);
142 GPDR
|= GPIO_GPIO15
| GPIO_GPIO17
| GPIO_GPIO19
;
143 GPDR
&= ~(GPIO_GPIO14
| GPIO_GPIO16
| GPIO_GPIO18
);
146 MACHINE_START(ADSBITSY
, "ADS Bitsy")
147 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
148 MAPIO(adsbitsy_map_io
)
149 INITIRQ(adsbitsy_init_irq
)
150 INITTIME(sa1100_init_time
)