[Skiboot] [PATCH 1/3] npu2: Fix argument order to npu2_scom_write in BAR setup

Alistair Popple alistair at popple.id.au
Fri May 5 17:37:13 AEST 2017


The arguments to npu2_scom_write() in npu2_write_bar() resulting in
incorrect BAR setup in some circumstances. This patch swaps the
arguments so they are correct.

Signed-off-by: Alistair Popple <alistair at popple.id.au>
---
 hw/npu2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/npu2.c b/hw/npu2.c
index a8560cf..e39782a 100644
--- a/hw/npu2.c
+++ b/hw/npu2.c
@@ -196,7 +196,7 @@ static void npu2_write_bar(struct npu2 *p,
 		if (p)
 			npu2_write(p, reg, val);
 		else
-			npu2_scom_write(gcid, scom, reg, val, NPU2_MISC_DA_LEN_8B);
+			npu2_scom_write(gcid, scom, reg, NPU2_MISC_DA_LEN_8B, val);
 	}
 }
 
-- 
2.1.4



More information about the Skiboot mailing list