ehci: Replace board_prepare_usb with board_usb_init
Use standard board_usb_init() instead of the specific board_prepare_usb. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
This commit is contained in:
parent
95a077217b
commit
cd8c3aec7f
@ -44,7 +44,7 @@ int dram_init_banksize(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int board_prepare_usb(enum usb_init_type type)
|
int board_usb_init(int index, enum usb_init_type init)
|
||||||
{
|
{
|
||||||
static struct udevice *pmic_gpio;
|
static struct udevice *pmic_gpio;
|
||||||
static struct gpio_desc hub_reset, usb_sel;
|
static struct gpio_desc hub_reset, usb_sel;
|
||||||
@ -93,7 +93,7 @@ int board_prepare_usb(enum usb_init_type type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == USB_INIT_HOST) {
|
if (init == USB_INIT_HOST) {
|
||||||
/* Start USB Hub */
|
/* Start USB Hub */
|
||||||
dm_gpio_set_dir_flags(&hub_reset,
|
dm_gpio_set_dir_flags(&hub_reset,
|
||||||
GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
|
GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
|
||||||
|
@ -38,11 +38,6 @@ struct msm_ehci_priv {
|
|||||||
struct ulpi_viewport ulpi_vp; /* ULPI Viewport */
|
struct ulpi_viewport ulpi_vp; /* ULPI Viewport */
|
||||||
};
|
};
|
||||||
|
|
||||||
int __weak board_prepare_usb(enum usb_init_type type)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setup_usb_phy(struct msm_ehci_priv *priv)
|
static void setup_usb_phy(struct msm_ehci_priv *priv)
|
||||||
{
|
{
|
||||||
/* Select and enable external configuration with USB PHY */
|
/* Select and enable external configuration with USB PHY */
|
||||||
@ -102,7 +97,7 @@ static int ehci_usb_probe(struct udevice *dev)
|
|||||||
hcor = (struct ehci_hcor *)((phys_addr_t)hccr +
|
hcor = (struct ehci_hcor *)((phys_addr_t)hccr +
|
||||||
HC_LENGTH(ehci_readl(&(hccr)->cr_capbase)));
|
HC_LENGTH(ehci_readl(&(hccr)->cr_capbase)));
|
||||||
|
|
||||||
ret = board_prepare_usb(USB_INIT_HOST);
|
ret = board_usb_init(0, USB_INIT_HOST);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -124,7 +119,7 @@ static int ehci_usb_remove(struct udevice *dev)
|
|||||||
|
|
||||||
reset_usb_phy(p);
|
reset_usb_phy(p);
|
||||||
|
|
||||||
ret = board_prepare_usb(USB_INIT_DEVICE); /* Board specific hook */
|
ret = board_usb_init(0, USB_INIT_DEVICE); /* Board specific hook */
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user