[Skiboot] [PATCH 6/8] lpc: Migrate BAR assignment to phys_map_get()

Michael Neuling mikey at neuling.org
Tue May 2 13:23:11 AEST 2017


Keeps existing address. No functional change.

Signed-off-by: Michael Neuling <mikey at neuling.org>
---
 hdata/fsp.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hdata/fsp.c b/hdata/fsp.c
index 0a89d66f98..6d4290411a 100644
--- a/hdata/fsp.c
+++ b/hdata/fsp.c
@@ -21,6 +21,8 @@
 #include <ccan/str/str.h>
 #include <interrupts.h>
 #include <inttypes.h>
+#include <phys-map.h>
+#include <chip.h>
 
 #include "hdata.h"
 
@@ -315,12 +317,9 @@ static void bmc_create_node(const struct HDIF_common_hdr *sp)
 		return;
 
 #define GB (1024ul * 1024ul * 1024ul)
-#define MMIO_LPC_BASE_P9 0x6030000000000ul
-#define MMIO_STRIDE_P9     0x40000000000ul
-
 	chip_id = be32_to_cpu(iopath->lpc.chip_id);
 
-	lpcm_base = MMIO_LPC_BASE_P9 + MMIO_STRIDE_P9 * chip_id;
+	phys_map_get(get_chip(chip_id), LPC_BUS, 0, &lpcm_base, NULL);
 	lpcm = dt_new_addr(dt_root, "lpcm-opb", lpcm_base);
 	assert(lpcm);
 
-- 
2.11.0



More information about the Skiboot mailing list