Klaus Heinrich Kiwi | 4d21da1 | 2020-03-06 11:31:13 -0600 | [diff] [blame] | 1 | From ab2bc5d0efcfb5f1a1122d9c85b9ea9e53908454 Mon Sep 17 00:00:00 2001 |
| 2 | From: Reza Arbab <arbab@linux.ibm.com> |
| 3 | Date: Fri, 21 Feb 2020 14:45:23 -0600 |
| 4 | Subject: [PATCH] hdata/spira: Add p10 NMMU base address |
| 5 | |
| 6 | Signed-off-by: Reza Arbab <arbab@linux.ibm.com> |
| 7 | --- |
| 8 | hdata/spira.c | 13 ++++++++++--- |
| 9 | 1 file changed, 10 insertions(+), 3 deletions(-) |
| 10 | |
| 11 | diff --git a/hdata/spira.c b/hdata/spira.c |
| 12 | index db54a02..de6386a 100644 |
| 13 | --- a/hdata/spira.c |
| 14 | +++ b/hdata/spira.c |
| 15 | @@ -919,15 +919,22 @@ static void add_nx(void) |
| 16 | static void add_nmmu(void) |
| 17 | { |
| 18 | struct dt_node *xscom, *nmmu; |
| 19 | + u32 scom; |
| 20 | |
| 21 | - /* Nest MMU only exists on POWER9 */ |
| 22 | + /* Nest MMU only exists on POWER9 or later */ |
| 23 | if (proc_gen < proc_gen_p9) |
| 24 | return; |
| 25 | |
| 26 | + if (proc_gen == proc_gen_p9) |
| 27 | + scom = 0x5012c40; |
| 28 | + else |
| 29 | + scom = 0x2010c40; |
| 30 | + |
| 31 | dt_for_each_compatible(dt_root, xscom, "ibm,xscom") { |
| 32 | - nmmu = dt_new_addr(xscom, "nmmu", 0x5012c40); |
| 33 | + nmmu = dt_new_addr(xscom, "nmmu", scom); |
| 34 | + /* XXX P10 */ |
| 35 | dt_add_property_strings(nmmu, "compatible", "ibm,power9-nest-mmu"); |
| 36 | - dt_add_property_cells(nmmu, "reg", 0x5012c40, 0x20); |
| 37 | + dt_add_property_cells(nmmu, "reg", scom, 0x20); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | -- |
| 42 | 1.8.3.1 |
| 43 | |