diff options
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/omap_udc.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/s3c2410_udc.c | 16 |
2 files changed, 13 insertions, 9 deletions
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 87c4f50dfb61..d377154658b5 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -1241,14 +1241,14 @@ static void pullup_enable(struct omap_udc *udc) | |||
1241 | udc->gadget.dev.parent->power.power_state = PMSG_ON; | 1241 | udc->gadget.dev.parent->power.power_state = PMSG_ON; |
1242 | udc->gadget.dev.power.power_state = PMSG_ON; | 1242 | udc->gadget.dev.power.power_state = PMSG_ON; |
1243 | UDC_SYSCON1_REG |= UDC_PULLUP_EN; | 1243 | UDC_SYSCON1_REG |= UDC_PULLUP_EN; |
1244 | if (!gadget_is_otg(udc->gadget) && !cpu_is_omap15xx()) | 1244 | if (!gadget_is_otg(&udc->gadget) && !cpu_is_omap15xx()) |
1245 | OTG_CTRL_REG |= OTG_BSESSVLD; | 1245 | OTG_CTRL_REG |= OTG_BSESSVLD; |
1246 | UDC_IRQ_EN_REG = UDC_DS_CHG_IE; | 1246 | UDC_IRQ_EN_REG = UDC_DS_CHG_IE; |
1247 | } | 1247 | } |
1248 | 1248 | ||
1249 | static void pullup_disable(struct omap_udc *udc) | 1249 | static void pullup_disable(struct omap_udc *udc) |
1250 | { | 1250 | { |
1251 | if (!gadget_is_otg(udc->gadget) && !cpu_is_omap15xx()) | 1251 | if (!gadget_is_otg(&udc->gadget) && !cpu_is_omap15xx()) |
1252 | OTG_CTRL_REG &= ~OTG_BSESSVLD; | 1252 | OTG_CTRL_REG &= ~OTG_BSESSVLD; |
1253 | UDC_IRQ_EN_REG = UDC_DS_CHG_IE; | 1253 | UDC_IRQ_EN_REG = UDC_DS_CHG_IE; |
1254 | UDC_SYSCON1_REG &= ~UDC_PULLUP_EN; | 1254 | UDC_SYSCON1_REG &= ~UDC_PULLUP_EN; |
@@ -1386,7 +1386,7 @@ static void update_otg(struct omap_udc *udc) | |||
1386 | { | 1386 | { |
1387 | u16 devstat; | 1387 | u16 devstat; |
1388 | 1388 | ||
1389 | if (!gadget_is_otg(udc->gadget)) | 1389 | if (!gadget_is_otg(&udc->gadget)) |
1390 | return; | 1390 | return; |
1391 | 1391 | ||
1392 | if (OTG_CTRL_REG & OTG_ID) | 1392 | if (OTG_CTRL_REG & OTG_ID) |
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index e3e90f8a75e7..4ce050c3d13f 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c | |||
@@ -52,10 +52,10 @@ | |||
52 | #include <asm/arch/irqs.h> | 52 | #include <asm/arch/irqs.h> |
53 | 53 | ||
54 | #include <asm/arch/hardware.h> | 54 | #include <asm/arch/hardware.h> |
55 | #include <asm/arch/regs-clock.h> | ||
56 | #include <asm/arch/regs-gpio.h> | 55 | #include <asm/arch/regs-gpio.h> |
57 | #include <asm/arch/regs-udc.h> | 56 | |
58 | #include <asm/arch/udc.h> | 57 | #include <asm/plat-s3c24xx/regs-udc.h> |
58 | #include <asm/plat-s3c24xx/udc.h> | ||
59 | 59 | ||
60 | #include <asm/mach-types.h> | 60 | #include <asm/mach-types.h> |
61 | 61 | ||
@@ -1511,7 +1511,11 @@ static irqreturn_t s3c2410_udc_vbus_irq(int irq, void *_dev) | |||
1511 | unsigned int value; | 1511 | unsigned int value; |
1512 | 1512 | ||
1513 | dprintk(DEBUG_NORMAL, "%s()\n", __func__); | 1513 | dprintk(DEBUG_NORMAL, "%s()\n", __func__); |
1514 | |||
1515 | /* some cpus cannot read from an line configured to IRQ! */ | ||
1516 | s3c2410_gpio_cfgpin(udc_info->vbus_pin, S3C2410_GPIO_INPUT); | ||
1514 | value = s3c2410_gpio_getpin(udc_info->vbus_pin); | 1517 | value = s3c2410_gpio_getpin(udc_info->vbus_pin); |
1518 | s3c2410_gpio_cfgpin(udc_info->vbus_pin, S3C2410_GPIO_SFN2); | ||
1515 | 1519 | ||
1516 | if (udc_info->vbus_pin_inverted) | 1520 | if (udc_info->vbus_pin_inverted) |
1517 | value = !value; | 1521 | value = !value; |
@@ -1872,9 +1876,9 @@ static int s3c2410_udc_probe(struct platform_device *pdev) | |||
1872 | if (udc_info && udc_info->vbus_pin > 0) { | 1876 | if (udc_info && udc_info->vbus_pin > 0) { |
1873 | irq = s3c2410_gpio_getirq(udc_info->vbus_pin); | 1877 | irq = s3c2410_gpio_getirq(udc_info->vbus_pin); |
1874 | retval = request_irq(irq, s3c2410_udc_vbus_irq, | 1878 | retval = request_irq(irq, s3c2410_udc_vbus_irq, |
1875 | IRQF_DISABLED | IRQF_TRIGGER_RISING | 1879 | IRQF_DISABLED | IRQF_TRIGGER_RISING |
1876 | | IRQF_TRIGGER_FALLING, | 1880 | | IRQF_TRIGGER_FALLING | IRQF_SHARED, |
1877 | gadget_name, udc); | 1881 | gadget_name, udc); |
1878 | 1882 | ||
1879 | if (retval != 0) { | 1883 | if (retval != 0) { |
1880 | dev_err(dev, "can't get vbus irq %i, err %d\n", | 1884 | dev_err(dev, "can't get vbus irq %i, err %d\n", |