soc/intel/xeon_sp: Drop code to locate the UBOX bus
Drop the code to retrieve the UBOX bus numbers. Only keep
a minial function that works when called from socket0 to retrieve
the bus for UBOX(1).
Change-Id: I2b18f02f62b69ec7c73cd5665102cb6bfc6e64b5
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80102
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
diff --git a/src/soc/intel/xeon_sp/spr/soc_util.c b/src/soc/intel/xeon_sp/spr/soc_util.c
index 344fa5b..be1e06c 100644
--- a/src/soc/intel/xeon_sp/spr/soc_util.c
+++ b/src/soc/intel/xeon_sp/spr/soc_util.c
@@ -144,25 +144,20 @@
return hob->PlatformData.IIO_resource[socket].StackRes[stack].BusBase;
}
-uint32_t get_ubox_busno(uint32_t socket, uint8_t offset)
+/* Returns the UBOX(offset) bus number for socket0 */
+uint8_t socket0_get_ubox_busno(uint8_t offset)
{
const IIO_UDS *hob = get_iio_uds();
- assert(socket < CONFIG_MAX_SOCKET);
for (int stack = 0; stack < MAX_LOGIC_IIO_STACK; ++stack) {
- if (hob->PlatformData.IIO_resource[socket].StackRes[stack].Personality
+ if (hob->PlatformData.IIO_resource[0].StackRes[stack].Personality
== TYPE_UBOX)
- return (hob->PlatformData.IIO_resource[socket].StackRes[stack].BusBase
+ return (hob->PlatformData.IIO_resource[0].StackRes[stack].BusBase
+ offset);
}
die("Unable to locate UBOX BUS NO");
}
-uint32_t get_socket_ubox_busno(uint32_t socket)
-{
- return get_ubox_busno(socket, UNCORE_BUS_1);
-}
-
void bios_done_msr(void *unused)
{
msr_t msr = rdmsr(MSR_BIOS_DONE);