aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1362-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/isp1362-hcd.c')
-rw-r--r--drivers/usb/host/isp1362-hcd.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index 73352f3739b5..42971657fde2 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -2270,10 +2270,10 @@ static int isp1362_mem_config(struct usb_hcd *hcd)
2270 dev_info(hcd->self.controller, "ISP1362 Memory usage:\n"); 2270 dev_info(hcd->self.controller, "ISP1362 Memory usage:\n");
2271 dev_info(hcd->self.controller, " ISTL: 2 * %4d: %4d @ $%04x:$%04x\n", 2271 dev_info(hcd->self.controller, " ISTL: 2 * %4d: %4d @ $%04x:$%04x\n",
2272 istl_size / 2, istl_size, 0, istl_size / 2); 2272 istl_size / 2, istl_size, 0, istl_size / 2);
2273 dev_info(hcd->self.controller, " INTL: %4d * (%3lu+8): %4d @ $%04x\n", 2273 dev_info(hcd->self.controller, " INTL: %4d * (%3zu+8): %4d @ $%04x\n",
2274 ISP1362_INTL_BUFFERS, intl_blksize - PTD_HEADER_SIZE, 2274 ISP1362_INTL_BUFFERS, intl_blksize - PTD_HEADER_SIZE,
2275 intl_size, istl_size); 2275 intl_size, istl_size);
2276 dev_info(hcd->self.controller, " ATL : %4d * (%3lu+8): %4d @ $%04x\n", 2276 dev_info(hcd->self.controller, " ATL : %4d * (%3zu+8): %4d @ $%04x\n",
2277 atl_buffers, atl_blksize - PTD_HEADER_SIZE, 2277 atl_buffers, atl_blksize - PTD_HEADER_SIZE,
2278 atl_size, istl_size + intl_size); 2278 atl_size, istl_size + intl_size);
2279 dev_info(hcd->self.controller, " USED/FREE: %4d %4d\n", total, 2279 dev_info(hcd->self.controller, " USED/FREE: %4d %4d\n", total,
@@ -2697,6 +2697,8 @@ static int __init isp1362_probe(struct platform_device *pdev)
2697 void __iomem *data_reg; 2697 void __iomem *data_reg;
2698 int irq; 2698 int irq;
2699 int retval = 0; 2699 int retval = 0;
2700 struct resource *irq_res;
2701 unsigned int irq_flags = 0;
2700 2702
2701 /* basic sanity checks first. board-specific init logic should 2703 /* basic sanity checks first. board-specific init logic should
2702 * have initialized this the three resources and probably board 2704 * have initialized this the three resources and probably board
@@ -2710,11 +2712,12 @@ static int __init isp1362_probe(struct platform_device *pdev)
2710 2712
2711 data = platform_get_resource(pdev, IORESOURCE_MEM, 0); 2713 data = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2712 addr = platform_get_resource(pdev, IORESOURCE_MEM, 1); 2714 addr = platform_get_resource(pdev, IORESOURCE_MEM, 1);
2713 irq = platform_get_irq(pdev, 0); 2715 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
2714 if (!addr || !data || irq < 0) { 2716 if (!addr || !data || !irq_res) {
2715 retval = -ENODEV; 2717 retval = -ENODEV;
2716 goto err1; 2718 goto err1;
2717 } 2719 }
2720 irq = irq_res->start;
2718 2721
2719#ifdef CONFIG_USB_HCD_DMA 2722#ifdef CONFIG_USB_HCD_DMA
2720 if (pdev->dev.dma_mask) { 2723 if (pdev->dev.dma_mask) {
@@ -2781,12 +2784,16 @@ static int __init isp1362_probe(struct platform_device *pdev)
2781 } 2784 }
2782#endif 2785#endif
2783 2786
2784#ifdef CONFIG_ARM 2787 if (irq_res->flags & IORESOURCE_IRQ_HIGHEDGE)
2785 if (isp1362_hcd->board) 2788 irq_flags |= IRQF_TRIGGER_RISING;
2786 set_irq_type(irq, isp1362_hcd->board->int_act_high ? IRQT_RISING : IRQT_FALLING); 2789 if (irq_res->flags & IORESOURCE_IRQ_LOWEDGE)
2787#endif 2790 irq_flags |= IRQF_TRIGGER_FALLING;
2791 if (irq_res->flags & IORESOURCE_IRQ_HIGHLEVEL)
2792 irq_flags |= IRQF_TRIGGER_HIGH;
2793 if (irq_res->flags & IORESOURCE_IRQ_LOWLEVEL)
2794 irq_flags |= IRQF_TRIGGER_LOW;
2788 2795
2789 retval = usb_add_hcd(hcd, irq, IRQF_TRIGGER_LOW | IRQF_DISABLED | IRQF_SHARED); 2796 retval = usb_add_hcd(hcd, irq, irq_flags | IRQF_DISABLED | IRQF_SHARED);
2790 if (retval != 0) 2797 if (retval != 0)
2791 goto err6; 2798 goto err6;
2792 pr_info("%s, irq %d\n", hcd->product_desc, irq); 2799 pr_info("%s, irq %d\n", hcd->product_desc, irq);