diff options
author | mav <mav@FreeBSD.org> | 2010-05-23 09:44:48 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2010-05-23 09:44:48 +0000 |
commit | 0a0e92c44b21aff25e99dbfad71535ea45e37e5d (patch) | |
tree | 6f601bd1aa9256bbc48c27b2bf484d3019f822f7 | |
parent | 5b3e294d01215335c4df127172992b299e9bceb8 (diff) | |
download | FreeBSD-src-0a0e92c44b21aff25e99dbfad71535ea45e37e5d.zip FreeBSD-src-0a0e92c44b21aff25e99dbfad71535ea45e37e5d.tar.gz |
Report relative card address to NewBus as location string.
-rw-r--r-- | sys/dev/mmc/mmc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index 6872667..7689d16 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -1500,6 +1500,15 @@ mmc_delayed_attach(void *xsc) config_intrhook_disestablish(&sc->config_intrhook); } +static int +mmc_child_location_str(device_t dev, device_t child, char *buf, + size_t buflen) +{ + + snprintf(buf, buflen, "rca=0x%04x", mmc_get_rca(child)); + return (0); +} + static device_method_t mmc_methods[] = { /* device_if */ DEVMETHOD(device_probe, mmc_probe), @@ -1511,6 +1520,7 @@ static device_method_t mmc_methods[] = { /* Bus interface */ DEVMETHOD(bus_read_ivar, mmc_read_ivar), DEVMETHOD(bus_write_ivar, mmc_write_ivar), + DEVMETHOD(bus_child_location_str, mmc_child_location_str), /* MMC Bus interface */ DEVMETHOD(mmcbus_wait_for_request, mmc_wait_for_request), |