aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/davinci.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-09-11 04:53:23 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-17 17:40:59 -0400
commitc767c1c6f1febbd1351cc152bba6e37889322d17 (patch)
tree8385c715dbdeef2b90f11dcef7b3e0dcdf49992a /drivers/usb/musb/davinci.c
parent64ca44a65adf131c4df5124fe0fcdc3896f0f0dc (diff)
usb: musb_hdrc build fixes
Minor musb_hdrc updates: - so it'll build on DaVinci, given relevant platform updates; * remove support for an un-shipped OTG prototype * rely on gpiolib framework conversion for the I2C GPIOs * the <asm/arch/hdrc_cnf.h> mechanism has been removed - catch comments up to the recent removal of the per-SOC header with the silicon configuration data; - and remove two inappropriate "inline" declarations which just bloat host side code. There are still some more <asm/arch/XYZ.h> ==> <mach/XYZ.h> changes needed in this driver, catching up to the relocation of most of the include/asm-arm/arch-* contents. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Cc: stable <stable@kernel.org> [2.6.27] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/davinci.c')
-rw-r--r--drivers/usb/musb/davinci.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 75baf181a8cd..dfb3bcbe00fc 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)