From 19d4364ed637a62c607abe9ef41955efd9f795b4 Mon Sep 17 00:00:00 2001 From: Maxim Polyakov Date: Fri, 15 Jan 2021 01:34:02 +0300 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49458 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/soc/intel/xeon_sp/include/soc/util.h | 1 - src/soc/intel/xeon_sp/util.c | 17 +---------------- 2 files changed, 1 insertion(+), 17 deletions(-) (limited to 'src/soc') 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 #include -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}; -- cgit v1.2.3