diff options
Diffstat (limited to 'arch/arm/mach-sa1100/lart.c')
-rw-r--r-- | arch/arm/mach-sa1100/lart.c | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c index af4e2761f3d..eb6534e0b0d 100644 --- a/arch/arm/mach-sa1100/lart.c +++ b/arch/arm/mach-sa1100/lart.c | |||
@@ -6,6 +6,8 @@ | |||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/tty.h> | 7 | #include <linux/tty.h> |
8 | 8 | ||
9 | #include <video/sa1100fb.h> | ||
10 | |||
9 | #include <mach/hardware.h> | 11 | #include <mach/hardware.h> |
10 | #include <asm/setup.h> | 12 | #include <asm/setup.h> |
11 | #include <asm/mach-types.h> | 13 | #include <asm/mach-types.h> |
@@ -15,6 +17,7 @@ | |||
15 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
16 | #include <asm/mach/serial_sa1100.h> | 18 | #include <asm/mach/serial_sa1100.h> |
17 | #include <mach/mcp.h> | 19 | #include <mach/mcp.h> |
20 | #include <mach/irqs.h> | ||
18 | 21 | ||
19 | #include "generic.h" | 22 | #include "generic.h" |
20 | 23 | ||
@@ -26,8 +29,86 @@ static struct mcp_plat_data lart_mcp_data = { | |||
26 | .sclk_rate = 11981000, | 29 | .sclk_rate = 11981000, |
27 | }; | 30 | }; |
28 | 31 | ||
32 | #ifdef LART_GREY_LCD | ||
33 | static struct sa1100fb_mach_info lart_grey_info = { | ||
34 | .pixclock = 150000, .bpp = 4, | ||
35 | .xres = 320, .yres = 240, | ||
36 | |||
37 | .hsync_len = 1, .vsync_len = 1, | ||
38 | .left_margin = 4, .upper_margin = 0, | ||
39 | .right_margin = 2, .lower_margin = 0, | ||
40 | |||
41 | .cmap_greyscale = 1, | ||
42 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
43 | |||
44 | .lccr0 = LCCR0_Mono | LCCR0_Sngl | LCCR0_Pas | LCCR0_4PixMono, | ||
45 | .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(512), | ||
46 | }; | ||
47 | #endif | ||
48 | #ifdef LART_COLOR_LCD | ||
49 | static struct sa1100fb_mach_info lart_color_info = { | ||
50 | .pixclock = 150000, .bpp = 16, | ||
51 | .xres = 320, .yres = 240, | ||
52 | |||
53 | .hsync_len = 2, .vsync_len = 3, | ||
54 | .left_margin = 69, .upper_margin = 14, | ||
55 | .right_margin = 8, .lower_margin = 4, | ||
56 | |||
57 | .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, | ||
58 | .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512), | ||
59 | }; | ||
60 | #endif | ||
61 | #ifdef LART_VIDEO_OUT | ||
62 | static struct sa1100fb_mach_info lart_video_info = { | ||
63 | .pixclock = 39721, .bpp = 16, | ||
64 | .xres = 640, .yres = 480, | ||
65 | |||
66 | .hsync_len = 95, .vsync_len = 2, | ||
67 | .left_margin = 40, .upper_margin = 32, | ||
68 | .right_margin = 24, .lower_margin = 11, | ||
69 | |||
70 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
71 | |||
72 | .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, | ||
73 | .lccr3 = LCCR3_OutEnL | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512), | ||
74 | }; | ||
75 | #endif | ||
76 | |||
77 | #ifdef LART_KIT01_LCD | ||
78 | static struct sa1100fb_mach_info lart_kit01_info = { | ||
79 | .pixclock = 63291, .bpp = 16, | ||
80 | .xres = 640, .yres = 480, | ||
81 | |||
82 | .hsync_len = 64, .vsync_len = 3, | ||
83 | .left_margin = 122, .upper_margin = 45, | ||
84 | .right_margin = 10, .lower_margin = 10, | ||
85 | |||
86 | .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, | ||
87 | .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | ||
88 | }; | ||
89 | #endif | ||
90 | |||
29 | static void __init lart_init(void) | 91 | static void __init lart_init(void) |
30 | { | 92 | { |
93 | struct sa1100fb_mach_info *inf = NULL; | ||
94 | |||
95 | #ifdef LART_GREY_LCD | ||
96 | inf = &lart_grey_info; | ||
97 | #endif | ||
98 | #ifdef LART_COLOR_LCD | ||
99 | inf = &lart_color_info; | ||
100 | #endif | ||
101 | #ifdef LART_VIDEO_OUT | ||
102 | inf = &lart_video_info; | ||
103 | #endif | ||
104 | #ifdef LART_KIT01_LCD | ||
105 | inf = &lart_kit01_info; | ||
106 | #endif | ||
107 | |||
108 | if (inf) | ||
109 | sa11x0_register_lcd(inf); | ||
110 | |||
111 | sa11x0_ppc_configure_mcp(); | ||
31 | sa11x0_register_mcp(&lart_mcp_data); | 112 | sa11x0_register_mcp(&lart_mcp_data); |
32 | } | 113 | } |
33 | 114 | ||
@@ -63,6 +144,7 @@ static void __init lart_map_io(void) | |||
63 | MACHINE_START(LART, "LART") | 144 | MACHINE_START(LART, "LART") |
64 | .atag_offset = 0x100, | 145 | .atag_offset = 0x100, |
65 | .map_io = lart_map_io, | 146 | .map_io = lart_map_io, |
147 | .nr_irqs = SA1100_NR_IRQS, | ||
66 | .init_irq = sa1100_init_irq, | 148 | .init_irq = sa1100_init_irq, |
67 | .init_machine = lart_init, | 149 | .init_machine = lart_init, |
68 | .timer = &sa1100_timer, | 150 | .timer = &sa1100_timer, |