aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/Kconfig4
-rw-r--r--drivers/usb/musb/cppi_dma.h4
-rw-r--r--drivers/usb/musb/davinci.c20
-rw-r--r--drivers/usb/musb/musb_core.c8
-rw-r--r--drivers/usb/musb/musb_host.c6
5 files changed, 13 insertions, 29 deletions
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 58b2b8fc943..4b9542bbb35 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -33,10 +33,6 @@ config USB_MUSB_SOC
33 default y if ARCH_DAVINCI 33 default y if ARCH_DAVINCI
34 default y if ARCH_OMAP2430 34 default y if ARCH_OMAP2430
35 default y if ARCH_OMAP34XX 35 default y if ARCH_OMAP34XX
36 help
37 Use a static <asm/arch/hdrc_cnf.h> file to describe how the
38 controller is configured (endpoints, mechanisms, etc) on the
39 current iteration of a given system-on-chip.
40 36
41comment "DaVinci 644x USB support" 37comment "DaVinci 644x USB support"
42 depends on USB_MUSB_HDRC && ARCH_DAVINCI 38 depends on USB_MUSB_HDRC && ARCH_DAVINCI
diff --git a/drivers/usb/musb/cppi_dma.h b/drivers/usb/musb/cppi_dma.h
index fc5216b5d2c..729b4071787 100644
--- a/drivers/usb/musb/cppi_dma.h
+++ b/drivers/usb/musb/cppi_dma.h
@@ -119,8 +119,8 @@ struct cppi {
119 void __iomem *mregs; /* Mentor regs */ 119 void __iomem *mregs; /* Mentor regs */
120 void __iomem *tibase; /* TI/CPPI regs */ 120 void __iomem *tibase; /* TI/CPPI regs */
121 121
122 struct cppi_channel tx[MUSB_C_NUM_EPT - 1]; 122 struct cppi_channel tx[4];
123 struct cppi_channel rx[MUSB_C_NUM_EPR - 1]; 123 struct cppi_channel rx[4];
124 124
125 struct dma_pool *pool; 125 struct dma_pool *pool;
126 126
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 75baf181a8c..dfb3bcbe00f 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -30,6 +30,7 @@
30#include <linux/delay.h> 30#include <linux/delay.h>
31#include <linux/clk.h> 31#include <linux/clk.h>
32#include <linux/io.h> 32#include <linux/io.h>
33#include <linux/gpio.h>
33 34
34#include <asm/arch/hardware.h> 35#include <asm/arch/hardware.h>
35#include <asm/arch/memory.h> 36#include <asm/arch/memory.h>
@@ -39,7 +40,7 @@
39#include "musb_core.h" 40#include "musb_core.h"
40 41
41#ifdef CONFIG_MACH_DAVINCI_EVM 42#ifdef CONFIG_MACH_DAVINCI_EVM
42#include <asm/arch/i2c-client.h> 43#define GPIO_nVBUS_DRV 87
43#endif 44#endif
44 45
45#include "davinci.h" 46#include "davinci.h"
@@ -138,7 +139,6 @@ static int vbus_state = -1;
138/* VBUS SWITCHING IS BOARD-SPECIFIC */ 139/* VBUS SWITCHING IS BOARD-SPECIFIC */
139 140
140#ifdef CONFIG_MACH_DAVINCI_EVM 141#ifdef CONFIG_MACH_DAVINCI_EVM
141#ifndef CONFIG_MACH_DAVINCI_EVM_OTG
142 142
143/* I2C operations are always synchronous, and require a task context. 143/* I2C operations are always synchronous, and require a task context.
144 * With unloaded systems, using the shared workqueue seems to suffice 144 * With unloaded systems, using the shared workqueue seems to suffice
@@ -146,12 +146,11 @@ static int vbus_state = -1;
146 */ 146 */
147static void evm_deferred_drvvbus(struct work_struct *ignored) 147static void evm_deferred_drvvbus(struct work_struct *ignored)
148{ 148{
149 davinci_i2c_expander_op(0x3a, USB_DRVVBUS, vbus_state); 149 gpio_set_value_cansleep(GPIO_nVBUS_DRV, vbus_state);
150 vbus_state = !vbus_state; 150 vbus_state = !vbus_state;
151} 151}
152static DECLARE_WORK(evm_vbus_work, evm_deferred_drvvbus); 152static DECLARE_WORK(evm_vbus_work, evm_deferred_drvvbus);
153 153
154#endif /* modified board */
155#endif /* EVM */ 154#endif /* EVM */
156 155
157static void davinci_source_power(struct musb *musb, int is_on, int immediate) 156static void davinci_source_power(struct musb *musb, int is_on, int immediate)
@@ -165,21 +164,10 @@ static void davinci_source_power(struct musb *musb, int is_on, int immediate)
165 164
166#ifdef CONFIG_MACH_DAVINCI_EVM 165#ifdef CONFIG_MACH_DAVINCI_EVM
167 if (machine_is_davinci_evm()) { 166 if (machine_is_davinci_evm()) {
168#ifdef CONFIG_MACH_DAVINCI_EVM_OTG
169 /* modified EVM board switching VBUS with GPIO(6) not I2C
170 * NOTE: PINMUX0.RGB888 (bit23) must be clear
171 */
172 if (is_on)
173 gpio_set(GPIO(6));
174 else
175 gpio_clear(GPIO(6));
176 immediate = 1;
177#else
178 if (immediate) 167 if (immediate)
179 davinci_i2c_expander_op(0x3a, USB_DRVVBUS, !is_on); 168 gpio_set_value_cansleep(GPIO_nVBUS_DRV, vbus_state);
180 else 169 else
181 schedule_work(&evm_vbus_work); 170 schedule_work(&evm_vbus_work);
182#endif
183 } 171 }
184#endif 172#endif
185 if (immediate) 173 if (immediate)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index bd82253a332..d5af6b0d8af 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -82,9 +82,9 @@
82/* 82/*
83 * This gets many kinds of configuration information: 83 * This gets many kinds of configuration information:
84 * - Kconfig for everything user-configurable 84 * - Kconfig for everything user-configurable
85 * - <asm/arch/hdrc_cnf.h> for SOC or family details
86 * - platform_device for addressing, irq, and platform_data 85 * - platform_device for addressing, irq, and platform_data
87 * - platform_data is mostly for board-specific informarion 86 * - platform_data is mostly for board-specific informarion
87 * (plus recentrly, SOC or family details)
88 * 88 *
89 * Most of the conditional compilation will (someday) vanish. 89 * Most of the conditional compilation will (someday) vanish.
90 */ 90 */
@@ -974,9 +974,9 @@ static void musb_shutdown(struct platform_device *pdev)
974/* 974/*
975 * The silicon either has hard-wired endpoint configurations, or else 975 * The silicon either has hard-wired endpoint configurations, or else
976 * "dynamic fifo" sizing. The driver has support for both, though at this 976 * "dynamic fifo" sizing. The driver has support for both, though at this
977 * writing only the dynamic sizing is very well tested. We use normal 977 * writing only the dynamic sizing is very well tested. Since we switched
978 * idioms to so both modes are compile-tested, but dead code elimination 978 * away from compile-time hardware parameters, we can no longer rely on
979 * leaves only the relevant one in the object file. 979 * dead code elimination to leave only the relevant one in the object file.
980 * 980 *
981 * We don't currently use dynamic fifo setup capability to do anything 981 * We don't currently use dynamic fifo setup capability to do anything
982 * more than selecting one of a bunch of predefined configurations. 982 * more than selecting one of a bunch of predefined configurations.
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 17b5c189250..3133990f04e 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -108,7 +108,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
108/* 108/*
109 * Clear TX fifo. Needed to avoid BABBLE errors. 109 * Clear TX fifo. Needed to avoid BABBLE errors.
110 */ 110 */
111static inline void musb_h_tx_flush_fifo(struct musb_hw_ep *ep) 111static void musb_h_tx_flush_fifo(struct musb_hw_ep *ep)
112{ 112{
113 void __iomem *epio = ep->regs; 113 void __iomem *epio = ep->regs;
114 u16 csr; 114 u16 csr;
@@ -435,7 +435,7 @@ musb_advance_schedule(struct musb *musb, struct urb *urb,
435 } 435 }
436} 436}
437 437
438static inline u16 musb_h_flush_rxfifo(struct musb_hw_ep *hw_ep, u16 csr) 438static u16 musb_h_flush_rxfifo(struct musb_hw_ep *hw_ep, u16 csr)
439{ 439{
440 /* we don't want fifo to fill itself again; 440 /* we don't want fifo to fill itself again;
441 * ignore dma (various models), 441 * ignore dma (various models),
@@ -1004,7 +1004,7 @@ static bool musb_h_ep0_continue(struct musb *musb, u16 len, struct urb *urb)
1004 1004
1005/* 1005/*
1006 * Handle default endpoint interrupt as host. Only called in IRQ time 1006 * Handle default endpoint interrupt as host. Only called in IRQ time
1007 * from the LinuxIsr() interrupt service routine. 1007 * from musb_interrupt().
1008 * 1008 *
1009 * called with controller irqlocked 1009 * called with controller irqlocked
1010 */ 1010 */