diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2016-09-23 15:55:14 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-09-27 16:16:35 +1000 |
commit | 11c2a586c24890b50d986efa5f46fcccec5d80f4 (patch) | |
tree | 1a4948def6b3db450233f03a465febd8c94845dc /hdata/spira.c | |
parent | b5e54375bdc424eb2e709d41d2306d854f7e07bb (diff) | |
download | blackbird-skiboot-11c2a586c24890b50d986efa5f46fcccec5d80f4.tar.gz blackbird-skiboot-11c2a586c24890b50d986efa5f46fcccec5d80f4.zip |
core/init: remove master_cpu parameter
master_cpu is used to determine the ChipTOD master if no ChipTOD
information is available in the HDAT. However, it is set to zero at every
skiboot entry point (fdt_entry, the 0x180 FSP entry and
opal_boot_trampoline) and is otherwise unused. This patch removes this
passing around and uses the boot CPU PIR to find the ChipTOD master rather
than zero.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata/spira.c')
-rw-r--r-- | hdata/spira.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/hdata/spira.c b/hdata/spira.c index e4e6b2d5..330108b1 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -624,10 +624,10 @@ static bool add_chiptod_old(void) return found; } -static bool add_chiptod_new(uint32_t master_cpu) +static bool add_chiptod_new(void) { const void *hdif; - unsigned int i, master_chip; + unsigned int i; bool found = false; /* @@ -636,8 +636,6 @@ static bool add_chiptod_new(uint32_t master_cpu) if (!get_hdif(&spira.ntuples.proc_chip, SPPCRD_HDIF_SIG)) return found; - master_chip = pir_to_chip_id(master_cpu); - for_each_ntuple_idx(&spira.ntuples.proc_chip, hdif, i, SPPCRD_HDIF_SIG) { const struct sppcrd_chip_info *cinfo; @@ -668,12 +666,11 @@ static bool add_chiptod_new(uint32_t master_cpu) /* The FSP may strip the chiptod info from HDAT; if we find * a zero-ed out entry, assume that the chiptod is * present, but we don't have any primary/secondary info. In - * this case, pick the primary based on the CPU that was - * assigned master. + * this case, pick chip zero as the master. */ if (!size) { flags = CHIPTOD_ID_FLAGS_STATUS_OK; - if (be32_to_cpu(cinfo->xscom_id) == master_chip) + if (be32_to_cpu(cinfo->xscom_id) == 0x0) flags |= CHIPTOD_ID_FLAGS_PRIMARY; } @@ -1092,7 +1089,7 @@ static void fixup_spira(void) spira.ntuples.hs_data = spiras->ntuples.hs_data; } -int parse_hdat(bool is_opal, uint32_t master_cpu) +int parse_hdat(bool is_opal) { cpu_type = PVR_TYPE(mfspr(SPR_PVR)); @@ -1133,7 +1130,7 @@ int parse_hdat(bool is_opal, uint32_t master_cpu) fsp_parse(); /* Add ChipTOD's */ - if (!add_chiptod_old() && !add_chiptod_new(master_cpu)) + if (!add_chiptod_old() && !add_chiptod_new()) prerror("CHIPTOD: No ChipTOD found !\n"); /* Add NX */ |