27 #include <linux/kernel.h>
31 #include <linux/i2c.h>
37 #include <mach/hardware.h>
48 static void __init edb93xx_register_flash(
void)
50 if (machine_is_edb9307() || machine_is_edb9312() ||
51 machine_is_edb9315()) {
68 .sda_is_open_drain = 0,
70 .scl_is_open_drain = 0,
87 static void __init edb93xx_register_i2c(
void)
89 if (machine_is_edb9302a() || machine_is_edb9307a() ||
90 machine_is_edb9315a()) {
92 edb93xxa_i2c_board_info,
94 }
else if (machine_is_edb9302() || machine_is_edb9307()
95 || machine_is_edb9312() || machine_is_edb9315()) {
97 edb93xx_i2c_board_info,
116 static void edb93xx_cs4271_hw_cleanup(
struct spi_device *
spi)
127 .setup = edb93xx_cs4271_hw_setup,
128 .cleanup = edb93xx_cs4271_hw_cleanup,
129 .cs_control = edb93xx_cs4271_hw_cs_control,
134 .modalias =
"cs4271",
135 .platform_data = &edb93xx_cs4271_data,
136 .controller_data = &edb93xx_cs4271_hw,
137 .max_speed_hz = 6000000,
145 .num_chipselect =
ARRAY_SIZE(edb93xx_spi_board_info),
148 static void __init edb93xx_register_spi(
void)
150 if (machine_is_edb9301() || machine_is_edb9302())
152 else if (machine_is_edb9302a() || machine_is_edb9307a())
154 else if (machine_is_edb9315a())
166 .name =
"edb93xx-audio",
170 static int __init edb93xx_has_audio(
void)
172 return (machine_is_edb9301() || machine_is_edb9302() ||
173 machine_is_edb9302a() || machine_is_edb9307a() ||
174 machine_is_edb9315a());
177 static void __init edb93xx_register_i2s(
void)
179 if (edb93xx_has_audio()) {
189 static void __init edb93xx_register_pwm(
void)
191 if (machine_is_edb9301() ||
192 machine_is_edb9302() || machine_is_edb9302a()) {
195 }
else if (machine_is_edb9307() || machine_is_edb9307a()) {
214 static int __init edb93xx_has_fb(
void)
217 return machine_is_edb9307() || machine_is_edb9307a() ||
218 machine_is_edb9312() || machine_is_edb9315() ||
219 machine_is_edb9315a();
222 static void __init edb93xx_register_fb(
void)
224 if (!edb93xx_has_fb())
227 if (machine_is_edb9307a() || machine_is_edb9315a())
239 static int __init edb93xx_has_ide(
void)
246 return machine_is_edb9312() || machine_is_edb9315() ||
247 machine_is_edb9315a();
250 static void __init edb93xx_register_ide(
void)
252 if (!edb93xx_has_ide())
259 static void __init edb93xx_init_machine(
void)
262 edb93xx_register_flash();
264 edb93xx_register_i2c();
265 edb93xx_register_spi();
266 edb93xx_register_i2s();
267 edb93xx_register_pwm();
268 edb93xx_register_fb();
269 edb93xx_register_ide();
273 #ifdef CONFIG_MACH_EDB9301
274 MACHINE_START(EDB9301,
"Cirrus Logic EDB9301 Evaluation Board")
276 .atag_offset = 0x100,
281 .init_machine = edb93xx_init_machine,
287 #ifdef CONFIG_MACH_EDB9302
288 MACHINE_START(EDB9302,
"Cirrus Logic EDB9302 Evaluation Board")
290 .atag_offset = 0x100,
295 .init_machine = edb93xx_init_machine,
301 #ifdef CONFIG_MACH_EDB9302A
302 MACHINE_START(EDB9302A,
"Cirrus Logic EDB9302A Evaluation Board")
304 .atag_offset = 0x100,
309 .init_machine = edb93xx_init_machine,
315 #ifdef CONFIG_MACH_EDB9307
316 MACHINE_START(EDB9307,
"Cirrus Logic EDB9307 Evaluation Board")
318 .atag_offset = 0x100,
323 .init_machine = edb93xx_init_machine,
329 #ifdef CONFIG_MACH_EDB9307A
330 MACHINE_START(EDB9307A,
"Cirrus Logic EDB9307A Evaluation Board")
332 .atag_offset = 0x100,
337 .init_machine = edb93xx_init_machine,
343 #ifdef CONFIG_MACH_EDB9312
344 MACHINE_START(EDB9312,
"Cirrus Logic EDB9312 Evaluation Board")
346 .atag_offset = 0x100,
351 .init_machine = edb93xx_init_machine,
357 #ifdef CONFIG_MACH_EDB9315
358 MACHINE_START(EDB9315,
"Cirrus Logic EDB9315 Evaluation Board")
360 .atag_offset = 0x100,
365 .init_machine = edb93xx_init_machine,
371 #ifdef CONFIG_MACH_EDB9315A
372 MACHINE_START(EDB9315A,
"Cirrus Logic EDB9315A Evaluation Board")
374 .atag_offset = 0x100,
379 .init_machine = edb93xx_init_machine,