Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/mmc/mmc.c
Show First 20 Lines • Show All 1,553 Lines • ▼ Show 20 Lines | |||||
#undef HOST_TIMING_CAP | #undef HOST_TIMING_CAP | ||||
return (false); | return (false); | ||||
} | } | ||||
static void | static void | ||||
mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard) | mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard) | ||||
{ | { | ||||
enum mmc_bus_timing max_timing, timing; | enum mmc_bus_timing timing; | ||||
device_printf(dev, "Card at relative address 0x%04x%s:\n", | device_printf(dev, "Card at relative address 0x%04x%s:\n", | ||||
ivar->rca, newcard ? " added" : ""); | ivar->rca, newcard ? " added" : ""); | ||||
device_printf(dev, " card: %s\n", ivar->card_id_string); | device_printf(dev, " card: %s\n", ivar->card_id_string); | ||||
max_timing = bus_timing_normal; | |||||
for (timing = bus_timing_max; timing > bus_timing_normal; timing--) { | for (timing = bus_timing_max; timing > bus_timing_normal; timing--) { | ||||
if (isset(&ivar->timings, timing)) { | if (isset(&ivar->timings, timing)) | ||||
max_timing = timing; | |||||
break; | break; | ||||
} | |||||
} | } | ||||
device_printf(dev, " quirks: %b\n", ivar->quirks, MMC_QUIRKS_FMT); | device_printf(dev, " quirks: %b\n", ivar->quirks, MMC_QUIRKS_FMT); | ||||
device_printf(dev, " bus: %ubit, %uMHz (%s timing)\n", | device_printf(dev, " bus: %ubit, %uMHz (%s timing)\n", | ||||
(ivar->bus_width == bus_width_1 ? 1 : | (ivar->bus_width == bus_width_1 ? 1 : | ||||
(ivar->bus_width == bus_width_4 ? 4 : 8)), | (ivar->bus_width == bus_width_4 ? 4 : 8)), | ||||
mmc_timing_to_dtr(ivar, timing) / 1000000, | mmc_timing_to_dtr(ivar, timing) / 1000000, | ||||
mmc_timing_to_string(timing)); | mmc_timing_to_string(timing)); | ||||
device_printf(dev, " memory: %u blocks, erase sector %u blocks%s\n", | device_printf(dev, " memory: %u blocks, erase sector %u blocks%s\n", | ||||
▲ Show 20 Lines • Show All 1,006 Lines • Show Last 20 Lines |