| 1004 | } |
| 1005 | |
| 1006 | static void |
| 1007 | bcm_sdhost_read_multi_4(device_t dev, struct sdhci_slot *slot, bus_size_t off, |
| 1008 | uint32_t *data, bus_size_t count) |
| 1009 | { |
| 1010 | struct bcm_sdhost_softc *sc = device_get_softc(dev); |
| 1011 | bus_size_t i; |
| 1012 | bus_size_t avail; |
| 1013 | uint32_t edm; |
| 1014 | |
| 1015 | mtx_lock(&sc->mtx); |
| 1016 | |
| 1017 | dprintf("%s: off=%08lx count=%08lx\n", __func__, off, count); |
| 1018 | |
| 1019 | for (i = 0; i < count;) { |
| 1020 | edm = RD4(sc, HC_DEBUG); |
| 1021 | avail = ((edm >> 4) & 0x1f); |
| 1022 | if (i + avail > count) |
| 1023 | avail = count - i; |
| 1024 | if (avail > 0) |
| 1025 | bus_space_read_multi_4(sc->sc_bst, sc->sc_bsh, |
| 1026 | HC_DATAPORT, data + i, avail); |
| 1027 | i += avail; |
| 1028 | DELAY(1); |
| 1029 | } |
| 1030 | |
| 1031 | mtx_unlock(&sc->mtx); |
| 1032 | } |
| 1033 | |
| 1034 | static void |
| 1035 | bcm_sdhost_write_1(device_t dev, struct sdhci_slot *slot, |
nothing calls this directly
no test coverage detected