aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/eseries.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/eseries.c')
-rw-r--r--arch/arm/mach-pxa/eseries.c36
1 files changed, 27 insertions, 9 deletions
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c
index edca0a043293..2e3970fdde0b 100644
--- a/arch/arm/mach-pxa/eseries.c
+++ b/arch/arm/mach-pxa/eseries.c
@@ -20,6 +20,7 @@
20#include <linux/mfd/t7l66xb.h> 20#include <linux/mfd/t7l66xb.h>
21#include <linux/mtd/nand.h> 21#include <linux/mtd/nand.h>
22#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
23#include <linux/usb/gpio_vbus.h>
23 24
24#include <video/w100fb.h> 25#include <video/w100fb.h>
25 26
@@ -51,12 +52,20 @@ void __init eseries_fixup(struct machine_desc *desc,
51 mi->bank[0].size = (64*1024*1024); 52 mi->bank[0].size = (64*1024*1024);
52} 53}
53 54
54struct pxa2xx_udc_mach_info e7xx_udc_mach_info = { 55struct gpio_vbus_mach_info e7xx_udc_info = {
55 .gpio_vbus = GPIO_E7XX_USB_DISC, 56 .gpio_vbus = GPIO_E7XX_USB_DISC,
56 .gpio_pullup = GPIO_E7XX_USB_PULLUP, 57 .gpio_pullup = GPIO_E7XX_USB_PULLUP,
57 .gpio_pullup_inverted = 1 58 .gpio_pullup_inverted = 1
58}; 59};
59 60
61static struct platform_device e7xx_gpio_vbus = {
62 .name = "gpio-vbus",
63 .id = -1,
64 .dev = {
65 .platform_data = &e7xx_udc_info,
66 },
67};
68
60struct pxaficp_platform_data e7xx_ficp_platform_data = { 69struct pxaficp_platform_data e7xx_ficp_platform_data = {
61 .gpio_pwdown = GPIO_E7XX_IR_OFF, 70 .gpio_pwdown = GPIO_E7XX_IR_OFF,
62 .transceiver_cap = IR_SIRMODE | IR_OFF, 71 .transceiver_cap = IR_SIRMODE | IR_OFF,
@@ -165,6 +174,7 @@ static struct platform_device e330_tc6387xb_device = {
165 174
166static struct platform_device *e330_devices[] __initdata = { 175static struct platform_device *e330_devices[] __initdata = {
167 &e330_tc6387xb_device, 176 &e330_tc6387xb_device,
177 &e7xx_gpio_vbus,
168}; 178};
169 179
170static void __init e330_init(void) 180static void __init e330_init(void)
@@ -175,7 +185,6 @@ static void __init e330_init(void)
175 eseries_register_clks(); 185 eseries_register_clks();
176 eseries_get_tmio_gpios(); 186 eseries_get_tmio_gpios();
177 platform_add_devices(ARRAY_AND_SIZE(e330_devices)); 187 platform_add_devices(ARRAY_AND_SIZE(e330_devices));
178 pxa_set_udc_info(&e7xx_udc_mach_info);
179} 188}
180 189
181MACHINE_START(E330, "Toshiba e330") 190MACHINE_START(E330, "Toshiba e330")
@@ -214,6 +223,7 @@ static struct platform_device e350_t7l66xb_device = {
214 223
215static struct platform_device *e350_devices[] __initdata = { 224static struct platform_device *e350_devices[] __initdata = {
216 &e350_t7l66xb_device, 225 &e350_t7l66xb_device,
226 &e7xx_gpio_vbus,
217}; 227};
218 228
219static void __init e350_init(void) 229static void __init e350_init(void)
@@ -224,7 +234,6 @@ static void __init e350_init(void)
224 eseries_register_clks(); 234 eseries_register_clks();
225 eseries_get_tmio_gpios(); 235 eseries_get_tmio_gpios();
226 platform_add_devices(ARRAY_AND_SIZE(e350_devices)); 236 platform_add_devices(ARRAY_AND_SIZE(e350_devices));
227 pxa_set_udc_info(&e7xx_udc_mach_info);
228} 237}
229 238
230MACHINE_START(E350, "Toshiba e350") 239MACHINE_START(E350, "Toshiba e350")
@@ -333,6 +342,7 @@ static struct platform_device e400_t7l66xb_device = {
333 342
334static struct platform_device *e400_devices[] __initdata = { 343static struct platform_device *e400_devices[] __initdata = {
335 &e400_t7l66xb_device, 344 &e400_t7l66xb_device,
345 &e7xx_gpio_vbus,
336}; 346};
337 347
338static void __init e400_init(void) 348static void __init e400_init(void)
@@ -344,9 +354,8 @@ static void __init e400_init(void)
344 /* Fixme - e400 may have a switched clock */ 354 /* Fixme - e400 may have a switched clock */
345 eseries_register_clks(); 355 eseries_register_clks();
346 eseries_get_tmio_gpios(); 356 eseries_get_tmio_gpios();
347 set_pxa_fb_info(&e400_pxafb_mach_info); 357 pxa_set_fb_info(NULL, &e400_pxafb_mach_info);
348 platform_add_devices(ARRAY_AND_SIZE(e400_devices)); 358 platform_add_devices(ARRAY_AND_SIZE(e400_devices));
349 pxa_set_udc_info(&e7xx_udc_mach_info);
350} 359}
351 360
352MACHINE_START(E400, "Toshiba e400") 361MACHINE_START(E400, "Toshiba e400")
@@ -519,6 +528,7 @@ static struct platform_device e740_t7l66xb_device = {
519static struct platform_device *e740_devices[] __initdata = { 528static struct platform_device *e740_devices[] __initdata = {
520 &e740_fb_device, 529 &e740_fb_device,
521 &e740_t7l66xb_device, 530 &e740_t7l66xb_device,
531 &e7xx_gpio_vbus,
522}; 532};
523 533
524static void __init e740_init(void) 534static void __init e740_init(void)
@@ -532,7 +542,6 @@ static void __init e740_init(void)
532 "UDCCLK", &pxa25x_device_udc.dev), 542 "UDCCLK", &pxa25x_device_udc.dev),
533 eseries_get_tmio_gpios(); 543 eseries_get_tmio_gpios();
534 platform_add_devices(ARRAY_AND_SIZE(e740_devices)); 544 platform_add_devices(ARRAY_AND_SIZE(e740_devices));
535 pxa_set_udc_info(&e7xx_udc_mach_info);
536 pxa_set_ac97_info(NULL); 545 pxa_set_ac97_info(NULL);
537 pxa_set_ficp_info(&e7xx_ficp_platform_data); 546 pxa_set_ficp_info(&e7xx_ficp_platform_data);
538} 547}
@@ -711,6 +720,7 @@ static struct platform_device e750_tc6393xb_device = {
711static struct platform_device *e750_devices[] __initdata = { 720static struct platform_device *e750_devices[] __initdata = {
712 &e750_fb_device, 721 &e750_fb_device,
713 &e750_tc6393xb_device, 722 &e750_tc6393xb_device,
723 &e7xx_gpio_vbus,
714}; 724};
715 725
716static void __init e750_init(void) 726static void __init e750_init(void)
@@ -723,7 +733,6 @@ static void __init e750_init(void)
723 "GPIO11_CLK", NULL), 733 "GPIO11_CLK", NULL),
724 eseries_get_tmio_gpios(); 734 eseries_get_tmio_gpios();
725 platform_add_devices(ARRAY_AND_SIZE(e750_devices)); 735 platform_add_devices(ARRAY_AND_SIZE(e750_devices));
726 pxa_set_udc_info(&e7xx_udc_mach_info);
727 pxa_set_ac97_info(NULL); 736 pxa_set_ac97_info(NULL);
728 pxa_set_ficp_info(&e7xx_ficp_platform_data); 737 pxa_set_ficp_info(&e7xx_ficp_platform_data);
729} 738}
@@ -873,12 +882,21 @@ static struct platform_device e800_fb_device = {
873 882
874/* --------------------------- UDC definitions --------------------------- */ 883/* --------------------------- UDC definitions --------------------------- */
875 884
876static struct pxa2xx_udc_mach_info e800_udc_mach_info = { 885static struct gpio_vbus_mach_info e800_udc_info = {
877 .gpio_vbus = GPIO_E800_USB_DISC, 886 .gpio_vbus = GPIO_E800_USB_DISC,
878 .gpio_pullup = GPIO_E800_USB_PULLUP, 887 .gpio_pullup = GPIO_E800_USB_PULLUP,
879 .gpio_pullup_inverted = 1 888 .gpio_pullup_inverted = 1
880}; 889};
881 890
891static struct platform_device e800_gpio_vbus = {
892 .name = "gpio-vbus",
893 .id = -1,
894 .dev = {
895 .platform_data = &e800_udc_info,
896 },
897};
898
899
882/* ----------------- e800 tc6393xb parameters ------------------ */ 900/* ----------------- e800 tc6393xb parameters ------------------ */
883 901
884static struct tc6393xb_platform_data e800_tc6393xb_info = { 902static struct tc6393xb_platform_data e800_tc6393xb_info = {
@@ -907,6 +925,7 @@ static struct platform_device e800_tc6393xb_device = {
907static struct platform_device *e800_devices[] __initdata = { 925static struct platform_device *e800_devices[] __initdata = {
908 &e800_fb_device, 926 &e800_fb_device,
909 &e800_tc6393xb_device, 927 &e800_tc6393xb_device,
928 &e800_gpio_vbus,
910}; 929};
911 930
912static void __init e800_init(void) 931static void __init e800_init(void)
@@ -919,7 +938,6 @@ static void __init e800_init(void)
919 "GPIO11_CLK", NULL), 938 "GPIO11_CLK", NULL),
920 eseries_get_tmio_gpios(); 939 eseries_get_tmio_gpios();
921 platform_add_devices(ARRAY_AND_SIZE(e800_devices)); 940 platform_add_devices(ARRAY_AND_SIZE(e800_devices));
922 pxa_set_udc_info(&e800_udc_mach_info);
923 pxa_set_ac97_info(NULL); 941 pxa_set_ac97_info(NULL);
924} 942}
925 943