2 * linux/arch/arm/mach-sa1100/lart.c
5 #include <linux/init.h>
6 #include <linux/kernel.h>
9 #include <video/sa1100fb.h>
11 #include <mach/hardware.h>
12 #include <asm/setup.h>
13 #include <asm/mach-types.h>
16 #include <asm/mach/arch.h>
17 #include <asm/mach/map.h>
18 #include <asm/mach/serial_sa1100.h>
24 #warning "include/asm/arch-sa1100/ide.h needs fixing for lart"
26 static struct mcp_plat_data lart_mcp_data = {
28 .sclk_rate = 11981000,
32 static struct sa1100fb_mach_info lart_grey_info = {
33 .pixclock = 150000, .bpp = 4,
34 .xres = 320, .yres = 240,
36 .hsync_len = 1, .vsync_len = 1,
37 .left_margin = 4, .upper_margin = 0,
38 .right_margin = 2, .lower_margin = 0,
41 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
43 .lccr0 = LCCR0_Mono | LCCR0_Sngl | LCCR0_Pas | LCCR0_4PixMono,
44 .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(512),
48 static struct sa1100fb_mach_info lart_color_info = {
49 .pixclock = 150000, .bpp = 16,
50 .xres = 320, .yres = 240,
52 .hsync_len = 2, .vsync_len = 3,
53 .left_margin = 69, .upper_margin = 14,
54 .right_margin = 8, .lower_margin = 4,
56 .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
57 .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512),
61 static struct sa1100fb_mach_info lart_video_info = {
62 .pixclock = 39721, .bpp = 16,
63 .xres = 640, .yres = 480,
65 .hsync_len = 95, .vsync_len = 2,
66 .left_margin = 40, .upper_margin = 32,
67 .right_margin = 24, .lower_margin = 11,
69 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
71 .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
72 .lccr3 = LCCR3_OutEnL | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512),
77 static struct sa1100fb_mach_info lart_kit01_info = {
78 .pixclock = 63291, .bpp = 16,
79 .xres = 640, .yres = 480,
81 .hsync_len = 64, .vsync_len = 3,
82 .left_margin = 122, .upper_margin = 45,
83 .right_margin = 10, .lower_margin = 10,
85 .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
86 .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg
90 static void __init lart_init(void)
92 struct sa1100fb_mach_info *inf = NULL;
95 inf = &lart_grey_info;
98 inf = &lart_color_info;
100 #ifdef LART_VIDEO_OUT
101 inf = &lart_video_info;
103 #ifdef LART_KIT01_LCD
104 inf = &lart_kit01_info;
108 sa11x0_register_lcd(inf);
110 sa11x0_ppc_configure_mcp();
111 sa11x0_register_mcp(&lart_mcp_data);
114 static struct map_desc lart_io_desc[] __initdata = {
115 { /* main flash memory */
116 .virtual = 0xe8000000,
117 .pfn = __phys_to_pfn(0x00000000),
118 .length = 0x00400000,
120 }, { /* main flash, alternative location */
121 .virtual = 0xec000000,
122 .pfn = __phys_to_pfn(0x08000000),
123 .length = 0x00400000,
128 static void __init lart_map_io(void)
131 iotable_init(lart_io_desc, ARRAY_SIZE(lart_io_desc));
133 sa1100_register_uart(0, 3);
134 sa1100_register_uart(1, 1);
135 sa1100_register_uart(2, 2);
137 GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD);
138 GPDR |= GPIO_UART_TXD;
139 GPDR &= ~GPIO_UART_RXD;
143 MACHINE_START(LART, "LART")
144 .atag_offset = 0x100,
145 .map_io = lart_map_io,
146 .init_irq = sa1100_init_irq,
147 .init_machine = lart_init,
148 .timer = &sa1100_timer,
149 .restart = sa11x0_restart,