[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>
This commit is contained in:
parent
31c72ad0d1
commit
94c8f9f974
1 changed files with 7 additions and 0 deletions
|
@ -42,6 +42,7 @@
|
||||||
#include <linux/tty_flip.h>
|
#include <linux/tty_flip.h>
|
||||||
#include <linux/sysrq.h>
|
#include <linux/sysrq.h>
|
||||||
|
|
||||||
|
#include <asm/firmware.h>
|
||||||
#include <asm/iseries/vio.h>
|
#include <asm/iseries/vio.h>
|
||||||
#include <asm/iseries/hv_lp_event.h>
|
#include <asm/iseries/hv_lp_event.h>
|
||||||
#include <asm/iseries/hv_call_event.h>
|
#include <asm/iseries/hv_call_event.h>
|
||||||
|
@ -1060,6 +1061,9 @@ static int __init viocons_init2(void)
|
||||||
atomic_t wait_flag;
|
atomic_t wait_flag;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (!firmware_has_feature(FW_FEATURE_ISERIES))
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
/* +2 for fudge */
|
/* +2 for fudge */
|
||||||
rc = viopath_open(HvLpConfig_getPrimaryLpIndex(),
|
rc = viopath_open(HvLpConfig_getPrimaryLpIndex(),
|
||||||
viomajorsubtype_chario, VIOCHAR_WINDOW + 2);
|
viomajorsubtype_chario, VIOCHAR_WINDOW + 2);
|
||||||
|
@ -1145,6 +1149,9 @@ static int __init viocons_init(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!firmware_has_feature(FW_FEATURE_ISERIES))
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
printk(VIOCONS_KERN_INFO "registering console\n");
|
printk(VIOCONS_KERN_INFO "registering console\n");
|
||||||
for (i = 0; i < VTTY_PORTS; i++) {
|
for (i = 0; i < VTTY_PORTS; i++) {
|
||||||
port_info[i].lp = HvLpIndexInvalid;
|
port_info[i].lp = HvLpIndexInvalid;
|
||||||
|
|
Loading…
Reference in a new issue