Hello.
Lothar Waßmann wrote:
This code won't compile on ARM, on anything after 2.6.26:
#ifdef CONFIG_ARM
if (isp1362_hcd->board)
set_irq_type(irq, isp1362_hcd->board->int_act_high ? IRQT_RISING : IRQT_FALLING);
#endif
Which is rather odd for a driver primarily meant for ARM systems and
merged in 2.6.32...
(Maybe this one should have gone through staging, Greg?)
Odd. Lothar, any thoughts?
he following patch should fix this, but the currently only users of
the driver according to the defconfigs (blackfin bf527, bf537) all
have IORESOURCE_IRQ_HIGHLEVEL in their IRQ_RESOURCE flags, while the
driver was passing IRQF_TRIGGER_LOW to the usb_add_hcd() function. So
either the setting in the driver or in the platform code was
incorrect.
I added the blackfin maintainer to the 'CC' list for commenting on
this.
Furthermore I could only compile-test the patch (with the
pxa3xx_defconfig), since I don't have any hardware with an ISP1362 any
more.
--- a/drivers/usb/host/isp1362-hcd.c 2009-12-03 04:51:21.000000000 +0100
+++ b/drivers/usb/host/isp1362-hcd.c 2010-01-11 09:38:19.000000000 +0100
[...]
@@ -2711,6 +2711,8 @@
void __iomem *data_reg;
int irq;
int retval = 0;
+ struct resource *irq_res;
+ unsigned int irq_flags = 0;
/* basic sanity checks first. board-specific init logic should
* have initialized this the three resources and probably board
@@ -2724,11 +2726,12 @@
data = platform_get_resource(pdev, IORESOURCE_MEM, 0);
addr = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- irq = platform_get_irq(pdev, 0);
- if (!addr || !data || irq < 0) {
+ irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+ if (!addr || !data || irq_res) {
You surely meant !irq_res here? Otherwise this doesn't make sense.
retval = -ENODEV;
goto err1;
}
+ irq = irq_res->start;
#ifdef CONFIG_USB_HCD_DMA
if (pdev->dev.dma_mask) {
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html