aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/viocons.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2006-12-14 23:45:13 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-20 00:37:48 -0500
commit94c8f9f974f2ad29b90b2830b189d74a633fef49 (patch)
treeb28a0c2f1d928a890283b0365ec2e5fe22469ae0 /drivers/char/viocons.c
parent31c72ad0d10b561e7e5f843747e7d0c1abf4d6f7 (diff)
[POWERPC] iSeries: fix viocons init
Only initialise viocons on legacy iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/char/viocons.c')
-rw-r--r--drivers/char/viocons.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index 0e0da443cbd5..8de6b95aeb84 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -42,6 +42,7 @@
42#include <linux/tty_flip.h> 42#include <linux/tty_flip.h>
43#include <linux/sysrq.h> 43#include <linux/sysrq.h>
44 44
45#include <asm/firmware.h>
45#include <asm/iseries/vio.h> 46#include <asm/iseries/vio.h>
46#include <asm/iseries/hv_lp_event.h> 47#include <asm/iseries/hv_lp_event.h>
47#include <asm/iseries/hv_call_event.h> 48#include <asm/iseries/hv_call_event.h>
@@ -1060,6 +1061,9 @@ static int __init viocons_init2(void)
1060 atomic_t wait_flag; 1061 atomic_t wait_flag;
1061 int rc; 1062 int rc;
1062 1063
1064 if (!firmware_has_feature(FW_FEATURE_ISERIES))
1065 return -ENODEV;
1066
1063 /* +2 for fudge */ 1067 /* +2 for fudge */
1064 rc = viopath_open(HvLpConfig_getPrimaryLpIndex(), 1068 rc = viopath_open(HvLpConfig_getPrimaryLpIndex(),
1065 viomajorsubtype_chario, VIOCHAR_WINDOW + 2); 1069 viomajorsubtype_chario, VIOCHAR_WINDOW + 2);
@@ -1145,6 +1149,9 @@ static int __init viocons_init(void)
1145{ 1149{
1146 int i; 1150 int i;
1147 1151
1152 if (!firmware_has_feature(FW_FEATURE_ISERIES))
1153 return -ENODEV;
1154
1148 printk(VIOCONS_KERN_INFO "registering console\n"); 1155 printk(VIOCONS_KERN_INFO "registering console\n");
1149 for (i = 0; i < VTTY_PORTS; i++) { 1156 for (i = 0; i < VTTY_PORTS; i++) {
1150 port_info[i].lp = HvLpIndexInvalid; 1157 port_info[i].lp = HvLpIndexInvalid;