| 246 | } |
| 247 | |
| 248 | static void |
| 249 | ti_sdhci_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off, |
| 250 | uint8_t val) |
| 251 | { |
| 252 | struct ti_sdhci_softc *sc = device_get_softc(dev); |
| 253 | uint32_t val32; |
| 254 | |
| 255 | #ifdef MMCCAM |
| 256 | uint32_t newval32; |
| 257 | if (off == SDHCI_HOST_CONTROL) { |
| 258 | val32 = ti_mmchs_read_4(sc, MMCHS_CON); |
| 259 | newval32 = val32; |
| 260 | if (val & SDHCI_CTRL_8BITBUS) { |
| 261 | device_printf(dev, "Custom-enabling 8-bit bus\n"); |
| 262 | newval32 |= MMCHS_CON_DW8; |
| 263 | } else { |
| 264 | device_printf(dev, "Custom-disabling 8-bit bus\n"); |
| 265 | newval32 &= ~MMCHS_CON_DW8; |
| 266 | } |
| 267 | if (newval32 != val32) |
| 268 | ti_mmchs_write_4(sc, MMCHS_CON, newval32); |
| 269 | } |
| 270 | #endif |
| 271 | val32 = RD4(sc, off & ~3); |
| 272 | val32 &= ~(0xff << (off & 3) * 8); |
| 273 | val32 |= (val << (off & 3) * 8); |
| 274 | |
| 275 | WR4(sc, off & ~3, val32); |
| 276 | } |
| 277 | |
| 278 | static void |
| 279 | ti_sdhci_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, |
no test coverage detected