Lines Matching full:reg

26 	unsigned int reg;  in s5p_cec_set_divider()  local
30 if (regmap_read(cec->pmu, EXYNOS_HDMI_PHY_CONTROL, &reg)) { in s5p_cec_set_divider()
35 reg = (reg & ~(0x3FF << 16)) | (div_ratio << 16); in s5p_cec_set_divider()
37 if (regmap_write(cec->pmu, EXYNOS_HDMI_PHY_CONTROL, reg)) { in s5p_cec_set_divider()
44 writeb(0x0, cec->reg + S5P_CEC_DIVISOR_3); in s5p_cec_set_divider()
45 writeb(0x0, cec->reg + S5P_CEC_DIVISOR_2); in s5p_cec_set_divider()
46 writeb(0x0, cec->reg + S5P_CEC_DIVISOR_1); in s5p_cec_set_divider()
47 writeb(div_val, cec->reg + S5P_CEC_DIVISOR_0); in s5p_cec_set_divider()
52 u8 reg; in s5p_cec_enable_rx() local
54 reg = readb(cec->reg + S5P_CEC_RX_CTRL); in s5p_cec_enable_rx()
55 reg |= S5P_CEC_RX_CTRL_ENABLE; in s5p_cec_enable_rx()
56 writeb(reg, cec->reg + S5P_CEC_RX_CTRL); in s5p_cec_enable_rx()
61 u8 reg; in s5p_cec_mask_rx_interrupts() local
63 reg = readb(cec->reg + S5P_CEC_IRQ_MASK); in s5p_cec_mask_rx_interrupts()
64 reg |= S5P_CEC_IRQ_RX_DONE; in s5p_cec_mask_rx_interrupts()
65 reg |= S5P_CEC_IRQ_RX_ERROR; in s5p_cec_mask_rx_interrupts()
66 writeb(reg, cec->reg + S5P_CEC_IRQ_MASK); in s5p_cec_mask_rx_interrupts()
71 u8 reg; in s5p_cec_unmask_rx_interrupts() local
73 reg = readb(cec->reg + S5P_CEC_IRQ_MASK); in s5p_cec_unmask_rx_interrupts()
74 reg &= ~S5P_CEC_IRQ_RX_DONE; in s5p_cec_unmask_rx_interrupts()
75 reg &= ~S5P_CEC_IRQ_RX_ERROR; in s5p_cec_unmask_rx_interrupts()
76 writeb(reg, cec->reg + S5P_CEC_IRQ_MASK); in s5p_cec_unmask_rx_interrupts()
81 u8 reg; in s5p_cec_mask_tx_interrupts() local
83 reg = readb(cec->reg + S5P_CEC_IRQ_MASK); in s5p_cec_mask_tx_interrupts()
84 reg |= S5P_CEC_IRQ_TX_DONE; in s5p_cec_mask_tx_interrupts()
85 reg |= S5P_CEC_IRQ_TX_ERROR; in s5p_cec_mask_tx_interrupts()
86 writeb(reg, cec->reg + S5P_CEC_IRQ_MASK); in s5p_cec_mask_tx_interrupts()
91 u8 reg; in s5p_cec_unmask_tx_interrupts() local
93 reg = readb(cec->reg + S5P_CEC_IRQ_MASK); in s5p_cec_unmask_tx_interrupts()
94 reg &= ~S5P_CEC_IRQ_TX_DONE; in s5p_cec_unmask_tx_interrupts()
95 reg &= ~S5P_CEC_IRQ_TX_ERROR; in s5p_cec_unmask_tx_interrupts()
96 writeb(reg, cec->reg + S5P_CEC_IRQ_MASK); in s5p_cec_unmask_tx_interrupts()
101 u8 reg; in s5p_cec_reset() local
103 writeb(S5P_CEC_RX_CTRL_RESET, cec->reg + S5P_CEC_RX_CTRL); in s5p_cec_reset()
104 writeb(S5P_CEC_TX_CTRL_RESET, cec->reg + S5P_CEC_TX_CTRL); in s5p_cec_reset()
106 reg = readb(cec->reg + 0xc4); in s5p_cec_reset()
107 reg &= ~0x1; in s5p_cec_reset()
108 writeb(reg, cec->reg + 0xc4); in s5p_cec_reset()
113 writeb(S5P_CEC_TX_CTRL_RESET, cec->reg + S5P_CEC_TX_CTRL); in s5p_cec_tx_reset()
118 u8 reg; in s5p_cec_rx_reset() local
120 writeb(S5P_CEC_RX_CTRL_RESET, cec->reg + S5P_CEC_RX_CTRL); in s5p_cec_rx_reset()
122 reg = readb(cec->reg + 0xc4); in s5p_cec_rx_reset()
123 reg &= ~0x1; in s5p_cec_rx_reset()
124 writeb(reg, cec->reg + 0xc4); in s5p_cec_rx_reset()
129 writeb(CEC_FILTER_THRESHOLD, cec->reg + S5P_CEC_RX_FILTER_TH); in s5p_cec_threshold()
130 writeb(0, cec->reg + S5P_CEC_RX_FILTER_CTRL); in s5p_cec_threshold()
137 u8 reg; in s5p_cec_copy_packet() local
140 writeb(data[i], cec->reg + (S5P_CEC_TX_BUFF0 + (i * 4))); in s5p_cec_copy_packet()
144 writeb(count, cec->reg + S5P_CEC_TX_BYTES); in s5p_cec_copy_packet()
145 reg = readb(cec->reg + S5P_CEC_TX_CTRL); in s5p_cec_copy_packet()
146 reg |= S5P_CEC_TX_CTRL_START; in s5p_cec_copy_packet()
147 reg &= ~0x70; in s5p_cec_copy_packet()
148 reg |= retries << 4; in s5p_cec_copy_packet()
152 reg |= S5P_CEC_TX_CTRL_BCAST; in s5p_cec_copy_packet()
155 reg &= ~S5P_CEC_TX_CTRL_BCAST; in s5p_cec_copy_packet()
158 writeb(reg, cec->reg + S5P_CEC_TX_CTRL); in s5p_cec_copy_packet()
165 writeb(addr & 0x0F, cec->reg + S5P_CEC_LOGIC_ADDR); in s5p_cec_set_addr()
172 status = readb(cec->reg + S5P_CEC_STATUS_0) & 0xf; in s5p_cec_get_status()
173 status |= (readb(cec->reg + S5P_CEC_TX_STAT1) & 0xf) << 4; in s5p_cec_get_status()
174 status |= readb(cec->reg + S5P_CEC_STATUS_1) << 8; in s5p_cec_get_status()
175 status |= readb(cec->reg + S5P_CEC_STATUS_2) << 16; in s5p_cec_get_status()
176 status |= readb(cec->reg + S5P_CEC_STATUS_3) << 24; in s5p_cec_get_status()
186 cec->reg + S5P_CEC_IRQ_CLEAR); in s5p_clr_pending_tx()
192 cec->reg + S5P_CEC_IRQ_CLEAR); in s5p_clr_pending_rx()
201 buffer[i] = readb(cec->reg + S5P_CEC_RX_BUFF0 + (i * 4)); in s5p_cec_get_rx_buf()