diff options
Diffstat (limited to 'include/asm-ppc64/firmware.h')
-rw-r--r-- | include/asm-ppc64/firmware.h | 22 |
1 files changed, 19 insertions, 3 deletions
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 | ||
48 | enum { | 49 | enum { |
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 | ||
69 | static inline unsigned long firmware_has_feature(unsigned long feature) | 84 | static 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 |