Commit e9d451d3 authored by Frank Xue's avatar Frank Xue

Porting USB driver to osd 2.0 custom board.

parent 35bb380b
......@@ -989,8 +989,8 @@ CONFIG_USB_MUSB_SOC=y
#
# DaVinci 644x USB support
#
# CONFIG_USB_MUSB_HOST is not set
CONFIG_USB_MUSB_PERIPHERAL=y
CONFIG_USB_MUSB_HOST=y
# CONFIG_USB_MUSB_PERIPHERAL=y
# CONFIG_USB_MUSB_OTG is not set
CONFIG_USB_GADGET_MUSB_HDRC=y
# CONFIG_MUSB_PIO_ONLY is not set
......
......@@ -155,6 +155,16 @@ static DECLARE_WORK(evm_vbus_work, evm_deferred_drvvbus);
#endif /* modified board */
#endif /* EVM */
#ifdef CONFIG_MACH_NTOSD_644XA
static void ntosd_644XA_deferred_drvbus(struct work_struct *ignored)
{
gpio_direction_output(GPIO(46),!vbus_state);
gpio_set_value(GPIO(46),!vbus_state);
vbus_state = !vbus_state;
}
static DECLARE_WORK(ntosd_644XA_vbus_work, ntosd_644XA_deferred_drvbus);
#endif
static void davinci_source_power(struct musb *musb, int is_on, int immediate)
{
if (is_on)
......@@ -182,6 +192,15 @@ static void davinci_source_power(struct musb *musb, int is_on, int immediate)
schedule_work(&evm_vbus_work);
#endif
}
#endif
#ifdef CONFIG_MACH_NTOSD_644XA
printk("ntosd_644xa source power: is_on = %d, immediate = %d\n", is_on, immediate);
if(immediate) {
gpio_direction_output(GPIO(46), !is_on);
gpio_set_value(GPIO(46), !is_on);
} else {
schedule_work(&ntosd_644XA_vbus_work);
}
#endif
if (immediate)
vbus_state = is_on;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment