Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/sdhci/sdhci.c
Show First 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | if (error != 0) { | ||||
return; | return; | ||||
} | } | ||||
*(bus_addr_t *)arg = segs[0].ds_addr; | *(bus_addr_t *)arg = segs[0].ds_addr; | ||||
} | } | ||||
static int | static int | ||||
slot_printf(const struct sdhci_slot *slot, const char * fmt, ...) | slot_printf(const struct sdhci_slot *slot, const char * fmt, ...) | ||||
{ | { | ||||
char buf[128]; | |||||
va_list ap; | va_list ap; | ||||
int retval; | int retval; | ||||
retval = printf("%s-slot%d: ", | /* | ||||
device_get_nameunit(slot->bus), slot->num); | * Make sure we print a single line all together rather than in two | ||||
* halves to avoid console gibberish bingo. | |||||
*/ | |||||
va_start(ap, fmt); | va_start(ap, fmt); | ||||
retval += vprintf(fmt, ap); | retval = vsnprintf(buf, sizeof(buf), fmt, ap); | ||||
va_end(ap); | va_end(ap); | ||||
retval += printf("%s-slot%d: %s", | |||||
device_get_nameunit(slot->bus), slot->num, buf); | |||||
return (retval); | return (retval); | ||||
} | } | ||||
static void | static void | ||||
sdhci_dumpregs(struct sdhci_slot *slot) | sdhci_dumpregs(struct sdhci_slot *slot) | ||||
{ | { | ||||
slot_printf(slot, | slot_printf(slot, | ||||
▲ Show 20 Lines • Show All 2,633 Lines • Show Last 20 Lines |