aboutsummaryrefslogtreecommitdiff
path: root/include/capp.h
diff options
context:
space:
mode:
authorPhilippe Bergheaud <felix@linux.vnet.ibm.com>2016-04-01 14:27:57 +0200
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-04-27 15:06:11 +1000
commitc27ead751a1cd6541e98dc2b490ac453613e8d69 (patch)
tree8e33f6615917bc1a5b35c36deeeeb7c623d29f5d /include/capp.h
parent451b69d489112ef61d99199bec6c5eaf3a946127 (diff)
downloadskiboot-c27ead751a1cd6541e98dc2b490ac453613e8d69.zip
skiboot-c27ead751a1cd6541e98dc2b490ac453613e8d69.tar.gz
skiboot-c27ead751a1cd6541e98dc2b490ac453613e8d69.tar.bz2
phb3: Load CAPP ucode to both CAPP units on Naples
Venice and Murano have only one capp unit, that can be mapped to phb0, phb1 or phb2. Naples has two capp units, that are statically mapped, capp unit 0 on phb0 and capp unit 1 on phb1. The capp ucode must be loaded once onto each capp unit. This patch replaces the boolean chip->capp_ucode_loaded by a bitmap, and sets the bit corresponding to the phb index to indicate that ucode has been loaded. The macro CAPP_UCODE_LOADED(chip, phb) returns the value of the phb index bit. The xscom register addresses of capp unit 0 are identical to the register addresses of the single capp unit of Venice and Murano. The addresses of the Naples capp unit 1 are equal to the addresses of capp unit 0 + 0x180. This patch introduces the macro PHB3_CAPP_REG_OFFSET(p), that returns the following xscom register address offsets: 0x0 for the Venice capp unit 0x0 for the Murano capp unit 0x0 for Naples capp unit 0 0x180 for Naples capp unit 1 The offset is added to the register address at each xscom_write, in order to operate on the right capp unit. Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/capp.h')
-rw-r--r--include/capp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/capp.h b/include/capp.h
index d9275ec..f5494e7 100644
--- a/include/capp.h
+++ b/include/capp.h
@@ -80,3 +80,10 @@ enum capp_reg {
#define FLUSH_UOP_CONFIG1 0x2013803
#define FLUSH_UOP_CONFIG2 0x2013804
#define SNOOP_CAPI_CONFIG 0x201301A
+
+/*
+ * Naples has two CAPP units, statically mapped:
+ * CAPP0 attached to PHB0, and CAPP1 attached to PHB1.
+ * The addresses of CAPP1 XSCOMS registers are 0x180 away.
+ */
+#define CAPP1_REG_OFFSET 0x180