diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-07-05 15:03:48 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-07-21 18:56:13 +1000 |
commit | 3808a88985b4f5f5e947c364debce4441a380fb8 (patch) | |
tree | 582685ef5045583e4112098e29a0f22a342e5a2b /arch/powerpc/platforms/pseries/setup.c | |
parent | c40785ad305b32e9b0b5fbc888f1f5d57f29bf44 (diff) | |
download | talos-op-linux-3808a88985b4f5f5e947c364debce4441a380fb8.tar.gz talos-op-linux-3808a88985b4f5f5e947c364debce4441a380fb8.zip |
powerpc: Move FW feature probing out of pseries probe()
We move the function itself to pseries/firmware.c and call it along
with almost all other flat device-tree parsers from early_init_devtree()
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[mpe: Move #ifdefs into the header by providing pseries_probe_fw_features()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index e61e9b986e21..9cc9b88fce79 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -659,45 +659,6 @@ static void pseries_power_off(void) for (;;); } -/* - * Called very early, MMU is off, device-tree isn't unflattened - */ - -static int __init pseries_probe_fw_features(unsigned long node, - const char *uname, int depth, - void *data) -{ - const char *prop; - int len; - static int hypertas_found; - static int vec5_found; - - if (depth != 1) - return 0; - - if (!strcmp(uname, "rtas") || !strcmp(uname, "rtas@0")) { - prop = of_get_flat_dt_prop(node, "ibm,hypertas-functions", - &len); - if (prop) { - powerpc_firmware_features |= FW_FEATURE_LPAR; - fw_hypertas_feature_init(prop, len); - } - - hypertas_found = 1; - } - - if (!strcmp(uname, "chosen")) { - prop = of_get_flat_dt_prop(node, "ibm,architecture-vec-5", - &len); - if (prop) - fw_vec5_feature_init(prop, len); - - vec5_found = 1; - } - - return hypertas_found && vec5_found; -} - static int __init pSeries_probe(void) { unsigned long root = of_get_flat_dt_root(); @@ -717,8 +678,6 @@ static int __init pSeries_probe(void) pr_debug("pSeries detected, looking for LPAR capability...\n"); - /* Now try to figure out if we are running on LPAR */ - of_scan_flat_dt(pseries_probe_fw_features, NULL); #ifdef __LITTLE_ENDIAN__ if (firmware_has_feature(FW_FEATURE_SET_MODE)) { |