aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hvc_iseries.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-10-04 01:02:27 -0400
committerPaul Mackerras <paulus@samba.org>2006-10-04 01:02:27 -0400
commitc730f5b621afa33e9f4939da9078669162ebff4e (patch)
treeac78a2cea0fbf365ef659c26ab192e263debb544 /drivers/char/hvc_iseries.c
parent0a730ae59960165ae50de3284fb50316d1755d98 (diff)
parent80a544cebca5f28397020332e21e04d639a18943 (diff)
Merge branch 'master' of git://oak/home/sfr/kernels/iseries/work
Diffstat (limited to 'drivers/char/hvc_iseries.c')
-rw-r--r--drivers/char/hvc_iseries.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c
index 8b6f197e5f8c..f144a947bd17 100644
--- a/drivers/char/hvc_iseries.c
+++ b/drivers/char/hvc_iseries.c
@@ -29,6 +29,7 @@
29#include <asm/hvconsole.h> 29#include <asm/hvconsole.h>
30#include <asm/vio.h> 30#include <asm/vio.h>
31#include <asm/prom.h> 31#include <asm/prom.h>
32#include <asm/firmware.h>
32#include <asm/iseries/vio.h> 33#include <asm/iseries/vio.h>
33#include <asm/iseries/hv_call.h> 34#include <asm/iseries/hv_call.h>
34#include <asm/iseries/hv_lp_config.h> 35#include <asm/iseries/hv_lp_config.h>
@@ -488,6 +489,9 @@ static int hvc_vio_init(void)
488 atomic_t wait_flag; 489 atomic_t wait_flag;
489 int rc; 490 int rc;
490 491
492 if (!firmware_has_feature(FW_FEATURE_ISERIES))
493 return -EIO;
494
491 /* +2 for fudge */ 495 /* +2 for fudge */
492 rc = viopath_open(HvLpConfig_getPrimaryLpIndex(), 496 rc = viopath_open(HvLpConfig_getPrimaryLpIndex(),
493 viomajorsubtype_chario, VIOCHAR_WINDOW + 2); 497 viomajorsubtype_chario, VIOCHAR_WINDOW + 2);
@@ -562,7 +566,7 @@ static int hvc_find_vtys(void)
562 566
563 for (vty = of_find_node_by_name(NULL, "vty"); vty != NULL; 567 for (vty = of_find_node_by_name(NULL, "vty"); vty != NULL;
564 vty = of_find_node_by_name(vty, "vty")) { 568 vty = of_find_node_by_name(vty, "vty")) {
565 uint32_t *vtermno; 569 const uint32_t *vtermno;
566 570
567 /* We have statically defined space for only a certain number 571 /* We have statically defined space for only a certain number
568 * of console adapters. 572 * of console adapters.
@@ -571,7 +575,7 @@ static int hvc_find_vtys(void)
571 (num_found >= VTTY_PORTS)) 575 (num_found >= VTTY_PORTS))
572 break; 576 break;
573 577
574 vtermno = (uint32_t *)get_property(vty, "reg", NULL); 578 vtermno = get_property(vty, "reg", NULL);
575 if (!vtermno) 579 if (!vtermno)
576 continue; 580 continue;
577 581