aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ppc64/kernel/iSeries_setup.c3
-rw-r--r--arch/ppc64/kernel/pSeries_lpar.c1
-rw-r--r--arch/ppc64/kernel/pSeries_setup.c2
-rw-r--r--include/asm-ppc64/firmware.h22
4 files changed, 23 insertions, 5 deletions
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c
index a649edbb23b6..460e7df681a1 100644
--- a/arch/ppc64/kernel/iSeries_setup.c
+++ b/arch/ppc64/kernel/iSeries_setup.c
@@ -39,6 +39,7 @@
39#include <asm/cputable.h> 39#include <asm/cputable.h>
40#include <asm/sections.h> 40#include <asm/sections.h>
41#include <asm/iommu.h> 41#include <asm/iommu.h>
42#include <asm/firmware.h>
42 43
43#include <asm/time.h> 44#include <asm/time.h>
44#include "iSeries_setup.h" 45#include "iSeries_setup.h"
@@ -314,6 +315,8 @@ static void __init iSeries_init_early(void)
314 315
315 DBG(" -> iSeries_init_early()\n"); 316 DBG(" -> iSeries_init_early()\n");
316 317
318 ppc64_firmware_features = FW_FEATURE_ISERIES;
319
317 ppcdbg_initialize(); 320 ppcdbg_initialize();
318 321
319#if defined(CONFIG_BLK_DEV_INITRD) 322#if defined(CONFIG_BLK_DEV_INITRD)
diff --git a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c
index 74dd144dcce8..56845543c891 100644
--- a/arch/ppc64/kernel/pSeries_lpar.c
+++ b/arch/ppc64/kernel/pSeries_lpar.c
@@ -52,7 +52,6 @@ EXPORT_SYMBOL(plpar_hcall_4out);
52EXPORT_SYMBOL(plpar_hcall_norets); 52EXPORT_SYMBOL(plpar_hcall_norets);
53EXPORT_SYMBOL(plpar_hcall_8arg_2ret); 53EXPORT_SYMBOL(plpar_hcall_8arg_2ret);
54 54
55extern void fw_feature_init(void);
56extern void pSeries_find_serial_port(void); 55extern void pSeries_find_serial_port(void);
57 56
58 57
diff --git a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c
index 7ae7a2ca1085..54e0651ba3fd 100644
--- a/arch/ppc64/kernel/pSeries_setup.c
+++ b/arch/ppc64/kernel/pSeries_setup.c
@@ -262,7 +262,7 @@ arch_initcall(pSeries_init_panel);
262 * using contents of device-tree/ibm,hypertas-functions. 262 * using contents of device-tree/ibm,hypertas-functions.
263 * Ultimately this functionality may be moved into prom.c prom_init(). 263 * Ultimately this functionality may be moved into prom.c prom_init().
264 */ 264 */
265void __init fw_feature_init(void) 265static void __init fw_feature_init(void)
266{ 266{
267 struct device_node * dn; 267 struct device_node * dn;
268 char * hypertas; 268 char * hypertas;
diff --git a/include/asm-ppc64/firmware.h b/include/asm-ppc64/firmware.h
index e3725f3c8ea6..22bb85cf60af 100644
--- a/include/asm-ppc64/firmware.h
+++ b/include/asm-ppc64/firmware.h
@@ -44,9 +44,10 @@
44#define FW_FEATURE_XDABR (1UL<<18) 44#define FW_FEATURE_XDABR (1UL<<18)
45#define FW_FEATURE_MULTITCE (1UL<<19) 45#define FW_FEATURE_MULTITCE (1UL<<19)
46#define FW_FEATURE_SPLPAR (1UL<<20) 46#define FW_FEATURE_SPLPAR (1UL<<20)
47#define FW_FEATURE_ISERIES (1UL<<21)
47 48
48enum { 49enum {
49 FW_FEATURE_PSERIES = FW_FEATURE_PFT | FW_FEATURE_TCE | 50 FW_FEATURE_PSERIES_POSSIBLE = FW_FEATURE_PFT | FW_FEATURE_TCE |
50 FW_FEATURE_SPRG0 | FW_FEATURE_DABR | FW_FEATURE_COPY | 51 FW_FEATURE_SPRG0 | FW_FEATURE_DABR | FW_FEATURE_COPY |
51 FW_FEATURE_ASR | FW_FEATURE_DEBUG | FW_FEATURE_TERM | 52 FW_FEATURE_ASR | FW_FEATURE_DEBUG | FW_FEATURE_TERM |
52 FW_FEATURE_PERF | FW_FEATURE_DUMP | FW_FEATURE_INTERRUPT | 53 FW_FEATURE_PERF | FW_FEATURE_DUMP | FW_FEATURE_INTERRUPT |
@@ -54,11 +55,25 @@ enum {
54 FW_FEATURE_VIO | FW_FEATURE_RDMA | FW_FEATURE_LLAN | 55 FW_FEATURE_VIO | FW_FEATURE_RDMA | FW_FEATURE_LLAN |
55 FW_FEATURE_BULK | FW_FEATURE_XDABR | FW_FEATURE_MULTITCE | 56 FW_FEATURE_BULK | FW_FEATURE_XDABR | FW_FEATURE_MULTITCE |
56 FW_FEATURE_SPLPAR, 57 FW_FEATURE_SPLPAR,
58 FW_FEATURE_PSERIES_ALWAYS = 0,
59 FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES,
60 FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES,
57 FW_FEATURE_POSSIBLE = 61 FW_FEATURE_POSSIBLE =
58#ifdef CONFIG_PPC_PSERIES 62#ifdef CONFIG_PPC_PSERIES
59 FW_FEATURE_PSERIES | 63 FW_FEATURE_PSERIES_POSSIBLE |
64#endif
65#ifdef CONFIG_PPC_ISERIES
66 FW_FEATURE_ISERIES_POSSIBLE |
60#endif 67#endif
61 0, 68 0,
69 FW_FEATURE_ALWAYS =
70#ifdef CONFIG_PPC_PSERIES
71 FW_FEATURE_PSERIES_ALWAYS &
72#endif
73#ifdef CONFIG_PPC_ISERIES
74 FW_FEATURE_ISERIES_ALWAYS &
75#endif
76 FW_FEATURE_POSSIBLE,
62}; 77};
63 78
64/* This is used to identify firmware features which are available 79/* This is used to identify firmware features which are available
@@ -68,7 +83,8 @@ extern unsigned long ppc64_firmware_features;
68 83
69static inline unsigned long firmware_has_feature(unsigned long feature) 84static inline unsigned long firmware_has_feature(unsigned long feature)
70{ 85{
71 return ppc64_firmware_features & feature & FW_FEATURE_POSSIBLE; 86 return (FW_FEATURE_ALWAYS & feature) ||
87 (FW_FEATURE_POSSIBLE & ppc64_firmware_features & feature);
72} 88}
73 89
74#ifdef CONFIG_PPC_PSERIES 90#ifdef CONFIG_PPC_PSERIES