diff options
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/hvc/hvc_vio.c | 30 | ||||
-rw-r--r-- | drivers/tty/hvc/hvsi_lib.c | 32 |
2 files changed, 31 insertions, 31 deletions
diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c index ade73fae816a..710c06ca70f4 100644 --- a/drivers/tty/hvc/hvc_vio.c +++ b/drivers/tty/hvc/hvc_vio.c | |||
@@ -134,7 +134,7 @@ static int hvterm_hvsi_get_chars(uint32_t vtermno, char *buf, int count) | |||
134 | if (WARN_ON(!pv)) | 134 | if (WARN_ON(!pv)) |
135 | return 0; | 135 | return 0; |
136 | 136 | ||
137 | return hvsi_get_chars(&pv->hvsi, buf, count); | 137 | return hvsilib_get_chars(&pv->hvsi, buf, count); |
138 | } | 138 | } |
139 | 139 | ||
140 | static int hvterm_hvsi_put_chars(uint32_t vtermno, const char *buf, int count) | 140 | static int hvterm_hvsi_put_chars(uint32_t vtermno, const char *buf, int count) |
@@ -144,7 +144,7 @@ static int hvterm_hvsi_put_chars(uint32_t vtermno, const char *buf, int count) | |||
144 | if (WARN_ON(!pv)) | 144 | if (WARN_ON(!pv)) |
145 | return 0; | 145 | return 0; |
146 | 146 | ||
147 | return hvsi_put_chars(&pv->hvsi, buf, count); | 147 | return hvsilib_put_chars(&pv->hvsi, buf, count); |
148 | } | 148 | } |
149 | 149 | ||
150 | static int hvterm_hvsi_open(struct hvc_struct *hp, int data) | 150 | static int hvterm_hvsi_open(struct hvc_struct *hp, int data) |
@@ -158,7 +158,7 @@ static int hvterm_hvsi_open(struct hvc_struct *hp, int data) | |||
158 | if (rc) | 158 | if (rc) |
159 | return rc; | 159 | return rc; |
160 | 160 | ||
161 | return hvsi_open(&pv->hvsi, hp); | 161 | return hvsilib_open(&pv->hvsi, hp); |
162 | } | 162 | } |
163 | 163 | ||
164 | static void hvterm_hvsi_close(struct hvc_struct *hp, int data) | 164 | static void hvterm_hvsi_close(struct hvc_struct *hp, int data) |
@@ -167,7 +167,7 @@ static void hvterm_hvsi_close(struct hvc_struct *hp, int data) | |||
167 | 167 | ||
168 | pr_devel("HVSI@%x: do close !\n", pv->termno); | 168 | pr_devel("HVSI@%x: do close !\n", pv->termno); |
169 | 169 | ||
170 | hvsi_close(&pv->hvsi, hp); | 170 | hvsilib_close(&pv->hvsi, hp); |
171 | 171 | ||
172 | notifier_del_irq(hp, data); | 172 | notifier_del_irq(hp, data); |
173 | } | 173 | } |
@@ -178,7 +178,7 @@ void hvterm_hvsi_hangup(struct hvc_struct *hp, int data) | |||
178 | 178 | ||
179 | pr_devel("HVSI@%x: do hangup !\n", pv->termno); | 179 | pr_devel("HVSI@%x: do hangup !\n", pv->termno); |
180 | 180 | ||
181 | hvsi_close(&pv->hvsi, hp); | 181 | hvsilib_close(&pv->hvsi, hp); |
182 | 182 | ||
183 | notifier_hangup_irq(hp, data); | 183 | notifier_hangup_irq(hp, data); |
184 | } | 184 | } |
@@ -201,9 +201,9 @@ static int hvterm_hvsi_tiocmset(struct hvc_struct *hp, unsigned int set, | |||
201 | pv->termno, set, clear); | 201 | pv->termno, set, clear); |
202 | 202 | ||
203 | if (set & TIOCM_DTR) | 203 | if (set & TIOCM_DTR) |
204 | hvsi_write_mctrl(&pv->hvsi, 1); | 204 | hvsilib_write_mctrl(&pv->hvsi, 1); |
205 | else if (clear & TIOCM_DTR) | 205 | else if (clear & TIOCM_DTR) |
206 | hvsi_write_mctrl(&pv->hvsi, 0); | 206 | hvsilib_write_mctrl(&pv->hvsi, 0); |
207 | 207 | ||
208 | return 0; | 208 | return 0; |
209 | } | 209 | } |
@@ -267,8 +267,8 @@ static int __devinit hvc_vio_probe(struct vio_dev *vdev, | |||
267 | pv->termno = vdev->unit_address; | 267 | pv->termno = vdev->unit_address; |
268 | pv->proto = proto; | 268 | pv->proto = proto; |
269 | hvterm_privs[termno] = pv; | 269 | hvterm_privs[termno] = pv; |
270 | hvsi_init(&pv->hvsi, hvc_get_chars, hvc_put_chars, | 270 | hvsilib_init(&pv->hvsi, hvc_get_chars, hvc_put_chars, |
271 | pv->termno, 0); | 271 | pv->termno, 0); |
272 | } | 272 | } |
273 | 273 | ||
274 | hp = hvc_alloc(termno, vdev->irq, ops, MAX_VIO_PUT_CHARS); | 274 | hp = hvc_alloc(termno, vdev->irq, ops, MAX_VIO_PUT_CHARS); |
@@ -416,10 +416,10 @@ void __init hvc_vio_init_early(void) | |||
416 | else if (of_device_is_compatible(stdout_node, "hvterm-protocol")) { | 416 | else if (of_device_is_compatible(stdout_node, "hvterm-protocol")) { |
417 | hvterm_priv0.proto = HV_PROTOCOL_HVSI; | 417 | hvterm_priv0.proto = HV_PROTOCOL_HVSI; |
418 | ops = &hvterm_hvsi_ops; | 418 | ops = &hvterm_hvsi_ops; |
419 | hvsi_init(&hvterm_priv0.hvsi, hvc_get_chars, hvc_put_chars, | 419 | hvsilib_init(&hvterm_priv0.hvsi, hvc_get_chars, hvc_put_chars, |
420 | hvterm_priv0.termno, 1); | 420 | hvterm_priv0.termno, 1); |
421 | /* HVSI, perform the handshake now */ | 421 | /* HVSI, perform the handshake now */ |
422 | hvsi_establish(&hvterm_priv0.hvsi); | 422 | hvsilib_establish(&hvterm_priv0.hvsi); |
423 | } else | 423 | } else |
424 | goto out; | 424 | goto out; |
425 | udbg_putc = udbg_hvc_putc; | 425 | udbg_putc = udbg_hvc_putc; |
@@ -462,8 +462,8 @@ void __init udbg_init_debug_lpar_hvsi(void) | |||
462 | udbg_putc = udbg_hvc_putc; | 462 | udbg_putc = udbg_hvc_putc; |
463 | udbg_getc = udbg_hvc_getc; | 463 | udbg_getc = udbg_hvc_getc; |
464 | udbg_getc_poll = udbg_hvc_getc_poll; | 464 | udbg_getc_poll = udbg_hvc_getc_poll; |
465 | hvsi_init(&hvterm_priv0.hvsi, hvc_get_chars, hvc_put_chars, | 465 | hvsilib_init(&hvterm_priv0.hvsi, hvc_get_chars, hvc_put_chars, |
466 | hvterm_priv0.termno, 1); | 466 | hvterm_priv0.termno, 1); |
467 | hvsi_establish(&hvterm_priv0.hvsi); | 467 | hvsilib_establish(&hvterm_priv0.hvsi); |
468 | } | 468 | } |
469 | #endif /* CONFIG_PPC_EARLY_DEBUG_LPAR_HVSI */ | 469 | #endif /* CONFIG_PPC_EARLY_DEBUG_LPAR_HVSI */ |
diff --git a/drivers/tty/hvc/hvsi_lib.c b/drivers/tty/hvc/hvsi_lib.c index 9401fcb556f0..bd9b09827b24 100644 --- a/drivers/tty/hvc/hvsi_lib.c +++ b/drivers/tty/hvc/hvsi_lib.c | |||
@@ -178,7 +178,7 @@ static int hvsi_get_packet(struct hvsi_priv *pv) | |||
178 | return 0; | 178 | return 0; |
179 | } | 179 | } |
180 | 180 | ||
181 | int hvsi_get_chars(struct hvsi_priv *pv, char *buf, int count) | 181 | int hvsilib_get_chars(struct hvsi_priv *pv, char *buf, int count) |
182 | { | 182 | { |
183 | unsigned int tries, read = 0; | 183 | unsigned int tries, read = 0; |
184 | 184 | ||
@@ -228,7 +228,7 @@ int hvsi_get_chars(struct hvsi_priv *pv, char *buf, int count) | |||
228 | return read; | 228 | return read; |
229 | } | 229 | } |
230 | 230 | ||
231 | int hvsi_put_chars(struct hvsi_priv *pv, const char *buf, int count) | 231 | int hvsilib_put_chars(struct hvsi_priv *pv, const char *buf, int count) |
232 | { | 232 | { |
233 | struct hvsi_data dp; | 233 | struct hvsi_data dp; |
234 | int rc, adjcount = min(count, HVSI_MAX_OUTGOING_DATA); | 234 | int rc, adjcount = min(count, HVSI_MAX_OUTGOING_DATA); |
@@ -254,7 +254,7 @@ static void maybe_msleep(unsigned long ms) | |||
254 | msleep(ms); | 254 | msleep(ms); |
255 | } | 255 | } |
256 | 256 | ||
257 | int hvsi_read_mctrl(struct hvsi_priv *pv) | 257 | int hvsilib_read_mctrl(struct hvsi_priv *pv) |
258 | { | 258 | { |
259 | struct hvsi_query q; | 259 | struct hvsi_query q; |
260 | int rc, timeout; | 260 | int rc, timeout; |
@@ -285,7 +285,7 @@ int hvsi_read_mctrl(struct hvsi_priv *pv) | |||
285 | return -EIO; | 285 | return -EIO; |
286 | } | 286 | } |
287 | 287 | ||
288 | int hvsi_write_mctrl(struct hvsi_priv *pv, int dtr) | 288 | int hvsilib_write_mctrl(struct hvsi_priv *pv, int dtr) |
289 | { | 289 | { |
290 | struct hvsi_control ctrl; | 290 | struct hvsi_control ctrl; |
291 | unsigned short mctrl; | 291 | unsigned short mctrl; |
@@ -310,7 +310,7 @@ int hvsi_write_mctrl(struct hvsi_priv *pv, int dtr) | |||
310 | return hvsi_send_packet(pv, &ctrl.hdr); | 310 | return hvsi_send_packet(pv, &ctrl.hdr); |
311 | } | 311 | } |
312 | 312 | ||
313 | void hvsi_establish(struct hvsi_priv *pv) | 313 | void hvsilib_establish(struct hvsi_priv *pv) |
314 | { | 314 | { |
315 | int timeout; | 315 | int timeout; |
316 | 316 | ||
@@ -359,32 +359,32 @@ void hvsi_establish(struct hvsi_priv *pv) | |||
359 | 359 | ||
360 | pr_devel("HVSI@%x: ... established, reading mctrl\n", pv->termno); | 360 | pr_devel("HVSI@%x: ... established, reading mctrl\n", pv->termno); |
361 | 361 | ||
362 | hvsi_read_mctrl(pv); | 362 | hvsilib_read_mctrl(pv); |
363 | 363 | ||
364 | /* Set our own DTR */ | 364 | /* Set our own DTR */ |
365 | 365 | ||
366 | pr_devel("HVSI@%x: ... setting mctrl\n", pv->termno); | 366 | pr_devel("HVSI@%x: ... setting mctrl\n", pv->termno); |
367 | 367 | ||
368 | hvsi_write_mctrl(pv, 1); | 368 | hvsilib_write_mctrl(pv, 1); |
369 | 369 | ||
370 | /* Set the opened flag so reads are allowed */ | 370 | /* Set the opened flag so reads are allowed */ |
371 | wmb(); | 371 | wmb(); |
372 | pv->opened = 1; | 372 | pv->opened = 1; |
373 | } | 373 | } |
374 | 374 | ||
375 | int hvsi_open(struct hvsi_priv *pv, struct hvc_struct *hp) | 375 | int hvsilib_open(struct hvsi_priv *pv, struct hvc_struct *hp) |
376 | { | 376 | { |
377 | pr_devel("HVSI@%x: open !\n", pv->termno); | 377 | pr_devel("HVSI@%x: open !\n", pv->termno); |
378 | 378 | ||
379 | /* Keep track of the tty data structure */ | 379 | /* Keep track of the tty data structure */ |
380 | pv->tty = tty_kref_get(hp->tty); | 380 | pv->tty = tty_kref_get(hp->tty); |
381 | 381 | ||
382 | hvsi_establish(pv); | 382 | hvsilib_establish(pv); |
383 | 383 | ||
384 | return 0; | 384 | return 0; |
385 | } | 385 | } |
386 | 386 | ||
387 | void hvsi_close(struct hvsi_priv *pv, struct hvc_struct *hp) | 387 | void hvsilib_close(struct hvsi_priv *pv, struct hvc_struct *hp) |
388 | { | 388 | { |
389 | unsigned long flags; | 389 | unsigned long flags; |
390 | 390 | ||
@@ -401,7 +401,7 @@ void hvsi_close(struct hvsi_priv *pv, struct hvc_struct *hp) | |||
401 | 401 | ||
402 | /* Clear our own DTR */ | 402 | /* Clear our own DTR */ |
403 | if (!pv->tty || (pv->tty->termios->c_cflag & HUPCL)) | 403 | if (!pv->tty || (pv->tty->termios->c_cflag & HUPCL)) |
404 | hvsi_write_mctrl(pv, 0); | 404 | hvsilib_write_mctrl(pv, 0); |
405 | 405 | ||
406 | /* Tear down the connection */ | 406 | /* Tear down the connection */ |
407 | hvsi_send_close(pv); | 407 | hvsi_send_close(pv); |
@@ -412,11 +412,11 @@ void hvsi_close(struct hvsi_priv *pv, struct hvc_struct *hp) | |||
412 | pv->tty = NULL; | 412 | pv->tty = NULL; |
413 | } | 413 | } |
414 | 414 | ||
415 | void hvsi_init(struct hvsi_priv *pv, | 415 | void hvsilib_init(struct hvsi_priv *pv, |
416 | int (*get_chars)(uint32_t termno, char *buf, int count), | 416 | int (*get_chars)(uint32_t termno, char *buf, int count), |
417 | int (*put_chars)(uint32_t termno, const char *buf, | 417 | int (*put_chars)(uint32_t termno, const char *buf, |
418 | int count), | 418 | int count), |
419 | int termno, int is_console) | 419 | int termno, int is_console) |
420 | { | 420 | { |
421 | memset(pv, 0, sizeof(*pv)); | 421 | memset(pv, 0, sizeof(*pv)); |
422 | pv->get_chars = get_chars; | 422 | pv->get_chars = get_chars; |