Lines Matching defs:wb
47 wb_idx_read(struct wb_softc *wb, uint8_t reg)
49 bus_space_write_1(wb->wb_iot, wb->wb_ioh, WB_SD_INDEX, reg);
50 return bus_space_read_1(wb->wb_iot, wb->wb_ioh, WB_SD_DATA);
54 wb_idx_write(struct wb_softc *wb, uint8_t reg, uint8_t val)
56 bus_space_write_1(wb->wb_iot, wb->wb_ioh, WB_SD_INDEX, reg);
57 bus_space_write_1(wb->wb_iot, wb->wb_ioh, WB_SD_DATA, val);
61 wb_read(struct wb_softc *wb, uint8_t reg)
63 return bus_space_read_1(wb->wb_iot, wb->wb_ioh, reg);
67 wb_write(struct wb_softc *wb, uint8_t reg, uint8_t val)
69 bus_space_write_1(wb->wb_iot, wb->wb_ioh, reg, val);
73 wb_led(struct wb_softc *wb, bool enable)
77 val = wb_read(wb, WB_SD_CSR);
82 wb_write(wb, WB_SD_CSR, val);
86 wb_attach(struct wb_softc *wb)
88 switch (wb->wb_type) {
90 aprint_verbose_dev(wb->wb_dev,
92 wb_sdmmc_attach(wb);
95 aprint_verbose_dev(wb->wb_dev,
99 aprint_verbose_dev(wb->wb_dev,
103 aprint_verbose_dev(wb->wb_dev,
110 wb_detach(struct wb_softc *wb, int flags)
112 switch (wb->wb_type) {
114 wb_sdmmc_detach(wb, flags);
127 struct wb_softc *wb = opaque;
129 switch (wb->wb_type) {
131 return wb_sdmmc_intr(wb);
142 wb_suspend(struct wb_softc *wb)
144 if (wb->wb_type == WB_DEVNO_SD)
145 return wb_sdmmc_suspend(wb);
151 wb_resume(struct wb_softc *wb)
153 if (wb->wb_type == WB_DEVNO_SD)
154 return wb_sdmmc_resume(wb);