summaryrefslogtreecommitdiffstats
path: root/hdata/fsp.c
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2017-05-02 13:23:11 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-05-10 16:58:18 +1000
commit8418561f06e8f0d5af36e2ac822a37f0af9b0051 (patch)
treecc0d2bed4b0a034652d296311630a240dcc7712c /hdata/fsp.c
parent7aa31c682144db1ab65c70f13820e737d008592c (diff)
downloadtalos-skiboot-8418561f06e8f0d5af36e2ac822a37f0af9b0051.tar.gz
talos-skiboot-8418561f06e8f0d5af36e2ac822a37f0af9b0051.zip
lpc: Migrate BAR assignment to phys_map_get()
Keeps existing address. No functional change. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata/fsp.c')
-rw-r--r--hdata/fsp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hdata/fsp.c b/hdata/fsp.c
index 1d7a3042..2c8254f9 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"
@@ -316,12 +318,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);
OpenPOWER on IntegriCloud