usb: add enum usb_init_type parameter to usb_lowlevel_init
This parameter will later be used to verify OTG ports. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
This commit is contained in:
parent
bba679144d
commit
06d513ecb6
@ -1548,7 +1548,7 @@ static void hc_release_ohci (ohci_t *ohci)
|
||||
*/
|
||||
static char ohci_inited = 0;
|
||||
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
u32 pin_func;
|
||||
u32 sys_freqctrl, sys_clksrc;
|
||||
|
@ -1544,7 +1544,7 @@ static void hc_release_ohci (ohci_t *ohci)
|
||||
*/
|
||||
static char ohci_inited = 0;
|
||||
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
|
||||
/* Set the USB Clock */
|
||||
|
@ -1549,7 +1549,7 @@ static void hc_release_ohci (ohci_t *ohci)
|
||||
*/
|
||||
static char ohci_inited = 0;
|
||||
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
memset (&gohci, 0, sizeof (ohci_t));
|
||||
memset (&urb_priv, 0, sizeof (urb_priv_t));
|
||||
|
@ -688,7 +688,7 @@ void handle_usb_interrupt(void)
|
||||
|
||||
/* init uhci
|
||||
*/
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
unsigned char temp;
|
||||
ambapp_ahbdev ahbdev;
|
||||
|
@ -584,7 +584,7 @@ void handle_usb_interrupt(void)
|
||||
|
||||
/* init uhci
|
||||
*/
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
unsigned char temp;
|
||||
int busdevfunc;
|
||||
|
@ -75,7 +75,7 @@ int usb_init(void)
|
||||
for (i = 0; i < CONFIG_USB_MAX_CONTROLLER_COUNT; i++) {
|
||||
/* init low_level USB */
|
||||
printf("USB%d: ", i);
|
||||
if (usb_lowlevel_init(i, &ctrl)) {
|
||||
if (usb_lowlevel_init(i, USB_INIT_HOST, &ctrl)) {
|
||||
puts("lowlevel init failed\n");
|
||||
continue;
|
||||
}
|
||||
|
@ -692,7 +692,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
|
||||
if (driver->speed != USB_SPEED_FULL && driver->speed != USB_SPEED_HIGH)
|
||||
return -EINVAL;
|
||||
|
||||
ret = usb_lowlevel_init(0, (void **)&controller.ctrl);
|
||||
ret = usb_lowlevel_init(0, USB_INIT_DEVICE, (void **)&controller.ctrl);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -919,7 +919,7 @@ int usb_lowlevel_stop(int index)
|
||||
return ehci_hcd_stop(index);
|
||||
}
|
||||
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
uint32_t reg;
|
||||
uint32_t cmd;
|
||||
|
@ -1377,7 +1377,7 @@ int isp116x_check_id(struct isp116x *isp116x)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usb_lowlevel_init(int index, void **controller))
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller))
|
||||
{
|
||||
struct isp116x *isp116x = &isp116x_dev;
|
||||
|
||||
|
@ -1847,7 +1847,7 @@ static void hc_release_ohci(ohci_t *ohci)
|
||||
*/
|
||||
static char ohci_inited = 0;
|
||||
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
#ifdef CONFIG_PCI_OHCI
|
||||
pci_dev_t pdev;
|
||||
|
@ -1642,7 +1642,7 @@ static void hc_release_ohci(struct ohci *ohci)
|
||||
*/
|
||||
static char ohci_inited = 0;
|
||||
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
struct s3c24x0_clock_power *clk_power = s3c24x0_get_base_clock_power();
|
||||
struct s3c24x0_gpio *gpio = s3c24x0_get_base_gpio();
|
||||
|
@ -903,7 +903,7 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
struct r8a66597 *r8a66597 = &gr8a66597;
|
||||
|
||||
|
@ -194,7 +194,7 @@ static int sl811_hc_reset(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
root_hub_devnum = 0;
|
||||
sl811_hc_reset();
|
||||
|
@ -936,7 +936,7 @@ submit_control_msg(struct usb_device *udev, unsigned long pipe, void *buffer,
|
||||
* @param index index to the host controller data structure
|
||||
* @return pointer to the intialised controller
|
||||
*/
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
uint32_t val;
|
||||
uint32_t val2;
|
||||
|
@ -112,7 +112,7 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe,
|
||||
return submit_urb(&hcd, urb);
|
||||
}
|
||||
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
u8 power;
|
||||
void *mbase;
|
||||
|
@ -1089,7 +1089,7 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
|
||||
/*
|
||||
* This function initializes the usb controller module.
|
||||
*/
|
||||
int usb_lowlevel_init(int index, void **controller)
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
|
||||
{
|
||||
u8 power;
|
||||
u32 timeout;
|
||||
|
@ -152,7 +152,7 @@ enum usb_init_type {
|
||||
defined(CONFIG_USB_MUSB_DSPS) || defined(CONFIG_USB_MUSB_AM35X) || \
|
||||
defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_XHCI)
|
||||
|
||||
int usb_lowlevel_init(int index, void **controller);
|
||||
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller);
|
||||
int usb_lowlevel_stop(int index);
|
||||
|
||||
int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
|
||||
|
Loading…
Reference in New Issue
Block a user