|
@@ -570,6 +570,16 @@ static int __devinit ohci_hcd_at91_drv_probe(struct platform_device *pdev)
|
|
|
|
|
|
if (pdata) {
|
|
if (pdata) {
|
|
at91_for_each_port(i) {
|
|
at91_for_each_port(i) {
|
|
|
|
+ /*
|
|
|
|
+ * do not configure PIO if not in relation with
|
|
|
|
+ * real USB port on board
|
|
|
|
+ */
|
|
|
|
+ if (i >= pdata->ports) {
|
|
|
|
+ pdata->vbus_pin[i] = -EINVAL;
|
|
|
|
+ pdata->overcurrent_pin[i] = -EINVAL;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!gpio_is_valid(pdata->vbus_pin[i]))
|
|
if (!gpio_is_valid(pdata->vbus_pin[i]))
|
|
continue;
|
|
continue;
|
|
gpio = pdata->vbus_pin[i];
|
|
gpio = pdata->vbus_pin[i];
|