diff options
author | Daniel Axtens <dja@axtens.net> | 2015-04-14 01:28:46 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-10 13:19:06 -0400 |
commit | 80463501fe3a6cfdfb0aca92b1f2abbda61092a1 (patch) | |
tree | 6e79f925ad0d81be32bf866c95c1d42cd3f299ae | |
parent | 03ac6b3499c8a0b1fbb5c33ad6234a9e860f2614 (diff) |
tty/hvc: remove celleb-only beat driver
The beat hvc driver is only used by celleb.
celleb has been dropped [1], so drop the drivers.
[1] http://patchwork.ozlabs.org/patch/451730/
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Jiri Slaby <jslaby@suse.cz>
CC: Valentin Rothberg <valentinrothberg@gmail.com>
CC: mpe@ellerman.id.au
CC: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/hvc/Kconfig | 7 | ||||
-rw-r--r-- | drivers/tty/hvc/Makefile | 1 | ||||
-rw-r--r-- | drivers/tty/hvc/hvc_beat.c | 134 |
3 files changed, 0 insertions, 142 deletions
diff --git a/drivers/tty/hvc/Kconfig b/drivers/tty/hvc/Kconfig index 8902f9b4df71..2509d057b99c 100644 --- a/drivers/tty/hvc/Kconfig +++ b/drivers/tty/hvc/Kconfig | |||
@@ -42,13 +42,6 @@ config HVC_RTAS | |||
42 | help | 42 | help |
43 | IBM Console device driver which makes use of RTAS | 43 | IBM Console device driver which makes use of RTAS |
44 | 44 | ||
45 | config HVC_BEAT | ||
46 | bool "Toshiba's Beat Hypervisor Console support" | ||
47 | depends on PPC_CELLEB | ||
48 | select HVC_DRIVER | ||
49 | help | ||
50 | Toshiba's Cell Reference Set Beat Console device driver | ||
51 | |||
52 | config HVC_IUCV | 45 | config HVC_IUCV |
53 | bool "z/VM IUCV Hypervisor console support (VM only)" | 46 | bool "z/VM IUCV Hypervisor console support (VM only)" |
54 | depends on S390 | 47 | depends on S390 |
diff --git a/drivers/tty/hvc/Makefile b/drivers/tty/hvc/Makefile index 4ca3723b0a3a..6a2702be76d1 100644 --- a/drivers/tty/hvc/Makefile +++ b/drivers/tty/hvc/Makefile | |||
@@ -4,7 +4,6 @@ obj-$(CONFIG_HVC_OLD_HVSI) += hvsi.o | |||
4 | obj-$(CONFIG_HVC_RTAS) += hvc_rtas.o | 4 | obj-$(CONFIG_HVC_RTAS) += hvc_rtas.o |
5 | obj-$(CONFIG_HVC_TILE) += hvc_tile.o | 5 | obj-$(CONFIG_HVC_TILE) += hvc_tile.o |
6 | obj-$(CONFIG_HVC_DCC) += hvc_dcc.o | 6 | obj-$(CONFIG_HVC_DCC) += hvc_dcc.o |
7 | obj-$(CONFIG_HVC_BEAT) += hvc_beat.o | ||
8 | obj-$(CONFIG_HVC_DRIVER) += hvc_console.o | 7 | obj-$(CONFIG_HVC_DRIVER) += hvc_console.o |
9 | obj-$(CONFIG_HVC_IRQ) += hvc_irq.o | 8 | obj-$(CONFIG_HVC_IRQ) += hvc_irq.o |
10 | obj-$(CONFIG_HVC_XEN) += hvc_xen.o | 9 | obj-$(CONFIG_HVC_XEN) += hvc_xen.o |
diff --git a/drivers/tty/hvc/hvc_beat.c b/drivers/tty/hvc/hvc_beat.c deleted file mode 100644 index 1560d235449e..000000000000 --- a/drivers/tty/hvc/hvc_beat.c +++ /dev/null | |||
@@ -1,134 +0,0 @@ | |||
1 | /* | ||
2 | * Beat hypervisor console driver | ||
3 | * | ||
4 | * (C) Copyright 2006 TOSHIBA CORPORATION | ||
5 | * | ||
6 | * This code is based on drivers/char/hvc_rtas.c: | ||
7 | * (C) Copyright IBM Corporation 2001-2005 | ||
8 | * (C) Copyright Red Hat, Inc. 2005 | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License along | ||
21 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
22 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
23 | */ | ||
24 | |||
25 | #include <linux/module.h> | ||
26 | #include <linux/init.h> | ||
27 | #include <linux/err.h> | ||
28 | #include <linux/string.h> | ||
29 | #include <linux/console.h> | ||
30 | #include <asm/prom.h> | ||
31 | #include <asm/hvconsole.h> | ||
32 | #include <asm/firmware.h> | ||
33 | |||
34 | #include "hvc_console.h" | ||
35 | |||
36 | extern int64_t beat_get_term_char(uint64_t, uint64_t *, uint64_t *, uint64_t *); | ||
37 | extern int64_t beat_put_term_char(uint64_t, uint64_t, uint64_t, uint64_t); | ||
38 | |||
39 | struct hvc_struct *hvc_beat_dev = NULL; | ||
40 | |||
41 | /* bug: only one queue is available regardless of vtermno */ | ||
42 | static int hvc_beat_get_chars(uint32_t vtermno, char *buf, int cnt) | ||
43 | { | ||
44 | static unsigned char q[sizeof(unsigned long) * 2] | ||
45 | __attribute__((aligned(sizeof(unsigned long)))); | ||
46 | static int qlen = 0; | ||
47 | u64 got; | ||
48 | |||
49 | again: | ||
50 | if (qlen) { | ||
51 | if (qlen > cnt) { | ||
52 | memcpy(buf, q, cnt); | ||
53 | qlen -= cnt; | ||
54 | memmove(q + cnt, q, qlen); | ||
55 | return cnt; | ||
56 | } else { /* qlen <= cnt */ | ||
57 | int r; | ||
58 | |||
59 | memcpy(buf, q, qlen); | ||
60 | r = qlen; | ||
61 | qlen = 0; | ||
62 | return r; | ||
63 | } | ||
64 | } | ||
65 | if (beat_get_term_char(vtermno, &got, | ||
66 | ((u64 *)q), ((u64 *)q) + 1) == 0) { | ||
67 | qlen = got; | ||
68 | goto again; | ||
69 | } | ||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | static int hvc_beat_put_chars(uint32_t vtermno, const char *buf, int cnt) | ||
74 | { | ||
75 | unsigned long kb[2]; | ||
76 | int rest, nlen; | ||
77 | |||
78 | for (rest = cnt; rest > 0; rest -= nlen) { | ||
79 | nlen = (rest > 16) ? 16 : rest; | ||
80 | memcpy(kb, buf, nlen); | ||
81 | beat_put_term_char(vtermno, nlen, kb[0], kb[1]); | ||
82 | buf += nlen; | ||
83 | } | ||
84 | return cnt; | ||
85 | } | ||
86 | |||
87 | static const struct hv_ops hvc_beat_get_put_ops = { | ||
88 | .get_chars = hvc_beat_get_chars, | ||
89 | .put_chars = hvc_beat_put_chars, | ||
90 | }; | ||
91 | |||
92 | static int hvc_beat_useit = 1; | ||
93 | |||
94 | static int hvc_beat_config(char *p) | ||
95 | { | ||
96 | hvc_beat_useit = simple_strtoul(p, NULL, 0); | ||
97 | return 0; | ||
98 | } | ||
99 | |||
100 | static int __init hvc_beat_console_init(void) | ||
101 | { | ||
102 | if (hvc_beat_useit && of_machine_is_compatible("Beat")) { | ||
103 | hvc_instantiate(0, 0, &hvc_beat_get_put_ops); | ||
104 | } | ||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | /* temp */ | ||
109 | static int __init hvc_beat_init(void) | ||
110 | { | ||
111 | struct hvc_struct *hp; | ||
112 | |||
113 | if (!firmware_has_feature(FW_FEATURE_BEAT)) | ||
114 | return -ENODEV; | ||
115 | |||
116 | hp = hvc_alloc(0, 0, &hvc_beat_get_put_ops, 16); | ||
117 | if (IS_ERR(hp)) | ||
118 | return PTR_ERR(hp); | ||
119 | hvc_beat_dev = hp; | ||
120 | return 0; | ||
121 | } | ||
122 | |||
123 | static void __exit hvc_beat_exit(void) | ||
124 | { | ||
125 | if (hvc_beat_dev) | ||
126 | hvc_remove(hvc_beat_dev); | ||
127 | } | ||
128 | |||
129 | module_init(hvc_beat_init); | ||
130 | module_exit(hvc_beat_exit); | ||
131 | |||
132 | __setup("hvc_beat=", hvc_beat_config); | ||
133 | |||
134 | console_initcall(hvc_beat_console_init); | ||