Diff
Modified: trunk/arch/blackfin/mach-bf537/boards/stamp.c (5842 => 5843)
--- trunk/arch/blackfin/mach-bf537/boards/stamp.c 2008-12-09 13:12:10 UTC (rev 5842)
+++ trunk/arch/blackfin/mach-bf537/boards/stamp.c 2008-12-09 15:23:10 UTC (rev 5843)
@@ -73,7 +73,7 @@
[1] = {
.start = IRQ_PF7,
.end = IRQ_PF7,
- .flags = IORESOURCE_IRQ,
+ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
},
};
Modified: trunk/drivers/usb/host/Kconfig (5842 => 5843)
--- trunk/drivers/usb/host/Kconfig 2008-12-09 13:12:10 UTC (rev 5842)
+++ trunk/drivers/usb/host/Kconfig 2008-12-09 15:23:10 UTC (rev 5843)
@@ -110,7 +110,7 @@
config USB_ISP1760_HCD
tristate "ISP 1760 HCD support"
- depends on USB && EXPERIMENTAL && (PCI || PPC_OF)
+ depends on USB && EXPERIMENTAL
---help---
The ISP1760 chip is a USB 2.0 host controller.
@@ -123,12 +123,6 @@
To compile this driver as a module, choose M here: the
module will be called isp1760.
-config USB_ISP1760_PDEV
- bool "Support for the generic platfrom device driver model"
- depends on USB_ISP1760_HCD
- ---help---
- Enables support for the generic platfrom device centralized driver model
-
config USB_ISP1362_HCD
tristate "ISP1362 HCD support"
depends on USB
Modified: trunk/drivers/usb/host/isp1760-hcd.c (5842 => 5843)
--- trunk/drivers/usb/host/isp1760-hcd.c 2008-12-09 13:12:10 UTC (rev 5842)
+++ trunk/drivers/usb/host/isp1760-hcd.c 2008-12-09 15:23:10 UTC (rev 5843)
@@ -150,7 +150,7 @@
src++;
dst++;
}
- }
+ }
if (!len)
return;
@@ -182,15 +182,15 @@
src++;
dst++;
}
-
+
if (!len)
return;
/* in case we have 3, 2 or 1 by left. The buffer is allocated and the
* extra bytes should not be read by the HW
*/
-
+
__raw_writel(get_unaligned(src), dst);
-
+
} else{
while (len >= 4) {
__raw_writel(*src, dst);
@@ -198,14 +198,14 @@
src++;
dst++;
}
-
+
if (!len)
return;
/* in case we have 3, 2 or 1 by left. The buffer is allocated and the
* extra bytes should not be read by the HW
*/
-
- __raw_writel(*src, dst);
+
+ __raw_writel(*src, dst);
}
}
@@ -415,6 +415,10 @@
hwmode |= HW_DACK_POL_HIGH;
if (priv->devflags & ISP1760_FLAG_DREQ_POL_HIGH)
hwmode |= HW_DREQ_POL_HIGH;
+ if (priv->devflags & ISP1760_FLAG_INTR_POL_HIGH)
+ hwmode |= HW_INTR_HIGH_ACT;
+ if (priv->devflags & ISP1760_FLAG_INTR_EDGE_TRIG)
+ hwmode |= HW_INTR_EDGE_TRIG;
/*
* We have to set this first in case we're in 16-bit mode.
Modified: trunk/drivers/usb/host/isp1760-hcd.h (5842 => 5843)
--- trunk/drivers/usb/host/isp1760-hcd.h 2008-12-09 13:12:10 UTC (rev 5842)
+++ trunk/drivers/usb/host/isp1760-hcd.h 2008-12-09 15:23:10 UTC (rev 5843)
@@ -142,6 +142,8 @@
#define ISP1760_FLAG_DACK_POL_HIGH 0x00000010 /* DACK active high */
#define ISP1760_FLAG_DREQ_POL_HIGH 0x00000020 /* DREQ active high */
#define ISP1760_FLAG_ISP1761 0x00000040 /* Chip is ISP1761 */
+#define ISP1760_FLAG_INTR_POL_HIGH 0x00000080 /* Interrupt polarity active high */
+#define ISP1760_FLAG_INTR_EDGE_TRIG 0x00000100 /* Interrupt edge triggered */
/* chip memory management */
struct memory_chunk {
Modified: trunk/drivers/usb/host/isp1760-if.c (5842 => 5843)
--- trunk/drivers/usb/host/isp1760-if.c 2008-12-09 13:12:10 UTC (rev 5842)
+++ trunk/drivers/usb/host/isp1760-if.c 2008-12-09 15:23:10 UTC (rev 5843)
@@ -24,10 +24,10 @@
#include <linux/pci.h>
#endif
-
-#ifdef CONFIG_USB_ISP1760_PDEV
+#if !defined(CONFIG_PPC_OF) || !defined(CONFIG_PCI)
#include <linux/platform_device.h>
#include <linux/usb/isp1760.h>
+#define USB_ISP1760_PDEV
#endif
#ifdef CONFIG_PPC_OF
@@ -293,7 +293,7 @@
};
#endif
-#ifdef CONFIG_USB_ISP1760_PDEV
+#ifdef USB_ISP1760_PDEV
static int __devinit isp1760_pdev_probe(struct platform_device *pdev)
{
struct usb_hcd *hcd;
@@ -301,7 +301,10 @@
int irq;
unsigned int devflags = 0;
struct isp1760_platform_data *priv = pdev->dev.platform_data;
+ struct resource *irq_res;
+ unsigned long flags;
+
/* basic sanity checks first. board-specific init logic should
* have initialized these two resources and probably board
* specific platform_data. we don't probe for IRQs, and do only
@@ -315,8 +318,21 @@
return -ENODEV;
addr = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- irq = platform_get_irq(pdev, 0);
+ irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+
+ flags = ((irq_res->flags & IRQF_TRIGGER_MASK) |
+ ((irq_res->flags & IORESOURCE_IRQ_SHAREABLE) ?
+ IRQF_SHARED : 0));
+
+ if ((irq_res->flags & (IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE)))
+ devflags |= ISP1760_FLAG_INTR_EDGE_TRIG;
+
+ if ((irq_res->flags & (IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_HIGHLEVEL)))
+ devflags |= ISP1760_FLAG_INTR_POL_HIGH;
+
+ irq = irq_res->start;
+
if (!addr || irq < 0)
return -ENODEV;
@@ -338,9 +354,8 @@
}
hcd = isp1760_register(addr->start, resource_size(addr), irq,
- IRQF_DISABLED | IRQF_SHARED | IRQF_TRIGGER_LOW,
- &pdev->dev, dev_name(&pdev->dev),
- devflags);
+ IRQF_DISABLED | flags,
+ &pdev->dev, dev_name(&pdev->dev), devflags);
if (IS_ERR(hcd))
return PTR_ERR(hcd);
@@ -369,7 +384,7 @@
.owner = THIS_MODULE,
},
};
-#endif /* CONFIG_USB_ISP1760_PDEV */
+#endif /* USB_ISP1760_PDEV */
static int __init isp1760_init(void)
{
@@ -377,7 +392,7 @@
init_kmem_once();
-#ifdef CONFIG_USB_ISP1760_PDEV
+#ifdef USB_ISP1760_PDEV
ret = platform_driver_register(&isp1760_pdev_driver);
if (ret) {
deinit_kmem_cache();
@@ -418,7 +433,7 @@
#ifdef CONFIG_PCI
pci_unregister_driver(&isp1761_pci_driver);
#endif
-#ifdef CONFIG_USB_ISP1760_PDEV
+#ifdef USB_ISP1760_PDEV
platform_driver_unregister(&isp1760_pdev_driver);
#endif
deinit_kmem_cache();