diff options
-rw-r--r-- | arch/arm/mach-ep93xx/edb93xx.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 4b0431652131..fad371df40ed 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/i2c-gpio.h> | 32 | #include <linux/i2c-gpio.h> |
33 | 33 | ||
34 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
35 | #include <mach/fb.h> | ||
35 | 36 | ||
36 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
37 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
@@ -111,6 +112,37 @@ static void __init edb93xx_register_pwm(void) | |||
111 | } | 112 | } |
112 | 113 | ||
113 | 114 | ||
115 | /************************************************************************* | ||
116 | * EDB93xx framebuffer | ||
117 | *************************************************************************/ | ||
118 | static struct ep93xxfb_mach_info __initdata edb93xxfb_info = { | ||
119 | .num_modes = EP93XXFB_USE_MODEDB, | ||
120 | .bpp = 16, | ||
121 | .flags = 0, | ||
122 | }; | ||
123 | |||
124 | static int __init edb93xx_has_fb(void) | ||
125 | { | ||
126 | /* These platforms have an ep93xx with video capability */ | ||
127 | return machine_is_edb9307() || machine_is_edb9307a() || | ||
128 | machine_is_edb9312() || machine_is_edb9315() || | ||
129 | machine_is_edb9315a(); | ||
130 | } | ||
131 | |||
132 | static void __init edb93xx_register_fb(void) | ||
133 | { | ||
134 | if (!edb93xx_has_fb()) | ||
135 | return; | ||
136 | |||
137 | if (machine_is_edb9307a() || machine_is_edb9315a()) | ||
138 | edb93xxfb_info.flags |= EP93XXFB_USE_SDCSN0; | ||
139 | else | ||
140 | edb93xxfb_info.flags |= EP93XXFB_USE_SDCSN3; | ||
141 | |||
142 | ep93xx_register_fb(&edb93xxfb_info); | ||
143 | } | ||
144 | |||
145 | |||
114 | static void __init edb93xx_init_machine(void) | 146 | static void __init edb93xx_init_machine(void) |
115 | { | 147 | { |
116 | ep93xx_init_devices(); | 148 | ep93xx_init_devices(); |
@@ -118,6 +150,7 @@ static void __init edb93xx_init_machine(void) | |||
118 | ep93xx_register_eth(&edb93xx_eth_data, 1); | 150 | ep93xx_register_eth(&edb93xx_eth_data, 1); |
119 | edb93xx_register_i2c(); | 151 | edb93xx_register_i2c(); |
120 | edb93xx_register_pwm(); | 152 | edb93xx_register_pwm(); |
153 | edb93xx_register_fb(); | ||
121 | } | 154 | } |
122 | 155 | ||
123 | 156 | ||