diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2009-01-06 01:54:57 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2009-01-06 01:54:57 +0000 |
commit | c41f2ca87e20578f2808620085b43ae1c49d7b94 (patch) | |
tree | aefd4a833389dd67f39f2cf9f1ac6b0b60a53228 /sys/powerpc/powermac | |
parent | a28ce6e833e38418160144c23950b59c9599b3a1 (diff) | |
download | FreeBSD-src-c41f2ca87e20578f2808620085b43ae1c49d7b94.zip FreeBSD-src-c41f2ca87e20578f2808620085b43ae1c49d7b94.tar.gz |
Add a new quirk type so that the MacIO driver will assign memory resources
belonging to a devices children, in analogy to the way we handle interrupts
for SCC serial devices. This is required to counteract overly deep nesting
on onboard audio devices.
Submitted by: Marco Trillo
Diffstat (limited to 'sys/powerpc/powermac')
-rw-r--r-- | sys/powerpc/powermac/macio.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/powerpc/powermac/macio.c b/sys/powerpc/powermac/macio.c index 5c17925..eab1011 100644 --- a/sys/powerpc/powermac/macio.c +++ b/sys/powerpc/powermac/macio.c @@ -152,6 +152,7 @@ static struct macio_pci_dev { */ #define MACIO_QUIRK_IGNORE 0x00000001 #define MACIO_QUIRK_CHILD_HAS_INTR 0x00000002 +#define MACIO_QUIRK_USE_CHILD_REG 0x00000004 struct macio_quirk_entry { const char *mq_name; @@ -162,7 +163,9 @@ static struct macio_quirk_entry macio_quirks[] = { { "escc-legacy", MACIO_QUIRK_IGNORE }, { "timer", MACIO_QUIRK_IGNORE }, { "escc", MACIO_QUIRK_CHILD_HAS_INTR }, - { NULL, 0 } + { "i2s", MACIO_QUIRK_CHILD_HAS_INTR | + MACIO_QUIRK_USE_CHILD_REG }, + { NULL, 0 } }; static int @@ -318,7 +321,10 @@ macio_attach(device_t dev) resource_list_init(&dinfo->mdi_resources); dinfo->mdi_ninterrupts = 0; macio_add_intr(child, dinfo); - macio_add_reg(child, dinfo); + if ((quirks & MACIO_QUIRK_USE_CHILD_REG) != 0) + macio_add_reg(OF_child(child), dinfo); + else + macio_add_reg(child, dinfo); if ((quirks & MACIO_QUIRK_CHILD_HAS_INTR) != 0) for (subchild = OF_child(child); subchild != 0; subchild = OF_peer(subchild)) |