diff options
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/board-ap325rxa.c | 53 | ||||
-rw-r--r-- | arch/sh/boards/board-magicpanelr2.c | 23 | ||||
-rw-r--r-- | arch/sh/boards/board-sh7785lcr.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-highlander/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-hp6xx/setup.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-migor/setup.c | 171 | ||||
-rw-r--r-- | arch/sh/boards/mach-rsk/devices-rsk7203.c | 24 | ||||
-rw-r--r-- | arch/sh/boards/mach-x3proto/setup.c | 1 |
8 files changed, 152 insertions, 124 deletions
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index 1c67cba6e34f..caf4c33f4e84 100644 --- a/arch/sh/boards/board-ap325rxa.c +++ b/arch/sh/boards/board-ap325rxa.c | |||
@@ -18,8 +18,10 @@ | |||
18 | #include <linux/mtd/sh_flctl.h> | 18 | #include <linux/mtd/sh_flctl.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/smc911x.h> | 21 | #include <linux/smsc911x.h> |
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/spi/spi.h> | ||
24 | #include <linux/spi/spi_gpio.h> | ||
23 | #include <media/soc_camera_platform.h> | 25 | #include <media/soc_camera_platform.h> |
24 | #include <media/sh_mobile_ceu.h> | 26 | #include <media/sh_mobile_ceu.h> |
25 | #include <video/sh_mobile_lcdc.h> | 27 | #include <video/sh_mobile_lcdc.h> |
@@ -27,12 +29,14 @@ | |||
27 | #include <asm/clock.h> | 29 | #include <asm/clock.h> |
28 | #include <cpu/sh7723.h> | 30 | #include <cpu/sh7723.h> |
29 | 31 | ||
30 | static struct smc911x_platdata smc911x_info = { | 32 | static struct smsc911x_platform_config smsc911x_config = { |
31 | .flags = SMC911X_USE_32BIT, | 33 | .phy_interface = PHY_INTERFACE_MODE_MII, |
32 | .irq_flags = IRQF_TRIGGER_LOW, | 34 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
35 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
36 | .flags = SMSC911X_USE_32BIT, | ||
33 | }; | 37 | }; |
34 | 38 | ||
35 | static struct resource smc9118_resources[] = { | 39 | static struct resource smsc9118_resources[] = { |
36 | [0] = { | 40 | [0] = { |
37 | .start = 0xb6080000, | 41 | .start = 0xb6080000, |
38 | .end = 0xb60fffff, | 42 | .end = 0xb60fffff, |
@@ -45,13 +49,13 @@ static struct resource smc9118_resources[] = { | |||
45 | } | 49 | } |
46 | }; | 50 | }; |
47 | 51 | ||
48 | static struct platform_device smc9118_device = { | 52 | static struct platform_device smsc9118_device = { |
49 | .name = "smc911x", | 53 | .name = "smsc911x", |
50 | .id = -1, | 54 | .id = -1, |
51 | .num_resources = ARRAY_SIZE(smc9118_resources), | 55 | .num_resources = ARRAY_SIZE(smsc9118_resources), |
52 | .resource = smc9118_resources, | 56 | .resource = smsc9118_resources, |
53 | .dev = { | 57 | .dev = { |
54 | .platform_data = &smc911x_info, | 58 | .platform_data = &smsc911x_config, |
55 | }, | 59 | }, |
56 | }; | 60 | }; |
57 | 61 | ||
@@ -315,8 +319,22 @@ static struct platform_device ceu_device = { | |||
315 | }, | 319 | }, |
316 | }; | 320 | }; |
317 | 321 | ||
322 | struct spi_gpio_platform_data sdcard_cn3_platform_data = { | ||
323 | .sck = GPIO_PTD0, | ||
324 | .mosi = GPIO_PTD1, | ||
325 | .miso = GPIO_PTD2, | ||
326 | .num_chipselect = 1, | ||
327 | }; | ||
328 | |||
329 | static struct platform_device sdcard_cn3_device = { | ||
330 | .name = "spi_gpio", | ||
331 | .dev = { | ||
332 | .platform_data = &sdcard_cn3_platform_data, | ||
333 | }, | ||
334 | }; | ||
335 | |||
318 | static struct platform_device *ap325rxa_devices[] __initdata = { | 336 | static struct platform_device *ap325rxa_devices[] __initdata = { |
319 | &smc9118_device, | 337 | &smsc9118_device, |
320 | &ap325rxa_nor_flash_device, | 338 | &ap325rxa_nor_flash_device, |
321 | &lcdc_device, | 339 | &lcdc_device, |
322 | &ceu_device, | 340 | &ceu_device, |
@@ -324,6 +342,7 @@ static struct platform_device *ap325rxa_devices[] __initdata = { | |||
324 | &camera_device, | 342 | &camera_device, |
325 | #endif | 343 | #endif |
326 | &nand_flash_device, | 344 | &nand_flash_device, |
345 | &sdcard_cn3_device, | ||
327 | }; | 346 | }; |
328 | 347 | ||
329 | static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { | 348 | static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { |
@@ -332,6 +351,15 @@ static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { | |||
332 | }, | 351 | }, |
333 | }; | 352 | }; |
334 | 353 | ||
354 | static struct spi_board_info ap325rxa_spi_devices[] = { | ||
355 | { | ||
356 | .modalias = "mmc_spi", | ||
357 | .max_speed_hz = 5000000, | ||
358 | .chip_select = 0, | ||
359 | .controller_data = (void *) GPIO_PTD5, | ||
360 | }, | ||
361 | }; | ||
362 | |||
335 | static int __init ap325rxa_devices_setup(void) | 363 | static int __init ap325rxa_devices_setup(void) |
336 | { | 364 | { |
337 | /* LD3 and LD4 LEDs */ | 365 | /* LD3 and LD4 LEDs */ |
@@ -429,6 +457,9 @@ static int __init ap325rxa_devices_setup(void) | |||
429 | i2c_register_board_info(0, ap325rxa_i2c_devices, | 457 | i2c_register_board_info(0, ap325rxa_i2c_devices, |
430 | ARRAY_SIZE(ap325rxa_i2c_devices)); | 458 | ARRAY_SIZE(ap325rxa_i2c_devices)); |
431 | 459 | ||
460 | spi_register_board_info(ap325rxa_spi_devices, | ||
461 | ARRAY_SIZE(ap325rxa_spi_devices)); | ||
462 | |||
432 | return platform_add_devices(ap325rxa_devices, | 463 | return platform_add_devices(ap325rxa_devices, |
433 | ARRAY_SIZE(ap325rxa_devices)); | 464 | ARRAY_SIZE(ap325rxa_devices)); |
434 | } | 465 | } |
diff --git a/arch/sh/boards/board-magicpanelr2.c b/arch/sh/boards/board-magicpanelr2.c index 3de22ccdeb7e..0a37c8bfc959 100644 --- a/arch/sh/boards/board-magicpanelr2.c +++ b/arch/sh/boards/board-magicpanelr2.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/smsc911x.h> | ||
17 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
18 | #include <linux/mtd/partitions.h> | 19 | #include <linux/mtd/partitions.h> |
19 | #include <linux/mtd/physmap.h> | 20 | #include <linux/mtd/physmap.h> |
@@ -242,7 +243,7 @@ static void __init mpr2_setup(char **cmdline_p) | |||
242 | printk(KERN_WARNING "Ethernet not ready\n"); | 243 | printk(KERN_WARNING "Ethernet not ready\n"); |
243 | } | 244 | } |
244 | 245 | ||
245 | static struct resource smc911x_resources[] = { | 246 | static struct resource smsc911x_resources[] = { |
246 | [0] = { | 247 | [0] = { |
247 | .start = 0xa8000000, | 248 | .start = 0xa8000000, |
248 | .end = 0xabffffff, | 249 | .end = 0xabffffff, |
@@ -255,11 +256,21 @@ static struct resource smc911x_resources[] = { | |||
255 | }, | 256 | }, |
256 | }; | 257 | }; |
257 | 258 | ||
258 | static struct platform_device smc911x_device = { | 259 | static struct smsc911x_platform_config smsc911x_config = { |
259 | .name = "smc911x", | 260 | .phy_interface = PHY_INTERFACE_MODE_MII, |
261 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
262 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
263 | .flags = SMSC911X_USE_32BIT, | ||
264 | }; | ||
265 | |||
266 | static struct platform_device smsc911x_device = { | ||
267 | .name = "smsc911x", | ||
260 | .id = -1, | 268 | .id = -1, |
261 | .num_resources = ARRAY_SIZE(smc911x_resources), | 269 | .num_resources = ARRAY_SIZE(smsc911x_resources), |
262 | .resource = smc911x_resources, | 270 | .resource = smsc911x_resources, |
271 | .dev = { | ||
272 | .platform_data = &smsc911x_config, | ||
273 | }, | ||
263 | }; | 274 | }; |
264 | 275 | ||
265 | static struct resource heartbeat_resources[] = { | 276 | static struct resource heartbeat_resources[] = { |
@@ -360,7 +371,7 @@ static void __init set_mtd_partitions(void) | |||
360 | 371 | ||
361 | static struct platform_device *mpr2_devices[] __initdata = { | 372 | static struct platform_device *mpr2_devices[] __initdata = { |
362 | &heartbeat_device, | 373 | &heartbeat_device, |
363 | &smc911x_device, | 374 | &smsc911x_device, |
364 | &flash_device, | 375 | &flash_device, |
365 | }; | 376 | }; |
366 | 377 | ||
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c index 408bbddaf325..38a64968d7bf 100644 --- a/arch/sh/boards/board-sh7785lcr.c +++ b/arch/sh/boards/board-sh7785lcr.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
19 | #include <linux/i2c-pca-platform.h> | 19 | #include <linux/i2c-pca-platform.h> |
20 | #include <linux/i2c-algo-pca.h> | 20 | #include <linux/i2c-algo-pca.h> |
21 | #include <linux/irq.h> | ||
21 | #include <asm/heartbeat.h> | 22 | #include <asm/heartbeat.h> |
22 | #include <mach/sh7785lcr.h> | 23 | #include <mach/sh7785lcr.h> |
23 | 24 | ||
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c index 806438b42cac..20fe72c515d5 100644 --- a/arch/sh/boards/mach-highlander/setup.c +++ b/arch/sh/boards/mach-highlander/setup.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/ata_platform.h> | 18 | #include <linux/ata_platform.h> |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/irq.h> | ||
21 | #include <net/ax88796.h> | 22 | #include <net/ax88796.h> |
22 | #include <asm/machvec.h> | 23 | #include <asm/machvec.h> |
23 | #include <mach/highlander.h> | 24 | #include <mach/highlander.h> |
diff --git a/arch/sh/boards/mach-hp6xx/setup.c b/arch/sh/boards/mach-hp6xx/setup.c index 48fece78ff54..746742bdc014 100644 --- a/arch/sh/boards/mach-hp6xx/setup.c +++ b/arch/sh/boards/mach-hp6xx/setup.c | |||
@@ -12,9 +12,9 @@ | |||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/irq.h> | ||
15 | #include <asm/hd64461.h> | 16 | #include <asm/hd64461.h> |
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | #include <asm/irq.h> | ||
18 | #include <mach/hp6xx.h> | 18 | #include <mach/hp6xx.h> |
19 | #include <cpu/dac.h> | 19 | #include <cpu/dac.h> |
20 | 20 | ||
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index cc1408119c24..28e56c5809a2 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c | |||
@@ -18,9 +18,12 @@ | |||
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <media/soc_camera_platform.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <media/sh_mobile_ceu.h> | 22 | #include <linux/spi/spi_gpio.h> |
23 | #include <video/sh_mobile_lcdc.h> | 23 | #include <video/sh_mobile_lcdc.h> |
24 | #include <media/sh_mobile_ceu.h> | ||
25 | #include <media/ov772x.h> | ||
26 | #include <media/tw9910.h> | ||
24 | #include <asm/clock.h> | 27 | #include <asm/clock.h> |
25 | #include <asm/machvec.h> | 28 | #include <asm/machvec.h> |
26 | #include <asm/io.h> | 29 | #include <asm/io.h> |
@@ -292,9 +295,12 @@ static struct platform_device migor_lcdc_device = { | |||
292 | }; | 295 | }; |
293 | 296 | ||
294 | static struct clk *camera_clk; | 297 | static struct clk *camera_clk; |
298 | static DEFINE_MUTEX(camera_lock); | ||
295 | 299 | ||
296 | static void camera_power_on(void) | 300 | static void camera_power_on(int is_tw) |
297 | { | 301 | { |
302 | mutex_lock(&camera_lock); | ||
303 | |||
298 | /* Use 10 MHz VIO_CKO instead of 24 MHz to work | 304 | /* Use 10 MHz VIO_CKO instead of 24 MHz to work |
299 | * around signal quality issues on Panel Board V2.1. | 305 | * around signal quality issues on Panel Board V2.1. |
300 | */ | 306 | */ |
@@ -304,6 +310,12 @@ static void camera_power_on(void) | |||
304 | 310 | ||
305 | /* use VIO_RST to take camera out of reset */ | 311 | /* use VIO_RST to take camera out of reset */ |
306 | mdelay(10); | 312 | mdelay(10); |
313 | if (is_tw) { | ||
314 | gpio_set_value(GPIO_PTT2, 0); | ||
315 | gpio_set_value(GPIO_PTT0, 0); | ||
316 | } else { | ||
317 | gpio_set_value(GPIO_PTT0, 1); | ||
318 | } | ||
307 | gpio_set_value(GPIO_PTT3, 0); | 319 | gpio_set_value(GPIO_PTT3, 0); |
308 | mdelay(10); | 320 | mdelay(10); |
309 | gpio_set_value(GPIO_PTT3, 1); | 321 | gpio_set_value(GPIO_PTT3, 1); |
@@ -316,107 +328,29 @@ static void camera_power_off(void) | |||
316 | clk_put(camera_clk); | 328 | clk_put(camera_clk); |
317 | 329 | ||
318 | gpio_set_value(GPIO_PTT3, 0); | 330 | gpio_set_value(GPIO_PTT3, 0); |
331 | mutex_unlock(&camera_lock); | ||
319 | } | 332 | } |
320 | 333 | ||
321 | static void camera_power(int mode) | 334 | static int ov7725_power(struct device *dev, int mode) |
322 | { | 335 | { |
323 | if (mode) | 336 | if (mode) |
324 | camera_power_on(); | 337 | camera_power_on(0); |
325 | else | 338 | else |
326 | camera_power_off(); | 339 | camera_power_off(); |
327 | } | ||
328 | 340 | ||
329 | #ifdef CONFIG_I2C | 341 | return 0; |
330 | static unsigned char camera_ov772x_magic[] = | 342 | } |
331 | { | ||
332 | 0x09, 0x01, 0x0c, 0x20, 0x0d, 0x41, 0x0e, 0x01, | ||
333 | 0x12, 0x00, 0x13, 0x8F, 0x14, 0x4A, 0x15, 0x00, | ||
334 | 0x16, 0x00, 0x17, 0x23, 0x18, 0xa0, 0x19, 0x07, | ||
335 | 0x1a, 0xf0, 0x1b, 0x40, 0x1f, 0x00, 0x20, 0x10, | ||
336 | 0x22, 0xff, 0x23, 0x01, 0x28, 0x00, 0x29, 0xa0, | ||
337 | 0x2a, 0x00, 0x2b, 0x00, 0x2c, 0xf0, 0x2d, 0x00, | ||
338 | 0x2e, 0x00, 0x30, 0x80, 0x31, 0x60, 0x32, 0x00, | ||
339 | 0x33, 0x00, 0x34, 0x00, 0x3d, 0x80, 0x3e, 0xe2, | ||
340 | 0x3f, 0x1f, 0x42, 0x80, 0x43, 0x80, 0x44, 0x80, | ||
341 | 0x45, 0x80, 0x46, 0x00, 0x47, 0x00, 0x48, 0x00, | ||
342 | 0x49, 0x50, 0x4a, 0x30, 0x4b, 0x50, 0x4c, 0x50, | ||
343 | 0x4d, 0x00, 0x4e, 0xef, 0x4f, 0x10, 0x50, 0x60, | ||
344 | 0x51, 0x00, 0x52, 0x00, 0x53, 0x24, 0x54, 0x7a, | ||
345 | 0x55, 0xfc, 0x62, 0xff, 0x63, 0xf0, 0x64, 0x1f, | ||
346 | 0x65, 0x00, 0x66, 0x10, 0x67, 0x00, 0x68, 0x00, | ||
347 | 0x69, 0x5c, 0x6a, 0x11, 0x6b, 0xa2, 0x6c, 0x01, | ||
348 | 0x6d, 0x50, 0x6e, 0x80, 0x6f, 0x80, 0x70, 0x0f, | ||
349 | 0x71, 0x00, 0x72, 0x00, 0x73, 0x0f, 0x74, 0x0f, | ||
350 | 0x75, 0xff, 0x78, 0x10, 0x79, 0x70, 0x7a, 0x70, | ||
351 | 0x7b, 0xf0, 0x7c, 0xf0, 0x7d, 0xf0, 0x7e, 0x0e, | ||
352 | 0x7f, 0x1a, 0x80, 0x31, 0x81, 0x5a, 0x82, 0x69, | ||
353 | 0x83, 0x75, 0x84, 0x7e, 0x85, 0x88, 0x86, 0x8f, | ||
354 | 0x87, 0x96, 0x88, 0xa3, 0x89, 0xaf, 0x8a, 0xc4, | ||
355 | 0x8b, 0xd7, 0x8c, 0xe8, 0x8d, 0x20, 0x8e, 0x00, | ||
356 | 0x8f, 0x00, 0x90, 0x08, 0x91, 0x10, 0x92, 0x1f, | ||
357 | 0x93, 0x01, 0x94, 0x2c, 0x95, 0x24, 0x96, 0x08, | ||
358 | 0x97, 0x14, 0x98, 0x24, 0x99, 0x38, 0x9a, 0x9e, | ||
359 | 0x9b, 0x00, 0x9c, 0x40, 0x9e, 0x11, 0x9f, 0x02, | ||
360 | 0xa0, 0x00, 0xa1, 0x40, 0xa2, 0x40, 0xa3, 0x06, | ||
361 | 0xa4, 0x00, 0xa6, 0x00, 0xa7, 0x40, 0xa8, 0x40, | ||
362 | 0xa9, 0x80, 0xaa, 0x80, 0xab, 0x06, 0xac, 0xff, | ||
363 | 0x12, 0x06, 0x64, 0x3f, 0x12, 0x46, 0x17, 0x3f, | ||
364 | 0x18, 0x50, 0x19, 0x03, 0x1a, 0x78, 0x29, 0x50, | ||
365 | 0x2c, 0x78, | ||
366 | }; | ||
367 | 343 | ||
368 | static int ov772x_set_capture(struct soc_camera_platform_info *info, | 344 | static int tw9910_power(struct device *dev, int mode) |
369 | int enable) | ||
370 | { | 345 | { |
371 | struct i2c_adapter *a = i2c_get_adapter(0); | 346 | if (mode) |
372 | struct i2c_msg msg; | 347 | camera_power_on(1); |
373 | int ret = 0; | 348 | else |
374 | int i; | 349 | camera_power_off(); |
375 | |||
376 | if (!enable) | ||
377 | return 0; /* camera_power_off() is enough */ | ||
378 | |||
379 | for (i = 0; i < ARRAY_SIZE(camera_ov772x_magic); i += 2) { | ||
380 | u_int8_t buf[8]; | ||
381 | |||
382 | msg.addr = 0x21; | ||
383 | msg.buf = buf; | ||
384 | msg.len = 2; | ||
385 | msg.flags = 0; | ||
386 | |||
387 | buf[0] = camera_ov772x_magic[i]; | ||
388 | buf[1] = camera_ov772x_magic[i + 1]; | ||
389 | |||
390 | ret = (ret < 0) ? ret : i2c_transfer(a, &msg, 1); | ||
391 | } | ||
392 | 350 | ||
393 | return ret; | 351 | return 0; |
394 | } | 352 | } |
395 | 353 | ||
396 | static struct soc_camera_platform_info ov772x_info = { | ||
397 | .iface = 0, | ||
398 | .format_name = "RGB565", | ||
399 | .format_depth = 16, | ||
400 | .format = { | ||
401 | .pixelformat = V4L2_PIX_FMT_RGB565, | ||
402 | .colorspace = V4L2_COLORSPACE_SRGB, | ||
403 | .width = 320, | ||
404 | .height = 240, | ||
405 | }, | ||
406 | .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | | ||
407 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, | ||
408 | .power = camera_power, | ||
409 | .set_capture = ov772x_set_capture, | ||
410 | }; | ||
411 | |||
412 | static struct platform_device migor_camera_device = { | ||
413 | .name = "soc_camera_platform", | ||
414 | .dev = { | ||
415 | .platform_data = &ov772x_info, | ||
416 | }, | ||
417 | }; | ||
418 | #endif /* CONFIG_I2C */ | ||
419 | |||
420 | static struct sh_mobile_ceu_info sh_mobile_ceu_info = { | 354 | static struct sh_mobile_ceu_info sh_mobile_ceu_info = { |
421 | .flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \ | 355 | .flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \ |
422 | | SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH, | 356 | | SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH, |
@@ -448,16 +382,43 @@ static struct platform_device migor_ceu_device = { | |||
448 | }, | 382 | }, |
449 | }; | 383 | }; |
450 | 384 | ||
385 | static struct ov772x_camera_info ov7725_info = { | ||
386 | .buswidth = SOCAM_DATAWIDTH_8, | ||
387 | .link = { | ||
388 | .power = ov7725_power, | ||
389 | }, | ||
390 | }; | ||
391 | |||
392 | static struct tw9910_video_info tw9910_info = { | ||
393 | .buswidth = SOCAM_DATAWIDTH_8, | ||
394 | .mpout = TW9910_MPO_FIELD, | ||
395 | .link = { | ||
396 | .power = tw9910_power, | ||
397 | } | ||
398 | }; | ||
399 | |||
400 | struct spi_gpio_platform_data sdcard_cn9_platform_data = { | ||
401 | .sck = GPIO_PTD0, | ||
402 | .mosi = GPIO_PTD1, | ||
403 | .miso = GPIO_PTD2, | ||
404 | .num_chipselect = 1, | ||
405 | }; | ||
406 | |||
407 | static struct platform_device sdcard_cn9_device = { | ||
408 | .name = "spi_gpio", | ||
409 | .dev = { | ||
410 | .platform_data = &sdcard_cn9_platform_data, | ||
411 | }, | ||
412 | }; | ||
413 | |||
451 | static struct platform_device *migor_devices[] __initdata = { | 414 | static struct platform_device *migor_devices[] __initdata = { |
452 | &smc91x_eth_device, | 415 | &smc91x_eth_device, |
453 | &sh_keysc_device, | 416 | &sh_keysc_device, |
454 | &migor_lcdc_device, | 417 | &migor_lcdc_device, |
455 | &migor_ceu_device, | 418 | &migor_ceu_device, |
456 | #ifdef CONFIG_I2C | ||
457 | &migor_camera_device, | ||
458 | #endif | ||
459 | &migor_nor_flash_device, | 419 | &migor_nor_flash_device, |
460 | &migor_nand_flash_device, | 420 | &migor_nand_flash_device, |
421 | &sdcard_cn9_device, | ||
461 | }; | 422 | }; |
462 | 423 | ||
463 | static struct i2c_board_info migor_i2c_devices[] = { | 424 | static struct i2c_board_info migor_i2c_devices[] = { |
@@ -468,6 +429,23 @@ static struct i2c_board_info migor_i2c_devices[] = { | |||
468 | I2C_BOARD_INFO("migor_ts", 0x51), | 429 | I2C_BOARD_INFO("migor_ts", 0x51), |
469 | .irq = 38, /* IRQ6 */ | 430 | .irq = 38, /* IRQ6 */ |
470 | }, | 431 | }, |
432 | { | ||
433 | I2C_BOARD_INFO("ov772x", 0x21), | ||
434 | .platform_data = &ov7725_info, | ||
435 | }, | ||
436 | { | ||
437 | I2C_BOARD_INFO("tw9910", 0x45), | ||
438 | .platform_data = &tw9910_info, | ||
439 | }, | ||
440 | }; | ||
441 | |||
442 | static struct spi_board_info migor_spi_devices[] = { | ||
443 | { | ||
444 | .modalias = "mmc_spi", | ||
445 | .max_speed_hz = 5000000, | ||
446 | .chip_select = 0, | ||
447 | .controller_data = (void *) GPIO_PTD5, | ||
448 | }, | ||
471 | }; | 449 | }; |
472 | 450 | ||
473 | static int __init migor_devices_setup(void) | 451 | static int __init migor_devices_setup(void) |
@@ -592,6 +570,9 @@ static int __init migor_devices_setup(void) | |||
592 | i2c_register_board_info(0, migor_i2c_devices, | 570 | i2c_register_board_info(0, migor_i2c_devices, |
593 | ARRAY_SIZE(migor_i2c_devices)); | 571 | ARRAY_SIZE(migor_i2c_devices)); |
594 | 572 | ||
573 | spi_register_board_info(migor_spi_devices, | ||
574 | ARRAY_SIZE(migor_spi_devices)); | ||
575 | |||
595 | return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices)); | 576 | return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices)); |
596 | } | 577 | } |
597 | __initcall(migor_devices_setup); | 578 | __initcall(migor_devices_setup); |
diff --git a/arch/sh/boards/mach-rsk/devices-rsk7203.c b/arch/sh/boards/mach-rsk/devices-rsk7203.c index 73f743b9be8d..d8a65ea91665 100644 --- a/arch/sh/boards/mach-rsk/devices-rsk7203.c +++ b/arch/sh/boards/mach-rsk/devices-rsk7203.c | |||
@@ -15,19 +15,21 @@ | |||
15 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
16 | #include <linux/mtd/physmap.h> | 16 | #include <linux/mtd/physmap.h> |
17 | #include <linux/mtd/map.h> | 17 | #include <linux/mtd/map.h> |
18 | #include <linux/smc911x.h> | 18 | #include <linux/smsc911x.h> |
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/leds.h> | 20 | #include <linux/leds.h> |
21 | #include <asm/machvec.h> | 21 | #include <asm/machvec.h> |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <cpu/sh7203.h> | 23 | #include <cpu/sh7203.h> |
24 | 24 | ||
25 | static struct smc911x_platdata smc911x_info = { | 25 | static struct smsc911x_platform_config smsc911x_config = { |
26 | .flags = SMC911X_USE_16BIT, | 26 | .phy_interface = PHY_INTERFACE_MODE_MII, |
27 | .irq_flags = IRQF_TRIGGER_LOW, | 27 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
28 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
29 | .flags = SMSC911X_USE_16BIT, | ||
28 | }; | 30 | }; |
29 | 31 | ||
30 | static struct resource smc911x_resources[] = { | 32 | static struct resource smsc911x_resources[] = { |
31 | [0] = { | 33 | [0] = { |
32 | .start = 0x24000000, | 34 | .start = 0x24000000, |
33 | .end = 0x24000000 + 0x100, | 35 | .end = 0x24000000 + 0x100, |
@@ -40,13 +42,13 @@ static struct resource smc911x_resources[] = { | |||
40 | }, | 42 | }, |
41 | }; | 43 | }; |
42 | 44 | ||
43 | static struct platform_device smc911x_device = { | 45 | static struct platform_device smsc911x_device = { |
44 | .name = "smc911x", | 46 | .name = "smsc911x", |
45 | .id = -1, | 47 | .id = -1, |
46 | .num_resources = ARRAY_SIZE(smc911x_resources), | 48 | .num_resources = ARRAY_SIZE(smsc911x_resources), |
47 | .resource = smc911x_resources, | 49 | .resource = smsc911x_resources, |
48 | .dev = { | 50 | .dev = { |
49 | .platform_data = &smc911x_info, | 51 | .platform_data = &smsc911x_config, |
50 | }, | 52 | }, |
51 | }; | 53 | }; |
52 | 54 | ||
@@ -87,7 +89,7 @@ static struct platform_device led_device = { | |||
87 | }; | 89 | }; |
88 | 90 | ||
89 | static struct platform_device *rsk7203_devices[] __initdata = { | 91 | static struct platform_device *rsk7203_devices[] __initdata = { |
90 | &smc911x_device, | 92 | &smsc911x_device, |
91 | &led_device, | 93 | &led_device, |
92 | }; | 94 | }; |
93 | 95 | ||
diff --git a/arch/sh/boards/mach-x3proto/setup.c b/arch/sh/boards/mach-x3proto/setup.c index a70d23b21788..a340492087fa 100644 --- a/arch/sh/boards/mach-x3proto/setup.c +++ b/arch/sh/boards/mach-x3proto/setup.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/smc91x.h> | 16 | #include <linux/smc91x.h> |
17 | #include <linux/irq.h> | ||
17 | #include <asm/ilsel.h> | 18 | #include <asm/ilsel.h> |
18 | 19 | ||
19 | static struct resource heartbeat_resources[] = { | 20 | static struct resource heartbeat_resources[] = { |