Lines Matching refs:addr
134 cpld_write(struct cpld_softc *sc, int addr, int data)
136 if (addr >= CPLD_REG_RAM) {
137 bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr);
138 bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_L, addr);
140 bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr);
145 cpld_read(struct cpld_softc *sc, int addr)
147 if (addr >= CPLD_REG_RAM) {
148 bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr);
149 bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_L, addr);
151 bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr);
161 cpld_read_pair(struct cpld_softc *sc, int addr)
165 KASSERT(addr <= 0xff, ("Invalid register-pair base address %x.", addr));
166 bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr);
169 bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr + 1);