Lines Matching refs:reg
39 uint32_t reg, tries = MAX_TRIES; in rsb_wait_bit() local
42 reg = mmio_read_32(SUNXI_R_RSB_BASE + offset); in rsb_wait_bit()
43 while ((reg & mask) && --tries); /* transaction in progress */ in rsb_wait_bit()
44 if (reg & mask) { in rsb_wait_bit()
54 uint32_t reg; in rsb_wait_stat() local
60 reg = mmio_read_32(SUNXI_R_RSB_BASE + RSB_STAT); in rsb_wait_stat()
61 if (reg == 0x01) in rsb_wait_stat()
64 ERROR("%s: 0x%x\n", desc, reg); in rsb_wait_stat()
65 return -reg; in rsb_wait_stat()
113 uint32_t reg; in rsb_set_bus_speed() local
118 reg = source_freq / bus_freq; in rsb_set_bus_speed()
119 if (reg < 2) in rsb_set_bus_speed()
122 reg = reg / 2 - 1; in rsb_set_bus_speed()
123 reg |= (1U << 8); /* one cycle of CD output delay */ in rsb_set_bus_speed()
125 mmio_write_32(SUNXI_R_RSB_BASE + RSB_CCR, reg); in rsb_set_bus_speed()