diff options
author | Marius Strobl <marius@FreeBSD.org> | 2017-03-17 22:57:37 +0000 |
---|---|---|
committer | Marius Strobl <marius@FreeBSD.org> | 2017-03-17 22:57:37 +0000 |
commit | c11bbc7dab0afa8fc3e2985fb4ea58cc6d4fa09a (patch) | |
tree | 67aca85baf1955fb4ea90c29e373ddea0dfa9e22 /sys/dev/mmc | |
parent | b86f80276b8cb2b778024e502e50e51322cfa1e6 (diff) | |
download | src-c11bbc7dab0afa8fc3e2985fb4ea58cc6d4fa09a.tar.gz src-c11bbc7dab0afa8fc3e2985fb4ea58cc6d4fa09a.zip |
Again, fixes regarding style(4), to comments, includes and unused
parameters.
Notes
Notes:
svn path=/head/; revision=315466
Diffstat (limited to 'sys/dev/mmc')
-rw-r--r-- | sys/dev/mmc/bridge.h | 2 | ||||
-rw-r--r-- | sys/dev/mmc/mmc.c | 3 | ||||
-rw-r--r-- | sys/dev/mmc/mmcbr_if.m | 9 |
3 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/mmc/bridge.h b/sys/dev/mmc/bridge.h index ad1a17bcbf86..4e5e11c5f050 100644 --- a/sys/dev/mmc/bridge.h +++ b/sys/dev/mmc/bridge.h @@ -111,7 +111,7 @@ enum mmc_bus_timing { struct mmc_ios { uint32_t clock; /* Speed of the clock in Hz to move data */ - enum mmc_vdd vdd; /* Voltage to apply to the power pins/ */ + enum mmc_vdd vdd; /* Voltage to apply to the power pins */ enum mmc_bus_mode bus_mode; enum mmc_chip_select chip_select; enum mmc_bus_width bus_width; diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index a3a68a01e635..2760bc07525b 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -792,6 +792,7 @@ mmc_get_bits(uint32_t *bits, int bit_len, int start, int size) const int i = (bit_len / 32) - (start / 32) - 1; const int shift = start & 31; uint32_t retval = bits[i] >> shift; + if (size + shift > 32) retval |= bits[i - 1] << (32 - shift); return (retval & ((1llu << size) - 1)); @@ -1464,7 +1465,7 @@ mmc_rescan_cards(struct mmc_softc *sc) return; for (i = 0; i < devcount; i++) { ivar = device_get_ivars(devlist[i]); - if (mmc_select_card(sc, ivar->rca)) { + if (mmc_select_card(sc, ivar->rca) != MMC_ERR_NONE) { if (bootverbose || mmc_debug) device_printf(sc->dev, "Card at relative address %d lost.\n", diff --git a/sys/dev/mmc/mmcbr_if.m b/sys/dev/mmc/mmcbr_if.m index e82293de35b0..b30e5c75fd93 100644 --- a/sys/dev/mmc/mmcbr_if.m +++ b/sys/dev/mmc/mmcbr_if.m @@ -65,8 +65,9 @@ INTERFACE mmcbr; # -# Called by the mmcbus to setup the IO pins correctly, the voltage to use -# for the card, the type of selects, power modes and bus width. +# Called by the mmcbus to set up the IO pins correctly, the common/core +# supply voltage (VDD/VCC) to use for the device, the clock frequency, the +# type of SPI chip select, power mode and bus width. # METHOD int update_ios { device_t brdev; @@ -76,8 +77,8 @@ METHOD int update_ios { # # Called by the mmcbus or its children to schedule a mmc request. These # requests are queued. Time passes. The bridge then gets notification -# of the status of request, who then notifies the requesting device via -# the xfer_done mmcbus method. +# of the status of the request, who then notifies the requesting device +# by calling the completion function supplied as part of the request. # METHOD int request { device_t brdev; |