2 * drivers/s390/char/sclp_vt220.c
3 * SCLP VT220 terminal driver.
6 * Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
7 * Author(s): Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
10 #include <linux/config.h>
11 #include <linux/module.h>
12 #include <linux/spinlock.h>
13 #include <linux/list.h>
14 #include <linux/wait.h>
15 #include <linux/timer.h>
16 #include <linux/kernel.h>
17 #include <linux/tty.h>
18 #include <linux/tty_driver.h>
19 #include <linux/sched.h>
20 #include <linux/errno.h>
22 #include <linux/major.h>
23 #include <linux/console.h>
24 #include <linux/kdev_t.h>
25 #include <linux/bootmem.h>
26 #include <linux/interrupt.h>
27 #include <linux/init.h>
28 #include <asm/uaccess.h>
31 #define SCLP_VT220_PRINT_HEADER "sclp vt220 tty driver: "
32 #define SCLP_VT220_MAJOR TTY_MAJOR
33 #define SCLP_VT220_MINOR 65
34 #define SCLP_VT220_DRIVER_NAME "sclp_vt220"
35 #define SCLP_VT220_DEVICE_NAME "ttysclp"
36 #define SCLP_VT220_CONSOLE_NAME "ttyS"
37 #define SCLP_VT220_CONSOLE_INDEX 1 /* console=ttyS1 */
38 #define SCLP_VT220_BUF_SIZE 80
40 /* Representation of a single write request */
41 struct sclp_vt220_request {
42 struct list_head list;
43 struct sclp_req sclp_req;
45 struct timer_list retry_timer;
49 struct sclp_vt220_sccb {
50 struct sccb_header header;
51 struct evbuf_header evbuf;
54 #define SCLP_VT220_MAX_CHARS_PER_BUFFER (PAGE_SIZE - \
55 sizeof(struct sclp_vt220_request) - \
56 sizeof(struct sclp_vt220_sccb))
58 /* Structures and data needed to register tty driver */
59 static struct tty_driver *sclp_vt220_driver;
61 /* The tty_struct that the kernel associated with us */
62 static struct tty_struct *sclp_vt220_tty;
64 /* Lock to protect internal data from concurrent access */
65 static spinlock_t sclp_vt220_lock;
67 /* List of empty pages to be used as write request buffers */
68 static struct list_head sclp_vt220_empty;
70 /* List of pending requests */
71 static struct list_head sclp_vt220_outqueue;
73 /* Number of requests in outqueue */
74 static int sclp_vt220_outqueue_count;
76 /* Wait queue used to delay write requests while we've run out of buffers */
77 static wait_queue_head_t sclp_vt220_waitq;
79 /* Timer used for delaying write requests to merge subsequent messages into
81 static struct timer_list sclp_vt220_timer;
83 /* Pointer to current request buffer which has been partially filled but not
85 static struct sclp_vt220_request *sclp_vt220_current_request;
87 /* Number of characters in current request buffer */
88 static int sclp_vt220_buffered_chars;
90 /* Flag indicating whether this driver has already been initialized */
91 static int sclp_vt220_initialized = 0;
93 /* Flag indicating that sclp_vt220_current_request should really
94 * have been already queued but wasn't because the SCLP was processing
96 static int sclp_vt220_flush_later;
98 static void sclp_vt220_receiver_fn(struct evbuf_header *evbuf);
99 static void __sclp_vt220_emit(struct sclp_vt220_request *request);
100 static void sclp_vt220_emit_current(void);
102 /* Registration structure for our interest in SCLP event buffers */
103 static struct sclp_register sclp_vt220_register = {
104 .send_mask = EvTyp_VT220Msg_Mask,
105 .receive_mask = EvTyp_VT220Msg_Mask,
106 .state_change_fn = NULL,
107 .receiver_fn = sclp_vt220_receiver_fn
112 * Put provided request buffer back into queue and check emit pending
113 * buffers if necessary.
116 sclp_vt220_process_queue(struct sclp_vt220_request *request)
119 struct sclp_vt220_request *next;
122 /* Put buffer back to list of empty buffers */
123 page = request->sclp_req.sccb;
124 spin_lock_irqsave(&sclp_vt220_lock, flags);
125 /* Move request from outqueue to empty queue */
126 list_del(&request->list);
127 sclp_vt220_outqueue_count--;
128 list_add_tail((struct list_head *) page, &sclp_vt220_empty);
129 /* Check if there is a pending buffer on the out queue. */
131 if (!list_empty(&sclp_vt220_outqueue))
132 next = list_entry(sclp_vt220_outqueue.next,
133 struct sclp_vt220_request, list);
134 spin_unlock_irqrestore(&sclp_vt220_lock, flags);
136 __sclp_vt220_emit(next);
137 else if (sclp_vt220_flush_later)
138 sclp_vt220_emit_current();
139 wake_up(&sclp_vt220_waitq);
140 /* Check if the tty needs a wake up call */
141 if (sclp_vt220_tty != NULL) {
142 if ((sclp_vt220_tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
143 (sclp_vt220_tty->ldisc.write_wakeup != NULL))
144 (sclp_vt220_tty->ldisc.write_wakeup)(sclp_vt220_tty);
145 wake_up_interruptible(&sclp_vt220_tty->write_wait);
150 * Retry sclp write request after waiting some time for an sclp equipment
154 sclp_vt220_retry(unsigned long data)
156 struct sclp_vt220_request *request;
157 struct sclp_vt220_sccb *sccb;
159 request = (struct sclp_vt220_request *) data;
160 request->sclp_req.status = SCLP_REQ_FILLED;
161 sccb = (struct sclp_vt220_sccb *) request->sclp_req.sccb;
162 sccb->header.response_code = 0x0000;
163 sclp_add_request(&request->sclp_req);
166 #define SCLP_BUFFER_MAX_RETRY 5
167 #define SCLP_BUFFER_RETRY_INTERVAL 2
170 * Callback through which the result of a write request is reported by the
174 sclp_vt220_callback(struct sclp_req *request, void *data)
176 struct sclp_vt220_request *vt220_request;
177 struct sclp_vt220_sccb *sccb;
179 vt220_request = (struct sclp_vt220_request *) data;
180 if (request->status == SCLP_REQ_FAILED) {
181 sclp_vt220_process_queue(vt220_request);
184 sccb = (struct sclp_vt220_sccb *) vt220_request->sclp_req.sccb;
186 /* Check SCLP response code and choose suitable action */
187 switch (sccb->header.response_code) {
191 case 0x05f0: /* Target resource in improper state */
194 case 0x0340: /* Contained SCLP equipment check */
195 if (vt220_request->retry_count++ > SCLP_BUFFER_MAX_RETRY)
197 /* Remove processed buffers and requeue rest */
198 if (sclp_remove_processed((struct sccb_header *) sccb) > 0) {
199 /* Not all buffers were processed */
200 sccb->header.response_code = 0x0000;
201 vt220_request->sclp_req.status = SCLP_REQ_FILLED;
202 sclp_add_request(request);
207 case 0x0040: /* SCLP equipment check */
208 if (vt220_request->retry_count++ > SCLP_BUFFER_MAX_RETRY)
210 /* Wait some time, then retry request */
211 vt220_request->retry_timer.function = sclp_vt220_retry;
212 vt220_request->retry_timer.data =
213 (unsigned long) vt220_request;
214 vt220_request->retry_timer.expires =
215 jiffies + SCLP_BUFFER_RETRY_INTERVAL*HZ;
216 add_timer(&vt220_request->retry_timer);
222 sclp_vt220_process_queue(vt220_request);
226 * Emit vt220 request buffer to SCLP.
229 __sclp_vt220_emit(struct sclp_vt220_request *request)
231 if (!(sclp_vt220_register.sclp_send_mask & EvTyp_VT220Msg_Mask)) {
232 request->sclp_req.status = SCLP_REQ_FAILED;
233 sclp_vt220_callback(&request->sclp_req, (void *) request);
236 request->sclp_req.command = SCLP_CMDW_WRITEDATA;
237 request->sclp_req.status = SCLP_REQ_FILLED;
238 request->sclp_req.callback = sclp_vt220_callback;
239 request->sclp_req.callback_data = (void *) request;
241 sclp_add_request(&request->sclp_req);
245 * Queue and emit given request.
248 sclp_vt220_emit(struct sclp_vt220_request *request)
253 spin_lock_irqsave(&sclp_vt220_lock, flags);
254 list_add_tail(&request->list, &sclp_vt220_outqueue);
255 count = sclp_vt220_outqueue_count++;
256 spin_unlock_irqrestore(&sclp_vt220_lock, flags);
257 /* Emit only the first buffer immediately - callback takes care of
260 __sclp_vt220_emit(request);
264 * Queue and emit current request.
267 sclp_vt220_emit_current(void)
270 struct sclp_vt220_request *request;
271 struct sclp_vt220_sccb *sccb;
273 spin_lock_irqsave(&sclp_vt220_lock, flags);
275 if (sclp_vt220_current_request != NULL) {
276 sccb = (struct sclp_vt220_sccb *)
277 sclp_vt220_current_request->sclp_req.sccb;
278 /* Only emit buffers with content */
279 if (sccb->header.length != sizeof(struct sclp_vt220_sccb)) {
280 request = sclp_vt220_current_request;
281 sclp_vt220_current_request = NULL;
282 if (timer_pending(&sclp_vt220_timer))
283 del_timer(&sclp_vt220_timer);
285 sclp_vt220_flush_later = 0;
287 spin_unlock_irqrestore(&sclp_vt220_lock, flags);
289 sclp_vt220_emit(request);
292 #define SCLP_NORMAL_WRITE 0x00
295 * Helper function to initialize a page with the sclp request structure.
297 static struct sclp_vt220_request *
298 sclp_vt220_initialize_page(void *page)
300 struct sclp_vt220_request *request;
301 struct sclp_vt220_sccb *sccb;
303 /* Place request structure at end of page */
304 request = ((struct sclp_vt220_request *)
305 ((addr_t) page + PAGE_SIZE)) - 1;
306 init_timer(&request->retry_timer);
307 request->retry_count = 0;
308 request->sclp_req.sccb = page;
309 /* SCCB goes at start of page */
310 sccb = (struct sclp_vt220_sccb *) page;
311 memset((void *) sccb, 0, sizeof(struct sclp_vt220_sccb));
312 sccb->header.length = sizeof(struct sclp_vt220_sccb);
313 sccb->header.function_code = SCLP_NORMAL_WRITE;
314 sccb->header.response_code = 0x0000;
315 sccb->evbuf.type = EvTyp_VT220Msg;
316 sccb->evbuf.length = sizeof(struct evbuf_header);
321 static inline unsigned int
322 sclp_vt220_space_left(struct sclp_vt220_request *request)
324 struct sclp_vt220_sccb *sccb;
325 sccb = (struct sclp_vt220_sccb *) request->sclp_req.sccb;
326 return PAGE_SIZE - sizeof(struct sclp_vt220_request) -
330 static inline unsigned int
331 sclp_vt220_chars_stored(struct sclp_vt220_request *request)
333 struct sclp_vt220_sccb *sccb;
334 sccb = (struct sclp_vt220_sccb *) request->sclp_req.sccb;
335 return sccb->evbuf.length - sizeof(struct evbuf_header);
339 * Add msg to buffer associated with request. Return the number of characters
343 sclp_vt220_add_msg(struct sclp_vt220_request *request,
344 const unsigned char *msg, int count, int convertlf)
346 struct sclp_vt220_sccb *sccb;
352 if (count > sclp_vt220_space_left(request))
353 count = sclp_vt220_space_left(request);
357 sccb = (struct sclp_vt220_sccb *) request->sclp_req.sccb;
358 buffer = (void *) ((addr_t) sccb + sccb->header.length);
361 /* Perform Linefeed conversion (0x0a -> 0x0a 0x0d)*/
363 (from < count) && (to < sclp_vt220_space_left(request));
365 /* Retrieve character */
367 /* Perform conversion */
369 if (to + 1 < sclp_vt220_space_left(request)) {
370 ((unsigned char *) buffer)[to++] = c;
371 ((unsigned char *) buffer)[to++] = 0x0d;
376 ((unsigned char *) buffer)[to++] = c;
378 sccb->header.length += to;
379 sccb->evbuf.length += to;
382 memcpy(buffer, (const void *) msg, count);
383 sccb->header.length += count;
384 sccb->evbuf.length += count;
390 * Emit buffer after having waited long enough for more data to arrive.
393 sclp_vt220_timeout(unsigned long data)
395 sclp_vt220_emit_current();
398 #define BUFFER_MAX_DELAY HZ/2
401 * Internal implementation of the write function. Write COUNT bytes of data
403 * to the SCLP interface. In case that the data does not fit into the current
404 * write buffer, emit the current one and allocate a new one. If there are no
405 * more empty buffers available, wait until one gets emptied. If DO_SCHEDULE
406 * is non-zero, the buffer will be scheduled for emitting after a timeout -
407 * otherwise the user has to explicitly call the flush function.
408 * A non-zero CONVERTLF parameter indicates that 0x0a characters in the message
409 * buffer should be converted to 0x0a 0x0d. After completion, return the number
413 __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule,
424 spin_lock_irqsave(&sclp_vt220_lock, flags);
426 /* Create a sclp output buffer if none exists yet */
427 if (sclp_vt220_current_request == NULL) {
428 while (list_empty(&sclp_vt220_empty)) {
429 spin_unlock_irqrestore(&sclp_vt220_lock,
434 wait_event(sclp_vt220_waitq,
435 !list_empty(&sclp_vt220_empty));
436 spin_lock_irqsave(&sclp_vt220_lock, flags);
438 page = (void *) sclp_vt220_empty.next;
439 list_del((struct list_head *) page);
440 sclp_vt220_current_request =
441 sclp_vt220_initialize_page(page);
443 /* Try to write the string to the current request buffer */
444 written = sclp_vt220_add_msg(sclp_vt220_current_request,
445 buf, count, convertlf);
446 overall_written += written;
447 if (written == count)
450 * Not all characters could be written to the current
451 * output buffer. Emit the buffer, create a new buffer
452 * and then output the rest of the string.
454 spin_unlock_irqrestore(&sclp_vt220_lock, flags);
455 sclp_vt220_emit_current();
456 spin_lock_irqsave(&sclp_vt220_lock, flags);
460 /* Setup timer to output current console buffer after some time */
461 if (sclp_vt220_current_request != NULL &&
462 !timer_pending(&sclp_vt220_timer) && do_schedule) {
463 sclp_vt220_timer.function = sclp_vt220_timeout;
464 sclp_vt220_timer.data = 0UL;
465 sclp_vt220_timer.expires = jiffies + BUFFER_MAX_DELAY;
466 add_timer(&sclp_vt220_timer);
468 spin_unlock_irqrestore(&sclp_vt220_lock, flags);
469 return overall_written;
473 * This routine is called by the kernel to write a series of
474 * characters to the tty device. The characters may come from
475 * user space or kernel space. This routine will return the
476 * number of characters actually accepted for writing.
479 sclp_vt220_write(struct tty_struct *tty, int from_user,
480 const unsigned char *buf, int count)
486 return __sclp_vt220_write(buf, count, 1, 0);
487 /* Use intermediate buffer to prevent calling copy_from_user() while
491 length = count < SCLP_VT220_BUF_SIZE ?
492 count : SCLP_VT220_BUF_SIZE;
493 length -= copy_from_user(tty->driver_data, buf, length);
499 length = __sclp_vt220_write(tty->driver_data, length, 1, 0);
507 #define SCLP_VT220_SESSION_ENDED 0x01
508 #define SCLP_VT220_SESSION_STARTED 0x80
509 #define SCLP_VT220_SESSION_DATA 0x00
512 * Called by the SCLP to report incoming event buffers.
515 sclp_vt220_receiver_fn(struct evbuf_header *evbuf)
520 /* Ignore input if device is not open */
521 if (sclp_vt220_tty == NULL)
524 buffer = (char *) ((addr_t) evbuf + sizeof(struct evbuf_header));
525 count = evbuf->length - sizeof(struct evbuf_header);
528 case SCLP_VT220_SESSION_ENDED:
529 case SCLP_VT220_SESSION_STARTED:
531 case SCLP_VT220_SESSION_DATA:
532 /* Send input to line discipline */
535 /* Prevent buffer overrun by discarding input. Note that
536 * because buffer_push works asynchronously, we cannot wait
537 * for the buffer to be emptied. */
538 if (count + sclp_vt220_tty->flip.count > TTY_FLIPBUF_SIZE)
539 count = TTY_FLIPBUF_SIZE - sclp_vt220_tty->flip.count;
540 memcpy(sclp_vt220_tty->flip.char_buf_ptr, buffer, count);
541 memset(sclp_vt220_tty->flip.flag_buf_ptr, TTY_NORMAL, count);
542 sclp_vt220_tty->flip.char_buf_ptr += count;
543 sclp_vt220_tty->flip.flag_buf_ptr += count;
544 sclp_vt220_tty->flip.count += count;
545 tty_flip_buffer_push(sclp_vt220_tty);
551 * This routine is called when a particular tty device is opened.
554 sclp_vt220_open(struct tty_struct *tty, struct file *filp)
556 if (tty->count == 1) {
557 sclp_vt220_tty = tty;
558 tty->driver_data = kmalloc(SCLP_VT220_BUF_SIZE, GFP_KERNEL);
559 if (tty->driver_data == NULL)
561 tty->low_latency = 0;
567 * This routine is called when a particular tty device is closed.
570 sclp_vt220_close(struct tty_struct *tty, struct file *filp)
572 if (tty->count == 1) {
573 sclp_vt220_tty = NULL;
574 kfree(tty->driver_data);
575 tty->driver_data = NULL;
580 * This routine is called by the kernel to write a single
581 * character to the tty device. If the kernel uses this routine,
582 * it must call the flush_chars() routine (if defined) when it is
583 * done stuffing characters into the driver.
585 * NOTE: include/linux/tty_driver.h specifies that a character should be
586 * ignored if there is no room in the queue. This driver implements a different
587 * semantic in that it will block when there is no more room left.
590 sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch)
592 __sclp_vt220_write(&ch, 1, 0, 0);
596 * This routine is called by the kernel after it has written a
597 * series of characters to the tty device using put_char().
600 sclp_vt220_flush_chars(struct tty_struct *tty)
602 if (sclp_vt220_outqueue_count == 0)
603 sclp_vt220_emit_current();
605 sclp_vt220_flush_later = 1;
609 * This routine returns the numbers of characters the tty driver
610 * will accept for queuing to be written. This number is subject
611 * to change as output buffers get emptied, or if the output flow
615 sclp_vt220_write_room(struct tty_struct *tty)
621 spin_lock_irqsave(&sclp_vt220_lock, flags);
623 if (sclp_vt220_current_request != NULL)
624 count = sclp_vt220_space_left(sclp_vt220_current_request);
625 list_for_each(l, &sclp_vt220_empty)
626 count += SCLP_VT220_MAX_CHARS_PER_BUFFER;
627 spin_unlock_irqrestore(&sclp_vt220_lock, flags);
632 * Return number of buffered chars.
635 sclp_vt220_chars_in_buffer(struct tty_struct *tty)
639 struct sclp_vt220_request *r;
642 spin_lock_irqsave(&sclp_vt220_lock, flags);
644 if (sclp_vt220_current_request != NULL)
645 count = sclp_vt220_chars_stored(sclp_vt220_current_request);
646 list_for_each(l, &sclp_vt220_outqueue) {
647 r = list_entry(l, struct sclp_vt220_request, list);
648 count += sclp_vt220_chars_stored(r);
650 spin_unlock_irqrestore(&sclp_vt220_lock, flags);
655 __sclp_vt220_flush_buffer(void)
659 sclp_vt220_emit_current();
660 spin_lock_irqsave(&sclp_vt220_lock, flags);
661 if (timer_pending(&sclp_vt220_timer))
662 del_timer(&sclp_vt220_timer);
663 while (sclp_vt220_outqueue_count > 0) {
664 spin_unlock_irqrestore(&sclp_vt220_lock, flags);
666 spin_lock_irqsave(&sclp_vt220_lock, flags);
668 spin_unlock_irqrestore(&sclp_vt220_lock, flags);
672 * Pass on all buffers to the hardware. Return only when there are no more
676 sclp_vt220_flush_buffer(struct tty_struct *tty)
678 sclp_vt220_emit_current();
682 * Initialize all relevant components and register driver with system.
685 __sclp_vt220_init(int early)
690 if (sclp_vt220_initialized)
692 sclp_vt220_initialized = 1;
693 spin_lock_init(&sclp_vt220_lock);
694 INIT_LIST_HEAD(&sclp_vt220_empty);
695 INIT_LIST_HEAD(&sclp_vt220_outqueue);
696 init_waitqueue_head(&sclp_vt220_waitq);
697 init_timer(&sclp_vt220_timer);
698 sclp_vt220_current_request = NULL;
699 sclp_vt220_buffered_chars = 0;
700 sclp_vt220_outqueue_count = 0;
701 sclp_vt220_tty = NULL;
702 sclp_vt220_flush_later = 0;
704 /* Allocate pages for output buffering */
705 for (i = 0; i < (early ? MAX_CONSOLE_PAGES : MAX_KMEM_PAGES); i++) {
707 page = alloc_bootmem_low_pages(PAGE_SIZE);
709 page = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
712 list_add_tail((struct list_head *) page, &sclp_vt220_empty);
717 static struct tty_operations sclp_vt220_ops = {
718 .open = sclp_vt220_open,
719 .close = sclp_vt220_close,
720 .write = sclp_vt220_write,
721 .put_char = sclp_vt220_put_char,
722 .flush_chars = sclp_vt220_flush_chars,
723 .write_room = sclp_vt220_write_room,
724 .chars_in_buffer = sclp_vt220_chars_in_buffer,
725 .flush_buffer = sclp_vt220_flush_buffer
729 * Register driver with SCLP and Linux and initialize internal tty structures.
732 sclp_vt220_tty_init(void)
734 struct tty_driver *driver;
737 /* Note: we're not testing for CONSOLE_IS_SCLP here to preserve
738 * symmetry between VM and LPAR systems regarding ttyS1. */
739 driver = alloc_tty_driver(1);
742 rc = __sclp_vt220_init(0);
744 put_tty_driver(driver);
747 rc = sclp_register(&sclp_vt220_register);
749 printk(KERN_ERR SCLP_VT220_PRINT_HEADER
750 "could not register tty - "
751 "sclp_register returned %d\n", rc);
752 put_tty_driver(driver);
756 driver->owner = THIS_MODULE;
757 driver->driver_name = SCLP_VT220_DRIVER_NAME;
758 driver->name = SCLP_VT220_DEVICE_NAME;
759 driver->major = SCLP_VT220_MAJOR;
760 driver->minor_start = SCLP_VT220_MINOR;
761 driver->type = TTY_DRIVER_TYPE_SYSTEM;
762 driver->subtype = SYSTEM_TYPE_TTY;
763 driver->init_termios = tty_std_termios;
764 driver->flags = TTY_DRIVER_REAL_RAW;
765 tty_set_operations(driver, &sclp_vt220_ops);
767 rc = tty_register_driver(driver);
769 printk(KERN_ERR SCLP_VT220_PRINT_HEADER
770 "could not register tty - "
771 "tty_register_driver returned %d\n", rc);
772 put_tty_driver(driver);
775 sclp_vt220_driver = driver;
779 module_init(sclp_vt220_tty_init);
781 #ifdef CONFIG_SCLP_VT220_CONSOLE
784 sclp_vt220_con_write(struct console *con, const char *buf, unsigned int count)
786 __sclp_vt220_write((const unsigned char *) buf, count, 1, 1);
789 static struct tty_driver *
790 sclp_vt220_con_device(struct console *c, int *index)
793 return sclp_vt220_driver;
797 * This routine is called from panic when the kernel is going to give up.
798 * We have to make sure that all buffers will be flushed to the SCLP.
799 * Note that this function may be called from within an interrupt context.
802 sclp_vt220_con_unblank(void)
804 __sclp_vt220_flush_buffer();
807 /* Structure needed to register with printk */
808 static struct console sclp_vt220_console =
810 .name = SCLP_VT220_CONSOLE_NAME,
811 .write = sclp_vt220_con_write,
812 .device = sclp_vt220_con_device,
813 .unblank = sclp_vt220_con_unblank,
814 .flags = CON_PRINTBUFFER,
815 .index = SCLP_VT220_CONSOLE_INDEX
819 sclp_vt220_con_init(void)
823 if (!CONSOLE_IS_SCLP)
825 rc = __sclp_vt220_init(1);
828 /* Attach linux console */
829 register_console(&sclp_vt220_console);
833 console_initcall(sclp_vt220_con_init);
834 #endif /* CONFIG_SCLP_VT220_CONSOLE */