Lines Matching refs:scc
129 m38813c_ifsetup(struct m38813c_chip *scc) in m38813c_ifsetup() argument
132 scc->scc_if.hii_ctx = scc; in m38813c_ifsetup()
134 scc->scc_if.hii_establish = m38813c_input_establish; in m38813c_ifsetup()
135 scc->scc_if.hii_poll = m38813c_intr; in m38813c_ifsetup()
141 struct m38813c_chip *scc = &m38813c_chip; in m38813c_cnattach() local
143 scc->scc_csh = MIPS_PHYS_TO_KSEG1(addr); in m38813c_cnattach()
145 m38813c_ifsetup(scc); in m38813c_cnattach()
147 hpckbd_cnattach(&scc->scc_if); in m38813c_cnattach()
155 struct m38813c_chip *scc = ic; in m38813c_input_establish() local
158 scc->scc_hpckbd = kbdif; in m38813c_input_establish()
160 scc->scc_enabled = 1; in m38813c_input_establish()
179 struct m38813c_chip *scc = arg; in m38813c_poll() local
180 bus_space_tag_t t = scc->scc_cst; in m38813c_poll()
181 bus_space_handle_t h = scc->scc_csh; in m38813c_poll()
184 if (!scc->scc_enabled) { in m38813c_poll()
190 hpckbd_input_hook(scc->scc_hpckbd); in m38813c_poll()
193 scc->t_extended = 1; in m38813c_poll()
196 scc->t_extended1 = 2; in m38813c_poll()
201 key = (datain & 0x7f) | (scc->t_extended ? 0x80 : 0); in m38813c_poll()
202 scc->t_extended = 0; in m38813c_poll()
208 if (scc->t_extended1 == 2 && (datain == 0x1d || datain == 0x9d)) { in m38813c_poll()
209 scc->t_extended1 = 1; in m38813c_poll()
211 } else if (scc->t_extended1 == 1 && in m38813c_poll()
213 scc->t_extended1 = 0; in m38813c_poll()
215 } else if (scc->t_extended1 > 0) { in m38813c_poll()
216 scc->t_extended1 = 0; in m38813c_poll()
220 scc->t_lastchar = 0; in m38813c_poll()
224 if (key == scc->t_lastchar) in m38813c_poll()
226 scc->t_lastchar = key; in m38813c_poll()
230 hpckbd_input(scc->scc_hpckbd, type, key); in m38813c_poll()