aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc64')
-rw-r--r--arch/ppc64/kernel/hvconsole.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/arch/ppc64/kernel/hvconsole.c b/arch/ppc64/kernel/hvconsole.c
index 94fb06198ea2..9d8876d92eb9 100644
--- a/arch/ppc64/kernel/hvconsole.c
+++ b/arch/ppc64/kernel/hvconsole.c
@@ -27,7 +27,6 @@
27#include <linux/module.h> 27#include <linux/module.h>
28#include <asm/hvcall.h> 28#include <asm/hvcall.h>
29#include <asm/hvconsole.h> 29#include <asm/hvconsole.h>
30#include <asm/prom.h>
31 30
32/** 31/**
33 * hvc_get_chars - retrieve characters from firmware for denoted vterm adatper 32 * hvc_get_chars - retrieve characters from firmware for denoted vterm adatper
@@ -88,35 +87,3 @@ int hvc_put_chars(uint32_t vtermno, const char *buf, int count)
88} 87}
89 88
90EXPORT_SYMBOL(hvc_put_chars); 89EXPORT_SYMBOL(hvc_put_chars);
91
92/*
93 * We hope/assume that the first vty found corresponds to the first console
94 * device.
95 */
96static int hvc_find_vtys(void)
97{
98 struct device_node *vty;
99 int num_found = 0;
100
101 for (vty = of_find_node_by_name(NULL, "vty"); vty != NULL;
102 vty = of_find_node_by_name(vty, "vty")) {
103 uint32_t *vtermno;
104
105 /* We have statically defined space for only a certain number of
106 * console adapters. */
107 if (num_found >= MAX_NR_HVC_CONSOLES)
108 break;
109
110 vtermno = (uint32_t *)get_property(vty, "reg", NULL);
111 if (!vtermno)
112 continue;
113
114 if (device_is_compatible(vty, "hvterm1")) {
115 hvc_instantiate(*vtermno, num_found);
116 ++num_found;
117 }
118 }
119
120 return num_found;
121}
122console_initcall(hvc_find_vtys);