diff options
author | Philipp Zabel <philipp.zabel@gmail.com> | 2009-02-01 05:20:30 -0500 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2009-02-02 03:48:43 -0500 |
commit | 6489c611db095356645ca1a2689e93c63caeb310 (patch) | |
tree | 3811ef0a65f5cde6740d870fc03b0c0d557b715a /arch | |
parent | 51c10bbc3d7d700acd25a004d58a51067983acb6 (diff) |
[ARM] pxa/magician: Enable pxa27x_udc and gpio_vbus
This patch depends on otg_transceiver support in pxa27x_udc
(which is queued via linux-usb) to work.
It compiles also without it.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/configs/magician_defconfig | 56 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/magician.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/magician.c | 35 |
3 files changed, 79 insertions, 14 deletions
diff --git a/arch/arm/configs/magician_defconfig b/arch/arm/configs/magician_defconfig index dde50df09bce..4154d61af664 100644 --- a/arch/arm/configs/magician_defconfig +++ b/arch/arm/configs/magician_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.29-rc2 | 3 | # Linux kernel version: 2.6.29-rc3 |
4 | # Sat Jan 17 17:47:17 2009 | 4 | # Fri Jan 30 12:42:03 2009 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_HAVE_PWM=y | 7 | CONFIG_HAVE_PWM=y |
@@ -44,6 +44,15 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
44 | # CONFIG_BSD_PROCESS_ACCT is not set | 44 | # CONFIG_BSD_PROCESS_ACCT is not set |
45 | # CONFIG_TASKSTATS is not set | 45 | # CONFIG_TASKSTATS is not set |
46 | # CONFIG_AUDIT is not set | 46 | # CONFIG_AUDIT is not set |
47 | |||
48 | # | ||
49 | # RCU Subsystem | ||
50 | # | ||
51 | CONFIG_CLASSIC_RCU=y | ||
52 | # CONFIG_TREE_RCU is not set | ||
53 | # CONFIG_PREEMPT_RCU is not set | ||
54 | # CONFIG_TREE_RCU_TRACE is not set | ||
55 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
47 | CONFIG_IKCONFIG=y | 56 | CONFIG_IKCONFIG=y |
48 | CONFIG_IKCONFIG_PROC=y | 57 | CONFIG_IKCONFIG_PROC=y |
49 | CONFIG_LOG_BUF_SHIFT=16 | 58 | CONFIG_LOG_BUF_SHIFT=16 |
@@ -114,11 +123,6 @@ CONFIG_IOSCHED_NOOP=y | |||
114 | # CONFIG_DEFAULT_CFQ is not set | 123 | # CONFIG_DEFAULT_CFQ is not set |
115 | CONFIG_DEFAULT_NOOP=y | 124 | CONFIG_DEFAULT_NOOP=y |
116 | CONFIG_DEFAULT_IOSCHED="noop" | 125 | CONFIG_DEFAULT_IOSCHED="noop" |
117 | CONFIG_CLASSIC_RCU=y | ||
118 | # CONFIG_TREE_RCU is not set | ||
119 | # CONFIG_PREEMPT_RCU is not set | ||
120 | # CONFIG_TREE_RCU_TRACE is not set | ||
121 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
122 | CONFIG_FREEZER=y | 126 | CONFIG_FREEZER=y |
123 | 127 | ||
124 | # | 128 | # |
@@ -993,6 +997,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
993 | # CONFIG_USB_R8A66597_HCD is not set | 997 | # CONFIG_USB_R8A66597_HCD is not set |
994 | # CONFIG_USB_HWA_HCD is not set | 998 | # CONFIG_USB_HWA_HCD is not set |
995 | # CONFIG_USB_MUSB_HDRC is not set | 999 | # CONFIG_USB_MUSB_HDRC is not set |
1000 | # CONFIG_USB_GADGET_MUSB_HDRC is not set | ||
996 | 1001 | ||
997 | # | 1002 | # |
998 | # USB Device Class drivers | 1003 | # USB Device Class drivers |
@@ -1044,12 +1049,45 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
1044 | # CONFIG_USB_IOWARRIOR is not set | 1049 | # CONFIG_USB_IOWARRIOR is not set |
1045 | # CONFIG_USB_ISIGHTFW is not set | 1050 | # CONFIG_USB_ISIGHTFW is not set |
1046 | # CONFIG_USB_VST is not set | 1051 | # CONFIG_USB_VST is not set |
1047 | # CONFIG_USB_GADGET is not set | 1052 | CONFIG_USB_GADGET=y |
1053 | # CONFIG_USB_GADGET_DEBUG is not set | ||
1054 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | ||
1055 | CONFIG_USB_GADGET_VBUS_DRAW=500 | ||
1056 | CONFIG_USB_GADGET_SELECTED=y | ||
1057 | # CONFIG_USB_GADGET_AT91 is not set | ||
1058 | # CONFIG_USB_GADGET_ATMEL_USBA is not set | ||
1059 | # CONFIG_USB_GADGET_FSL_USB2 is not set | ||
1060 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
1061 | # CONFIG_USB_GADGET_OMAP is not set | ||
1062 | # CONFIG_USB_GADGET_PXA25X is not set | ||
1063 | CONFIG_USB_GADGET_PXA27X=y | ||
1064 | CONFIG_USB_PXA27X=y | ||
1065 | # CONFIG_USB_GADGET_S3C2410 is not set | ||
1066 | # CONFIG_USB_GADGET_IMX is not set | ||
1067 | # CONFIG_USB_GADGET_M66592 is not set | ||
1068 | # CONFIG_USB_GADGET_AMD5536UDC is not set | ||
1069 | # CONFIG_USB_GADGET_FSL_QE is not set | ||
1070 | # CONFIG_USB_GADGET_CI13XXX is not set | ||
1071 | # CONFIG_USB_GADGET_NET2280 is not set | ||
1072 | # CONFIG_USB_GADGET_GOKU is not set | ||
1073 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
1074 | # CONFIG_USB_GADGET_DUALSPEED is not set | ||
1075 | # CONFIG_USB_ZERO is not set | ||
1076 | CONFIG_USB_ETH=m | ||
1077 | # CONFIG_USB_ETH_RNDIS is not set | ||
1078 | CONFIG_USB_GADGETFS=m | ||
1079 | CONFIG_USB_FILE_STORAGE=m | ||
1080 | # CONFIG_USB_FILE_STORAGE_TEST is not set | ||
1081 | CONFIG_USB_G_SERIAL=m | ||
1082 | # CONFIG_USB_MIDI_GADGET is not set | ||
1083 | # CONFIG_USB_G_PRINTER is not set | ||
1084 | CONFIG_USB_CDC_COMPOSITE=m | ||
1048 | 1085 | ||
1049 | # | 1086 | # |
1050 | # OTG and related infrastructure | 1087 | # OTG and related infrastructure |
1051 | # | 1088 | # |
1052 | # CONFIG_USB_GPIO_VBUS is not set | 1089 | CONFIG_USB_OTG_UTILS=y |
1090 | CONFIG_USB_GPIO_VBUS=y | ||
1053 | CONFIG_MMC=y | 1091 | CONFIG_MMC=y |
1054 | # CONFIG_MMC_DEBUG is not set | 1092 | # CONFIG_MMC_DEBUG is not set |
1055 | # CONFIG_MMC_UNSAFE_RESUME is not set | 1093 | # CONFIG_MMC_UNSAFE_RESUME is not set |
diff --git a/arch/arm/mach-pxa/include/mach/magician.h b/arch/arm/mach-pxa/include/mach/magician.h index 38d68d99f585..82a399f3f9f2 100644 --- a/arch/arm/mach-pxa/include/mach/magician.h +++ b/arch/arm/mach-pxa/include/mach/magician.h | |||
@@ -69,7 +69,7 @@ | |||
69 | #define IRQ_MAGICIAN_SD (IRQ_BOARD_START + 0) | 69 | #define IRQ_MAGICIAN_SD (IRQ_BOARD_START + 0) |
70 | #define IRQ_MAGICIAN_EP (IRQ_BOARD_START + 1) | 70 | #define IRQ_MAGICIAN_EP (IRQ_BOARD_START + 1) |
71 | #define IRQ_MAGICIAN_BT (IRQ_BOARD_START + 2) | 71 | #define IRQ_MAGICIAN_BT (IRQ_BOARD_START + 2) |
72 | #define IRQ_MAGICIAN_AC (IRQ_BOARD_START + 3) | 72 | #define IRQ_MAGICIAN_VBUS (IRQ_BOARD_START + 3) |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * CPLD EGPIOs | 75 | * CPLD EGPIOs |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index b7aafe6823f7..af464870c129 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
26 | #include <linux/pda_power.h> | 26 | #include <linux/pda_power.h> |
27 | #include <linux/pwm_backlight.h> | 27 | #include <linux/pwm_backlight.h> |
28 | #include <linux/usb/gpio_vbus.h> | ||
28 | 29 | ||
29 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
@@ -525,6 +526,31 @@ static struct platform_device pasic3 = { | |||
525 | }; | 526 | }; |
526 | 527 | ||
527 | /* | 528 | /* |
529 | * USB "Transceiver" | ||
530 | */ | ||
531 | |||
532 | static struct resource gpio_vbus_resource = { | ||
533 | .flags = IORESOURCE_IRQ, | ||
534 | .start = IRQ_MAGICIAN_VBUS, | ||
535 | .end = IRQ_MAGICIAN_VBUS, | ||
536 | }; | ||
537 | |||
538 | static struct gpio_vbus_mach_info gpio_vbus_info = { | ||
539 | .gpio_pullup = GPIO27_MAGICIAN_USBC_PUEN, | ||
540 | .gpio_vbus = EGPIO_MAGICIAN_CABLE_STATE_USB, | ||
541 | }; | ||
542 | |||
543 | static struct platform_device gpio_vbus = { | ||
544 | .name = "gpio-vbus", | ||
545 | .id = -1, | ||
546 | .num_resources = 1, | ||
547 | .resource = &gpio_vbus_resource, | ||
548 | .dev = { | ||
549 | .platform_data = &gpio_vbus_info, | ||
550 | }, | ||
551 | }; | ||
552 | |||
553 | /* | ||
528 | * External power | 554 | * External power |
529 | */ | 555 | */ |
530 | 556 | ||
@@ -601,14 +627,14 @@ static struct resource power_supply_resources[] = { | |||
601 | [0] = { | 627 | [0] = { |
602 | .name = "ac", | 628 | .name = "ac", |
603 | .flags = IORESOURCE_IRQ, | 629 | .flags = IORESOURCE_IRQ, |
604 | .start = IRQ_MAGICIAN_AC, | 630 | .start = IRQ_MAGICIAN_VBUS, |
605 | .end = IRQ_MAGICIAN_AC, | 631 | .end = IRQ_MAGICIAN_VBUS, |
606 | }, | 632 | }, |
607 | [1] = { | 633 | [1] = { |
608 | .name = "usb", | 634 | .name = "usb", |
609 | .flags = IORESOURCE_IRQ, | 635 | .flags = IORESOURCE_IRQ, |
610 | .start = IRQ_MAGICIAN_AC, | 636 | .start = IRQ_MAGICIAN_VBUS, |
611 | .end = IRQ_MAGICIAN_AC, | 637 | .end = IRQ_MAGICIAN_VBUS, |
612 | }, | 638 | }, |
613 | }; | 639 | }; |
614 | 640 | ||
@@ -732,6 +758,7 @@ static struct platform_device *devices[] __initdata = { | |||
732 | &egpio, | 758 | &egpio, |
733 | &backlight, | 759 | &backlight, |
734 | &pasic3, | 760 | &pasic3, |
761 | &gpio_vbus, | ||
735 | &power_supply, | 762 | &power_supply, |
736 | &strataflash, | 763 | &strataflash, |
737 | &leds_gpio, | 764 | &leds_gpio, |