Lines Matching defs:vktty
64 struct bcm_vk_tty *vktty;
81 vktty = &vk->tty[i];
84 if (!vktty->is_opened)
88 wr = vkread32(vk, BAR_1, VK_BAR_CHAN_WR(vktty, from));
91 if (vktty->from_size == 0)
94 if (wr >= vktty->from_size) {
97 i, wr, vktty->from_size);
108 VK_BAR_CHAN_DATA(vktty, from, vktty->rd));
109 vktty->rd++;
110 if (vktty->rd >= vktty->from_size)
111 vktty->rd = 0;
112 tty_insert_flip_char(&vktty->port, c, TTY_NORMAL);
117 tty_flip_buffer_push(&vktty->port);
120 vkwrite32(vk, vktty->rd, BAR_1,
121 VK_BAR_CHAN_RD(vktty, from));
130 struct bcm_vk_tty *vktty;
142 vktty = &vk->tty[index];
144 vktty->pid = task_pid_nr(current);
145 vktty->to_offset = TO_TTYK_BASE(index);
146 vktty->from_offset = FROM_TTYK_BASE(index);
157 vktty->to_size = vkread32(vk, BAR_1, VK_BAR_CHAN_SIZE(vktty, to));
158 vktty->wr = vkread32(vk, BAR_1, VK_BAR_CHAN_WR(vktty, to));
159 vktty->from_size = vkread32(vk, BAR_1, VK_BAR_CHAN_SIZE(vktty, from));
160 vktty->rd = vkread32(vk, BAR_1, VK_BAR_CHAN_RD(vktty, from));
161 vktty->is_opened = true;
163 if (tty->count == 1 && !vktty->irq_enabled) {
194 struct bcm_vk_tty *vktty;
199 vktty = &vk->tty[index];
204 VK_BAR_CHAN_DATA(vktty, to, vktty->wr));
205 vktty->wr++;
206 if (vktty->wr >= vktty->to_size)
207 vktty->wr = 0;
210 vkwrite32(vk, vktty->wr, BAR_1, VK_BAR_CHAN_WR(vktty, to));
324 struct bcm_vk_tty *vktty;
328 vktty = &vk->tty[i];
329 if (vktty->pid)
330 kill_pid(find_vpid(vktty->pid), SIGKILL, 1);