Date: Sun, 23 May 2010 09:44:48 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208441 - head/sys/dev/mmc Message-ID: <201005230944.o4N9imO9036855@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sun May 23 09:44:48 2010 New Revision: 208441 URL: http://svn.freebsd.org/changeset/base/208441 Log: Report relative card address to NewBus as location string. Modified: head/sys/dev/mmc/mmc.c Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Sun May 23 09:28:55 2010 (r208440) +++ head/sys/dev/mmc/mmc.c Sun May 23 09:44:48 2010 (r208441) @@ -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),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005230944.o4N9imO9036855>