diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-14 06:50:04 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-02-21 06:56:19 -0500 |
commit | e1b7a72aeb8292502c97b43eceb01aea47ded40f (patch) | |
tree | e3932a7b52a5805cfff785ca9162925e34eb3095 /arch/arm/mach-sa1100/lart.c | |
parent | 9e6720fb0cfd6edda12b408a66f4ac88e8a82e32 (diff) |
FB: sa1100: move platform data to platform files
Move platform data out of the sa1100fb driver into the various
platform files themselves.
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100/lart.c')
-rw-r--r-- | arch/arm/mach-sa1100/lart.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c index af4e2761f3db..463a322a425b 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> |
@@ -26,8 +28,85 @@ static struct mcp_plat_data lart_mcp_data = { | |||
26 | .sclk_rate = 11981000, | 28 | .sclk_rate = 11981000, |
27 | }; | 29 | }; |
28 | 30 | ||
31 | #ifdef LART_GREY_LCD | ||
32 | static struct sa1100fb_mach_info lart_grey_info = { | ||
33 | .pixclock = 150000, .bpp = 4, | ||
34 | .xres = 320, .yres = 240, | ||
35 | |||
36 | .hsync_len = 1, .vsync_len = 1, | ||
37 | .left_margin = 4, .upper_margin = 0, | ||
38 | .right_margin = 2, .lower_margin = 0, | ||
39 | |||
40 | .cmap_greyscale = 1, | ||
41 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
42 | |||
43 | .lccr0 = LCCR0_Mono | LCCR0_Sngl | LCCR0_Pas | LCCR0_4PixMono, | ||
44 | .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(512), | ||
45 | }; | ||
46 | #endif | ||
47 | #ifdef LART_COLOR_LCD | ||
48 | static struct sa1100fb_mach_info lart_color_info = { | ||
49 | .pixclock = 150000, .bpp = 16, | ||
50 | .xres = 320, .yres = 240, | ||
51 | |||
52 | .hsync_len = 2, .vsync_len = 3, | ||
53 | .left_margin = 69, .upper_margin = 14, | ||
54 | .right_margin = 8, .lower_margin = 4, | ||
55 | |||
56 | .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, | ||
57 | .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512), | ||
58 | }; | ||
59 | #endif | ||
60 | #ifdef LART_VIDEO_OUT | ||
61 | static struct sa1100fb_mach_info lart_video_info = { | ||
62 | .pixclock = 39721, .bpp = 16, | ||
63 | .xres = 640, .yres = 480, | ||
64 | |||
65 | .hsync_len = 95, .vsync_len = 2, | ||
66 | .left_margin = 40, .upper_margin = 32, | ||
67 | .right_margin = 24, .lower_margin = 11, | ||
68 | |||
69 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
70 | |||
71 | .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, | ||
72 | .lccr3 = LCCR3_OutEnL | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512), | ||
73 | }; | ||
74 | #endif | ||
75 | |||
76 | #ifdef LART_KIT01_LCD | ||
77 | static struct sa1100fb_mach_info lart_kit01_info = { | ||
78 | .pixclock = 63291, .bpp = 16, | ||
79 | .xres = 640, .yres = 480, | ||
80 | |||
81 | .hsync_len = 64, .vsync_len = 3, | ||
82 | .left_margin = 122, .upper_margin = 45, | ||
83 | .right_margin = 10, .lower_margin = 10, | ||
84 | |||
85 | .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, | ||
86 | .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | ||
87 | }; | ||
88 | #endif | ||
89 | |||
29 | static void __init lart_init(void) | 90 | static void __init lart_init(void) |
30 | { | 91 | { |
92 | struct sa1100fb_mach_info *inf = NULL; | ||
93 | |||
94 | #ifdef LART_GREY_LCD | ||
95 | inf = &lart_grey_info; | ||
96 | #endif | ||
97 | #ifdef LART_COLOR_LCD | ||
98 | inf = &lart_color_info; | ||
99 | #endif | ||
100 | #ifdef LART_VIDEO_OUT | ||
101 | inf = &lart_video_info; | ||
102 | #endif | ||
103 | #ifdef LART_KIT01_LCD | ||
104 | inf = &lart_kit01_info; | ||
105 | #endif | ||
106 | |||
107 | if (inf) | ||
108 | sa11x0_register_lcd(inf); | ||
109 | |||
31 | sa11x0_register_mcp(&lart_mcp_data); | 110 | sa11x0_register_mcp(&lart_mcp_data); |
32 | } | 111 | } |
33 | 112 | ||