diff options
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/board-ap325rxa.c | 52 | ||||
-rw-r--r-- | arch/sh/boards/board-sh7785lcr.c | 14 | ||||
-rw-r--r-- | arch/sh/boards/mach-highlander/setup.c | 12 | ||||
-rw-r--r-- | arch/sh/boards/mach-migor/setup.c | 79 | ||||
-rw-r--r-- | arch/sh/boards/mach-rsk/devices-rsk7203.c | 8 | ||||
-rw-r--r-- | arch/sh/boards/mach-x3proto/setup.c | 12 |
6 files changed, 119 insertions, 58 deletions
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index 1c4d83ef2a47..7ffd1b4315bd 100644 --- a/arch/sh/boards/board-ap325rxa.c +++ b/arch/sh/boards/board-ap325rxa.c | |||
@@ -349,15 +349,6 @@ static int ov7725_power(struct device *dev, int mode) | |||
349 | return 0; | 349 | return 0; |
350 | } | 350 | } |
351 | 351 | ||
352 | static struct ov772x_camera_info ov7725_info = { | ||
353 | .buswidth = SOCAM_DATAWIDTH_8, | ||
354 | .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, | ||
355 | .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), | ||
356 | .link = { | ||
357 | .power = ov7725_power, | ||
358 | }, | ||
359 | }; | ||
360 | |||
361 | static struct sh_mobile_ceu_info sh_mobile_ceu_info = { | 352 | static struct sh_mobile_ceu_info sh_mobile_ceu_info = { |
362 | .flags = SH_CEU_FLAG_USE_8BIT_BUS, | 353 | .flags = SH_CEU_FLAG_USE_8BIT_BUS, |
363 | }; | 354 | }; |
@@ -402,25 +393,48 @@ static struct platform_device sdcard_cn3_device = { | |||
402 | }, | 393 | }, |
403 | }; | 394 | }; |
404 | 395 | ||
405 | static struct platform_device *ap325rxa_devices[] __initdata = { | ||
406 | &smsc9118_device, | ||
407 | &ap325rxa_nor_flash_device, | ||
408 | &lcdc_device, | ||
409 | &ceu_device, | ||
410 | &nand_flash_device, | ||
411 | &sdcard_cn3_device, | ||
412 | }; | ||
413 | |||
414 | static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { | 396 | static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { |
415 | { | 397 | { |
416 | I2C_BOARD_INFO("pcf8563", 0x51), | 398 | I2C_BOARD_INFO("pcf8563", 0x51), |
417 | }, | 399 | }, |
400 | }; | ||
401 | |||
402 | static struct i2c_board_info ap325rxa_i2c_camera[] = { | ||
418 | { | 403 | { |
419 | I2C_BOARD_INFO("ov772x", 0x21), | 404 | I2C_BOARD_INFO("ov772x", 0x21), |
420 | .platform_data = &ov7725_info, | ||
421 | }, | 405 | }, |
422 | }; | 406 | }; |
423 | 407 | ||
408 | static struct ov772x_camera_info ov7725_info = { | ||
409 | .buswidth = SOCAM_DATAWIDTH_8, | ||
410 | .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, | ||
411 | .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), | ||
412 | .link = { | ||
413 | .power = ov7725_power, | ||
414 | .board_info = &ap325rxa_i2c_camera[0], | ||
415 | .i2c_adapter_id = 0, | ||
416 | .module_name = "ov772x", | ||
417 | }, | ||
418 | }; | ||
419 | |||
420 | static struct platform_device ap325rxa_camera = { | ||
421 | .name = "soc-camera-pdrv", | ||
422 | .id = 0, | ||
423 | .dev = { | ||
424 | .platform_data = &ov7725_info.link, | ||
425 | }, | ||
426 | }; | ||
427 | |||
428 | static struct platform_device *ap325rxa_devices[] __initdata = { | ||
429 | &smsc9118_device, | ||
430 | &ap325rxa_nor_flash_device, | ||
431 | &lcdc_device, | ||
432 | &ceu_device, | ||
433 | &nand_flash_device, | ||
434 | &sdcard_cn3_device, | ||
435 | &ap325rxa_camera, | ||
436 | }; | ||
437 | |||
424 | static struct spi_board_info ap325rxa_spi_devices[] = { | 438 | static struct spi_board_info ap325rxa_spi_devices[] = { |
425 | { | 439 | { |
426 | .modalias = "mmc_spi", | 440 | .modalias = "mmc_spi", |
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c index 7be56fb06c1f..42410a15d255 100644 --- a/arch/sh/boards/board-sh7785lcr.c +++ b/arch/sh/boards/board-sh7785lcr.c | |||
@@ -15,16 +15,18 @@ | |||
15 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
16 | #include <linux/mtd/physmap.h> | 16 | #include <linux/mtd/physmap.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/interrupt.h> | ||
18 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
19 | #include <linux/i2c-pca-platform.h> | 20 | #include <linux/i2c-pca-platform.h> |
20 | #include <linux/i2c-algo-pca.h> | 21 | #include <linux/i2c-algo-pca.h> |
22 | #include <linux/usb/r8a66597.h> | ||
21 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
22 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
23 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
24 | #include <mach/sh7785lcr.h> | 26 | #include <mach/sh7785lcr.h> |
27 | #include <cpu/sh7785.h> | ||
25 | #include <asm/heartbeat.h> | 28 | #include <asm/heartbeat.h> |
26 | #include <asm/clock.h> | 29 | #include <asm/clock.h> |
27 | #include <cpu/sh7785.h> | ||
28 | 30 | ||
29 | /* | 31 | /* |
30 | * NOTE: This board has 2 physical memory maps. | 32 | * NOTE: This board has 2 physical memory maps. |
@@ -98,18 +100,21 @@ static struct platform_device nor_flash_device = { | |||
98 | .resource = nor_flash_resources, | 100 | .resource = nor_flash_resources, |
99 | }; | 101 | }; |
100 | 102 | ||
103 | static struct r8a66597_platdata r8a66597_data = { | ||
104 | .xtal = R8A66597_PLATDATA_XTAL_12MHZ, | ||
105 | .vif = 1, | ||
106 | }; | ||
107 | |||
101 | static struct resource r8a66597_usb_host_resources[] = { | 108 | static struct resource r8a66597_usb_host_resources[] = { |
102 | [0] = { | 109 | [0] = { |
103 | .name = "r8a66597_hcd", | ||
104 | .start = R8A66597_ADDR, | 110 | .start = R8A66597_ADDR, |
105 | .end = R8A66597_ADDR + R8A66597_SIZE - 1, | 111 | .end = R8A66597_ADDR + R8A66597_SIZE - 1, |
106 | .flags = IORESOURCE_MEM, | 112 | .flags = IORESOURCE_MEM, |
107 | }, | 113 | }, |
108 | [1] = { | 114 | [1] = { |
109 | .name = "r8a66597_hcd", | ||
110 | .start = 2, | 115 | .start = 2, |
111 | .end = 2, | 116 | .end = 2, |
112 | .flags = IORESOURCE_IRQ, | 117 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, |
113 | }, | 118 | }, |
114 | }; | 119 | }; |
115 | 120 | ||
@@ -119,6 +124,7 @@ static struct platform_device r8a66597_usb_host_device = { | |||
119 | .dev = { | 124 | .dev = { |
120 | .dma_mask = NULL, | 125 | .dma_mask = NULL, |
121 | .coherent_dma_mask = 0xffffffff, | 126 | .coherent_dma_mask = 0xffffffff, |
127 | .platform_data = &r8a66597_data, | ||
122 | }, | 128 | }, |
123 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), | 129 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), |
124 | .resource = r8a66597_usb_host_resources, | 130 | .resource = r8a66597_usb_host_resources, |
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c index dd297d87f934..1639f8915000 100644 --- a/arch/sh/boards/mach-highlander/setup.c +++ b/arch/sh/boards/mach-highlander/setup.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/mtd/physmap.h> | 20 | #include <linux/mtd/physmap.h> |
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/interrupt.h> | ||
24 | #include <linux/usb/r8a66597.h> | ||
23 | #include <net/ax88796.h> | 25 | #include <net/ax88796.h> |
24 | #include <asm/machvec.h> | 26 | #include <asm/machvec.h> |
25 | #include <mach/highlander.h> | 27 | #include <mach/highlander.h> |
@@ -28,18 +30,21 @@ | |||
28 | #include <asm/io.h> | 30 | #include <asm/io.h> |
29 | #include <asm/io_trapped.h> | 31 | #include <asm/io_trapped.h> |
30 | 32 | ||
33 | static struct r8a66597_platdata r8a66597_data = { | ||
34 | .xtal = R8A66597_PLATDATA_XTAL_12MHZ, | ||
35 | .vif = 1, | ||
36 | }; | ||
37 | |||
31 | static struct resource r8a66597_usb_host_resources[] = { | 38 | static struct resource r8a66597_usb_host_resources[] = { |
32 | [0] = { | 39 | [0] = { |
33 | .name = "r8a66597_hcd", | ||
34 | .start = 0xA4200000, | 40 | .start = 0xA4200000, |
35 | .end = 0xA42000FF, | 41 | .end = 0xA42000FF, |
36 | .flags = IORESOURCE_MEM, | 42 | .flags = IORESOURCE_MEM, |
37 | }, | 43 | }, |
38 | [1] = { | 44 | [1] = { |
39 | .name = "r8a66597_hcd", | ||
40 | .start = IRQ_EXT1, /* irq number */ | 45 | .start = IRQ_EXT1, /* irq number */ |
41 | .end = IRQ_EXT1, | 46 | .end = IRQ_EXT1, |
42 | .flags = IORESOURCE_IRQ, | 47 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, |
43 | }, | 48 | }, |
44 | }; | 49 | }; |
45 | 50 | ||
@@ -49,6 +54,7 @@ static struct platform_device r8a66597_usb_host_device = { | |||
49 | .dev = { | 54 | .dev = { |
50 | .dma_mask = NULL, /* don't use dma */ | 55 | .dma_mask = NULL, /* don't use dma */ |
51 | .coherent_dma_mask = 0xffffffff, | 56 | .coherent_dma_mask = 0xffffffff, |
57 | .platform_data = &r8a66597_data, | ||
52 | }, | 58 | }, |
53 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), | 59 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), |
54 | .resource = r8a66597_usb_host_resources, | 60 | .resource = r8a66597_usb_host_resources, |
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index 6ed401cd3156..f70f4644deb4 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c | |||
@@ -381,21 +381,6 @@ static struct platform_device migor_ceu_device = { | |||
381 | }, | 381 | }, |
382 | }; | 382 | }; |
383 | 383 | ||
384 | static struct ov772x_camera_info ov7725_info = { | ||
385 | .buswidth = SOCAM_DATAWIDTH_8, | ||
386 | .link = { | ||
387 | .power = ov7725_power, | ||
388 | }, | ||
389 | }; | ||
390 | |||
391 | static struct tw9910_video_info tw9910_info = { | ||
392 | .buswidth = SOCAM_DATAWIDTH_8, | ||
393 | .mpout = TW9910_MPO_FIELD, | ||
394 | .link = { | ||
395 | .power = tw9910_power, | ||
396 | } | ||
397 | }; | ||
398 | |||
399 | struct spi_gpio_platform_data sdcard_cn9_platform_data = { | 384 | struct spi_gpio_platform_data sdcard_cn9_platform_data = { |
400 | .sck = GPIO_PTD0, | 385 | .sck = GPIO_PTD0, |
401 | .mosi = GPIO_PTD1, | 386 | .mosi = GPIO_PTD1, |
@@ -410,16 +395,6 @@ static struct platform_device sdcard_cn9_device = { | |||
410 | }, | 395 | }, |
411 | }; | 396 | }; |
412 | 397 | ||
413 | static struct platform_device *migor_devices[] __initdata = { | ||
414 | &smc91x_eth_device, | ||
415 | &sh_keysc_device, | ||
416 | &migor_lcdc_device, | ||
417 | &migor_ceu_device, | ||
418 | &migor_nor_flash_device, | ||
419 | &migor_nand_flash_device, | ||
420 | &sdcard_cn9_device, | ||
421 | }; | ||
422 | |||
423 | static struct i2c_board_info migor_i2c_devices[] = { | 398 | static struct i2c_board_info migor_i2c_devices[] = { |
424 | { | 399 | { |
425 | I2C_BOARD_INFO("rs5c372b", 0x32), | 400 | I2C_BOARD_INFO("rs5c372b", 0x32), |
@@ -428,16 +403,66 @@ static struct i2c_board_info migor_i2c_devices[] = { | |||
428 | I2C_BOARD_INFO("migor_ts", 0x51), | 403 | I2C_BOARD_INFO("migor_ts", 0x51), |
429 | .irq = 38, /* IRQ6 */ | 404 | .irq = 38, /* IRQ6 */ |
430 | }, | 405 | }, |
406 | }; | ||
407 | |||
408 | static struct i2c_board_info migor_i2c_camera[] = { | ||
431 | { | 409 | { |
432 | I2C_BOARD_INFO("ov772x", 0x21), | 410 | I2C_BOARD_INFO("ov772x", 0x21), |
433 | .platform_data = &ov7725_info, | ||
434 | }, | 411 | }, |
435 | { | 412 | { |
436 | I2C_BOARD_INFO("tw9910", 0x45), | 413 | I2C_BOARD_INFO("tw9910", 0x45), |
437 | .platform_data = &tw9910_info, | ||
438 | }, | 414 | }, |
439 | }; | 415 | }; |
440 | 416 | ||
417 | static struct ov772x_camera_info ov7725_info = { | ||
418 | .buswidth = SOCAM_DATAWIDTH_8, | ||
419 | .link = { | ||
420 | .power = ov7725_power, | ||
421 | .board_info = &migor_i2c_camera[0], | ||
422 | .i2c_adapter_id = 0, | ||
423 | .module_name = "ov772x", | ||
424 | }, | ||
425 | }; | ||
426 | |||
427 | static struct tw9910_video_info tw9910_info = { | ||
428 | .buswidth = SOCAM_DATAWIDTH_8, | ||
429 | .mpout = TW9910_MPO_FIELD, | ||
430 | .link = { | ||
431 | .power = tw9910_power, | ||
432 | .board_info = &migor_i2c_camera[1], | ||
433 | .i2c_adapter_id = 0, | ||
434 | .module_name = "tw9910", | ||
435 | } | ||
436 | }; | ||
437 | |||
438 | static struct platform_device migor_camera[] = { | ||
439 | { | ||
440 | .name = "soc-camera-pdrv", | ||
441 | .id = 0, | ||
442 | .dev = { | ||
443 | .platform_data = &ov7725_info.link, | ||
444 | }, | ||
445 | }, { | ||
446 | .name = "soc-camera-pdrv", | ||
447 | .id = 1, | ||
448 | .dev = { | ||
449 | .platform_data = &tw9910_info.link, | ||
450 | }, | ||
451 | }, | ||
452 | }; | ||
453 | |||
454 | static struct platform_device *migor_devices[] __initdata = { | ||
455 | &smc91x_eth_device, | ||
456 | &sh_keysc_device, | ||
457 | &migor_lcdc_device, | ||
458 | &migor_ceu_device, | ||
459 | &migor_nor_flash_device, | ||
460 | &migor_nand_flash_device, | ||
461 | &sdcard_cn9_device, | ||
462 | &migor_camera[0], | ||
463 | &migor_camera[1], | ||
464 | }; | ||
465 | |||
441 | static struct spi_board_info migor_spi_devices[] = { | 466 | static struct spi_board_info migor_spi_devices[] = { |
442 | { | 467 | { |
443 | .modalias = "mmc_spi", | 468 | .modalias = "mmc_spi", |
diff --git a/arch/sh/boards/mach-rsk/devices-rsk7203.c b/arch/sh/boards/mach-rsk/devices-rsk7203.c index d8a65ea91665..4af3a771c058 100644 --- a/arch/sh/boards/mach-rsk/devices-rsk7203.c +++ b/arch/sh/boards/mach-rsk/devices-rsk7203.c | |||
@@ -26,13 +26,13 @@ static struct smsc911x_platform_config smsc911x_config = { | |||
26 | .phy_interface = PHY_INTERFACE_MODE_MII, | 26 | .phy_interface = PHY_INTERFACE_MODE_MII, |
27 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | 27 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
28 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | 28 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, |
29 | .flags = SMSC911X_USE_16BIT, | 29 | .flags = SMSC911X_USE_32BIT | SMSC911X_SWAP_FIFO, |
30 | }; | 30 | }; |
31 | 31 | ||
32 | static struct resource smsc911x_resources[] = { | 32 | static struct resource smsc911x_resources[] = { |
33 | [0] = { | 33 | [0] = { |
34 | .start = 0x24000000, | 34 | .start = 0x24000000, |
35 | .end = 0x24000000 + 0x100, | 35 | .end = 0x240000ff, |
36 | .flags = IORESOURCE_MEM, | 36 | .flags = IORESOURCE_MEM, |
37 | }, | 37 | }, |
38 | [1] = { | 38 | [1] = { |
@@ -99,6 +99,10 @@ static int __init rsk7203_devices_setup(void) | |||
99 | gpio_request(GPIO_FN_TXD0, NULL); | 99 | gpio_request(GPIO_FN_TXD0, NULL); |
100 | gpio_request(GPIO_FN_RXD0, NULL); | 100 | gpio_request(GPIO_FN_RXD0, NULL); |
101 | 101 | ||
102 | /* Setup LAN9118: CS1 in 16-bit Big Endian Mode, IRQ0 at Port B */ | ||
103 | ctrl_outl(0x36db0400, 0xfffc0008); /* CS1BCR */ | ||
104 | gpio_request(GPIO_FN_IRQ0_PB, NULL); | ||
105 | |||
102 | return platform_add_devices(rsk7203_devices, | 106 | return platform_add_devices(rsk7203_devices, |
103 | ARRAY_SIZE(rsk7203_devices)); | 107 | ARRAY_SIZE(rsk7203_devices)); |
104 | } | 108 | } |
diff --git a/arch/sh/boards/mach-x3proto/setup.c b/arch/sh/boards/mach-x3proto/setup.c index a340492087fa..8913ae39a802 100644 --- a/arch/sh/boards/mach-x3proto/setup.c +++ b/arch/sh/boards/mach-x3proto/setup.c | |||
@@ -15,6 +15,8 @@ | |||
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 <linux/irq.h> |
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/usb/r8a66597.h> | ||
18 | #include <asm/ilsel.h> | 20 | #include <asm/ilsel.h> |
19 | 21 | ||
20 | static struct resource heartbeat_resources[] = { | 22 | static struct resource heartbeat_resources[] = { |
@@ -58,17 +60,20 @@ static struct platform_device smc91x_device = { | |||
58 | }, | 60 | }, |
59 | }; | 61 | }; |
60 | 62 | ||
63 | static struct r8a66597_platdata r8a66597_data = { | ||
64 | .xtal = R8A66597_PLATDATA_XTAL_12MHZ, | ||
65 | .vif = 1, | ||
66 | }; | ||
67 | |||
61 | static struct resource r8a66597_usb_host_resources[] = { | 68 | static struct resource r8a66597_usb_host_resources[] = { |
62 | [0] = { | 69 | [0] = { |
63 | .name = "r8a66597_hcd", | ||
64 | .start = 0x18040000, | 70 | .start = 0x18040000, |
65 | .end = 0x18080000 - 1, | 71 | .end = 0x18080000 - 1, |
66 | .flags = IORESOURCE_MEM, | 72 | .flags = IORESOURCE_MEM, |
67 | }, | 73 | }, |
68 | [1] = { | 74 | [1] = { |
69 | .name = "r8a66597_hcd", | ||
70 | /* Filled in by ilsel */ | 75 | /* Filled in by ilsel */ |
71 | .flags = IORESOURCE_IRQ, | 76 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, |
72 | }, | 77 | }, |
73 | }; | 78 | }; |
74 | 79 | ||
@@ -78,6 +83,7 @@ static struct platform_device r8a66597_usb_host_device = { | |||
78 | .dev = { | 83 | .dev = { |
79 | .dma_mask = NULL, /* don't use dma */ | 84 | .dma_mask = NULL, /* don't use dma */ |
80 | .coherent_dma_mask = 0xffffffff, | 85 | .coherent_dma_mask = 0xffffffff, |
86 | .platform_data = &r8a66597_data, | ||
81 | }, | 87 | }, |
82 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), | 88 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), |
83 | .resource = r8a66597_usb_host_resources, | 89 | .resource = r8a66597_usb_host_resources, |