Page MenuHomeFreeBSD

D4369.id10905.diff
No OneTemporary

D4369.id10905.diff

Index: sys/dev/usb/controller/ehci_mv.c
===================================================================
--- sys/dev/usb/controller/ehci_mv.c
+++ sys/dev/usb/controller/ehci_mv.c
@@ -99,6 +99,12 @@
#define MV_USB_HOST_OVERFLOW (1 << 2)
#define MV_USB_DEVICE_UNDERFLOW (1 << 3)
+static struct ofw_compat_data compat_data[] = {
+ {"mrvl,usb-ehci", true},
+ {"marvell,orion-ehci", true},
+ {NULL, false}
+};
+
static int
mv_ehci_probe(device_t self)
{
@@ -106,7 +112,7 @@
if (!ofw_bus_status_okay(self))
return (ENXIO);
- if (!ofw_bus_is_compatible(self, "mrvl,usb-ehci"))
+ if (!ofw_bus_search_compatible(self, compat_data)->ocd_data)
return (ENXIO);
device_set_desc(self, EHCI_HC_DEVSTR);
@@ -156,12 +162,15 @@
device_get_name(self));
rid = 0;
- irq_err = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid,
- RF_SHAREABLE | RF_ACTIVE);
- if (irq_err == NULL) {
- device_printf(self, "Could not allocate error irq\n");
- mv_ehci_detach(self);
- return (ENXIO);
+ if (!ofw_bus_is_compatible(self, "marvell,orion-ehci")) {
+ irq_err = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid,
+ RF_SHAREABLE | RF_ACTIVE);
+ if (irq_err == NULL) {
+ device_printf(self, "Could not allocate error irq\n");
+ mv_ehci_detach(self);
+ return (ENXIO);
+ }
+ rid = 1;
}
/*
@@ -169,7 +178,6 @@
* sure to use the correct rid for the main one (controller interrupt)
* -- refer to DTS for the right resource number to use here.
*/
- rid = 1;
sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid,
RF_SHAREABLE | RF_ACTIVE);
if (sc->sc_irq_res == NULL) {
@@ -187,12 +195,14 @@
sprintf(sc->sc_vendor, "Marvell");
- err = bus_setup_intr(self, irq_err, INTR_TYPE_BIO,
- err_intr, NULL, sc, &ih_err);
- if (err) {
- device_printf(self, "Could not setup error irq, %d\n", err);
- ih_err = NULL;
- goto error;
+ if (!ofw_bus_is_compatible(self, "marvell,orion-ehci")) {
+ err = bus_setup_intr(self, irq_err, INTR_TYPE_BIO,
+ err_intr, NULL, sc, &ih_err);
+ if (err) {
+ device_printf(self, "Could not setup error irq, %d\n", err);
+ ih_err = NULL;
+ goto error;
+ }
}
EWRITE4(sc, USB_BRIDGE_INTR_MASK, MV_USB_ADDR_DECODE_ERR |

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 10:20 PM (20 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15547836
Default Alt Text
D4369.id10905.diff (2 KB)

Event Timeline