at91: usb: allow to specicfy inverted vbus
add missing vbus to all SoC Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
074964830b
commit
b01ded9a97
|
@ -37,9 +37,18 @@ void at91_add_device_sdram(u32 size)
|
|||
#if defined(CONFIG_USB_OHCI)
|
||||
void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
/* Enable VBus control for UHP ports */
|
||||
for (i = 0; i < data->ports; i++) {
|
||||
if (gpio_is_valid(data->vbus_pin[i]))
|
||||
at91_set_gpio_output(data->vbus_pin[i],
|
||||
data->vbus_pin_active_low[i]);
|
||||
}
|
||||
|
||||
add_generic_device("at91_ohci", DEVICE_ID_DYNAMIC, NULL, AT91RM9200_UHP_BASE,
|
||||
1024 * 1024, IORESOURCE_MEM, data);
|
||||
}
|
||||
|
|
|
@ -42,9 +42,18 @@ void at91_add_device_sdram(u32 size)
|
|||
#if defined(CONFIG_USB_OHCI)
|
||||
void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
/* Enable VBus control for UHP ports */
|
||||
for (i = 0; i < data->ports; i++) {
|
||||
if (gpio_is_valid(data->vbus_pin[i]))
|
||||
at91_set_gpio_output(data->vbus_pin[i],
|
||||
data->vbus_pin_active_low[i]);
|
||||
}
|
||||
|
||||
add_generic_device("at91_ohci", DEVICE_ID_DYNAMIC, NULL, AT91SAM9260_UHP_BASE,
|
||||
1024 * 1024, IORESOURCE_MEM, data);
|
||||
}
|
||||
|
|
|
@ -45,9 +45,18 @@ void at91_add_device_sdram(u32 size)
|
|||
#if defined(CONFIG_USB_OHCI)
|
||||
void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
/* Enable VBus control for UHP ports */
|
||||
for (i = 0; i < data->ports; i++) {
|
||||
if (gpio_is_valid(data->vbus_pin[i]))
|
||||
at91_set_gpio_output(data->vbus_pin[i],
|
||||
data->vbus_pin_active_low[i]);
|
||||
}
|
||||
|
||||
add_generic_device("at91_ohci", DEVICE_ID_DYNAMIC, NULL, AT91SAM9261_UHP_BASE,
|
||||
1024 * 1024, IORESOURCE_MEM, data);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,8 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
|
|||
/* Enable VBus control for UHP ports */
|
||||
for (i = 0; i < data->ports; i++) {
|
||||
if (gpio_is_valid(data->vbus_pin[i]))
|
||||
at91_set_gpio_output(data->vbus_pin[i], 0);
|
||||
at91_set_gpio_output(data->vbus_pin[i],
|
||||
data->vbus_pin_active_low[i]);
|
||||
}
|
||||
|
||||
add_generic_device("at91_ohci", DEVICE_ID_DYNAMIC, NULL, AT91SAM9263_UHP_BASE,
|
||||
|
|
|
@ -44,7 +44,8 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
|
|||
/* Enable VBus control for UHP ports */
|
||||
for (i = 0; i < data->ports; i++) {
|
||||
if (gpio_is_valid(data->vbus_pin[i]))
|
||||
at91_set_gpio_output(data->vbus_pin[i], 0);
|
||||
at91_set_gpio_output(data->vbus_pin[i],
|
||||
data->vbus_pin_active_low[i]);
|
||||
}
|
||||
|
||||
add_generic_device("at91_ohci", DEVICE_ID_DYNAMIC, NULL, AT91SAM9G45_OHCI_BASE,
|
||||
|
|
|
@ -46,7 +46,8 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
|
|||
/* Enable VBus control for UHP ports */
|
||||
for (i = 0; i < data->ports; i++) {
|
||||
if (gpio_is_valid(data->vbus_pin[i]))
|
||||
at91_set_gpio_output(data->vbus_pin[i], 0);
|
||||
at91_set_gpio_output(data->vbus_pin[i],
|
||||
data->vbus_pin_active_low[i]);
|
||||
}
|
||||
|
||||
add_generic_device("at91_ohci", DEVICE_ID_DYNAMIC, NULL, AT91SAM9N12_OHCI_BASE,
|
||||
|
|
|
@ -45,7 +45,8 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
|
|||
/* Enable VBus control for UHP ports */
|
||||
for (i = 0; i < data->ports; i++) {
|
||||
if (gpio_is_valid(data->vbus_pin[i]))
|
||||
at91_set_gpio_output(data->vbus_pin[i], 0);
|
||||
at91_set_gpio_output(data->vbus_pin[i],
|
||||
data->vbus_pin_active_low[i]);
|
||||
}
|
||||
|
||||
add_generic_device("at91_ohci", DEVICE_ID_DYNAMIC, NULL, AT91SAM9X5_OHCI_BASE,
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
struct at91_usbh_data {
|
||||
u8 ports; /* number of ports on root hub */
|
||||
int vbus_pin[2]; /* port power-control pin */
|
||||
u8 vbus_pin_active_low[2]; /* vbus polarity */
|
||||
};
|
||||
extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data);
|
||||
|
||||
|
|
Loading…
Reference in New Issue