vcc.c (4c472fc02e2a0f4c4e9a1c69f4b63c36df150e40) vcc.c (7330019160757744706cd559da935fae193058e5)
1// SPDX-License-Identifier: GPL-2.0
2/* vcc.c: sun4v virtual channel concentrator
3 *
4 * Copyright (C) 2017 Oracle. All rights reserved.
5 */
6
7#include <linux/delay.h>
8#include <linux/interrupt.h>
9#include <linux/module.h>
10#include <linux/slab.h>
11#include <linux/sysfs.h>
12#include <linux/tty.h>
13#include <linux/tty_flip.h>
14#include <asm/vio.h>
15#include <asm/ldc.h>
16
1// SPDX-License-Identifier: GPL-2.0
2/* vcc.c: sun4v virtual channel concentrator
3 *
4 * Copyright (C) 2017 Oracle. All rights reserved.
5 */
6
7#include <linux/delay.h>
8#include <linux/interrupt.h>
9#include <linux/module.h>
10#include <linux/slab.h>
11#include <linux/sysfs.h>
12#include <linux/tty.h>
13#include <linux/tty_flip.h>
14#include <asm/vio.h>
15#include <asm/ldc.h>
16
17#define DRV_MODULE_NAME "vcc"
18#define DRV_MODULE_VERSION "1.1"
19#define DRV_MODULE_RELDATE "July 1, 2017"
20
21static char version[] =
22 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")";
23
24MODULE_DESCRIPTION("Sun LDOM virtual console concentrator driver");
25MODULE_LICENSE("GPL");
17MODULE_DESCRIPTION("Sun LDOM virtual console concentrator driver");
18MODULE_LICENSE("GPL");
26MODULE_VERSION(DRV_MODULE_VERSION);
19MODULE_VERSION("1.1");
27
28struct vcc_port {
29 struct vio_driver_state vio;
30
31 spinlock_t lock;
32 char *domain;
33 struct tty_struct *tty; /* only populated while dev is open */
34 unsigned long index; /* index into the vcc_table */

--- 1026 unchanged lines hidden (view full) ---

1061};
1062
1063#define VCC_TTY_FLAGS (TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_REAL_RAW)
1064
1065static int vcc_tty_init(void)
1066{
1067 int rv;
1068
20
21struct vcc_port {
22 struct vio_driver_state vio;
23
24 spinlock_t lock;
25 char *domain;
26 struct tty_struct *tty; /* only populated while dev is open */
27 unsigned long index; /* index into the vcc_table */

--- 1026 unchanged lines hidden (view full) ---

1054};
1055
1056#define VCC_TTY_FLAGS (TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_REAL_RAW)
1057
1058static int vcc_tty_init(void)
1059{
1060 int rv;
1061
1069 pr_info("VCC: %s\n", version);
1070
1071 vcc_tty_driver = tty_alloc_driver(VCC_MAX_PORTS, VCC_TTY_FLAGS);
1072 if (IS_ERR(vcc_tty_driver)) {
1073 pr_err("VCC: TTY driver alloc failed\n");
1074 return PTR_ERR(vcc_tty_driver);
1075 }
1076
1077 vcc_tty_driver->driver_name = vcc_driver_name;
1078 vcc_tty_driver->name = vcc_device_node;

--- 60 unchanged lines hidden ---
1062 vcc_tty_driver = tty_alloc_driver(VCC_MAX_PORTS, VCC_TTY_FLAGS);
1063 if (IS_ERR(vcc_tty_driver)) {
1064 pr_err("VCC: TTY driver alloc failed\n");
1065 return PTR_ERR(vcc_tty_driver);
1066 }
1067
1068 vcc_tty_driver->driver_name = vcc_driver_name;
1069 vcc_tty_driver->name = vcc_device_node;

--- 60 unchanged lines hidden ---