/* SPDX-License-Identifier: GPL-2.0+ */ /* * hvc_console.h * Copyright (C) 2005 IBM Corporation * * Author(s): * Ryan S. Arnold <rsa@us.ibm.com> * * hvc_console header information: * moved here from arch/powerpc/include/asm/hvconsole.h * and drivers/char/hvc_console.c
*/
/* * This is the max number of console adapters that can/will be found as * console devices on first stage console init. Any number beyond this range * can't be used as a console device but is still a valid tty device.
*/ #define MAX_NR_HVC_CONSOLES 16
/* * The Linux TTY code does not support dynamic addition of tty derived devices * so we need to know how many tty devices we might need when space is allocated * for the tty device. Since this driver supports hotplug of vty adapters we * need to make sure we have enough allocated.
*/ #define HVC_ALLOC_TTY_ADAPTERS 8
struct hvc_struct { struct tty_port port;
spinlock_t lock; int index; int do_wakeup; int outbuf_size; int n_outbuf;
uint32_t vtermno; conststruct hv_ops *ops; int irq_requested; int data; struct winsize ws; struct work_struct tty_resize; struct list_head next; unsignedlong flags;
u8 outbuf[] __aligned(sizeof(long));
};
/* Callbacks for notification. Called in open, close and hangup */ int (*notifier_add)(struct hvc_struct *hp, int irq); void (*notifier_del)(struct hvc_struct *hp, int irq); void (*notifier_hangup)(struct hvc_struct *hp, int irq);
/* tiocmget/set implementation */ int (*tiocmget)(struct hvc_struct *hp); int (*tiocmset)(struct hvc_struct *hp, unsignedint set, unsignedint clear);
/* Register a vterm and a slot index for use as a console (console_init) */ externint hvc_instantiate(uint32_t vtermno, int index, conststruct hv_ops *ops);
/* register a vterm for hvc tty operation (module_init or hotplug add) */ externstruct hvc_struct * hvc_alloc(uint32_t vtermno, int data, conststruct hv_ops *ops, int outbuf_size); /* remove a vterm from hvc tty operation (module_exit or hotplug remove) */ externvoid hvc_remove(struct hvc_struct *hp);
/* data available */ int hvc_poll(struct hvc_struct *hp); void hvc_kick(void);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.