diff options
author | Maxim Polyakov <max.senia.poliak@gmail.com> | 2021-01-15 01:34:02 +0300 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-02-15 08:18:07 +0000 |
commit | 19d4364ed637a62c607abe9ef41955efd9f795b4 (patch) | |
tree | 27b24b167d7502bfee6a8eb8b77fc3de1f6bf822 /src | |
parent | f1249399454ecbc67213fcacd131e13e0b3894e7 (diff) |
intel/xeon_sp/util: Use get_stack_busno instead of get_cpubusnos
This function is more convenient to get the value of a single bus number
than get_cpubusnos(). Now get_cpubusnos is not used anywhere, so remove
it.
Change-Id: I71c06c2d69344d97e48609e67a3966ed8c671152
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49458
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/xeon_sp/include/soc/util.h | 1 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/util.c | 17 |
2 files changed, 1 insertions, 17 deletions
diff --git a/src/soc/intel/xeon_sp/include/soc/util.h b/src/soc/intel/xeon_sp/include/soc/util.h index 8ff54fc1cb..26bb3c3a89 100644 --- a/src/soc/intel/xeon_sp/include/soc/util.h +++ b/src/soc/intel/xeon_sp/include/soc/util.h @@ -6,7 +6,6 @@ #include <cpu/x86/msr.h> #include <hob_iiouds.h> -void get_cpubusnos(uint32_t *bus0, uint32_t *bus1, uint32_t *bus2, uint32_t *bus3); void unlock_pam_regions(void); uint8_t get_stack_busno(const uint8_t stack); msr_t read_msr_ppin(void); diff --git a/src/soc/intel/xeon_sp/util.c b/src/soc/intel/xeon_sp/util.c index c0b05cbf6c..baf51024cc 100644 --- a/src/soc/intel/xeon_sp/util.c +++ b/src/soc/intel/xeon_sp/util.c @@ -26,11 +26,10 @@ uint8_t get_stack_busno(const uint8_t stack) void unlock_pam_regions(void) { - uint32_t bus1 = 0; uint32_t pam0123_unlock_dram = 0x33333330; uint32_t pam456_unlock_dram = 0x00333333; + uint32_t bus1 = get_stack_busno(1); - get_cpubusnos(NULL, &bus1, NULL, NULL); pci_io_write_config32(PCI_DEV(bus1, SAD_ALL_DEV, SAD_ALL_FUNC), SAD_ALL_PAM0123_CSR, pam0123_unlock_dram); pci_io_write_config32(PCI_DEV(bus1, SAD_ALL_DEV, SAD_ALL_FUNC), @@ -44,20 +43,6 @@ void unlock_pam_regions(void) __FILE__, __func__, reg1, reg2); } -void get_cpubusnos(uint32_t *bus0, uint32_t *bus1, uint32_t *bus2, uint32_t *bus3) -{ - uint32_t bus = pci_io_read_config32(PCI_DEV(UBOX_DECS_BUS, UBOX_DECS_DEV, - UBOX_DECS_FUNC), UBOX_DECS_CPUBUSNO_CSR); - if (bus0) - *bus0 = (bus & 0xff); - if (bus1) - *bus1 = (bus >> 8) & 0xff; - if (bus2) - *bus2 = (bus >> 16) & 0xff; - if (bus3) - *bus3 = (bus >> 24) & 0xff; -} - msr_t read_msr_ppin(void) { msr_t ppin = {0}; |