diff options
Diffstat (limited to 'import/chips/p9/common/pmlib/include')
-rw-r--r-- | import/chips/p9/common/pmlib/include/cmehw_common.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/import/chips/p9/common/pmlib/include/cmehw_common.h b/import/chips/p9/common/pmlib/include/cmehw_common.h index 4b692087..b9587521 100644 --- a/import/chips/p9/common/pmlib/include/cmehw_common.h +++ b/import/chips/p9/common/pmlib/include/cmehw_common.h @@ -59,17 +59,32 @@ enum CME_BCEBAR_INDEXES #define CME_SCOM_ADDR(addr, core, op) (addr | (core << 22) | (op << 20)) +// cme getscom default with 'eq' op +#define CME_GETSCOM(addr, core, data) \ + PPE_LVD(CME_SCOM_ADDR(addr, core, CME_SCOM_EQ), data); + +// cme getscom with 'and' op +#define CME_GETSCOM_AND(addr, core, data) \ + PPE_LVD(CME_SCOM_ADDR(addr, core, CME_SCOM_AND), data); + +// cme getscom with 'or' op +#define CME_GETSCOM_OR(addr, core, data) \ + PPE_LVD(CME_SCOM_ADDR(addr, core, CME_SCOM_OR), data); + +// use this to override cme getscom with user specified op +#define CME_GETSCOM_OP(addr, core, scom_op, data) \ + PPE_LVD(CME_SCOM_ADDR(addr, core, scom_op), data); + + +// use this to override undesired queued cme putscom with nop #define CME_PUTSCOM_NOP(addr, core, data) \ putscom_norc(CME_SCOM_ADDR(addr, core, CME_SCOM_NOP), data); +// queued cme putscom if enabled; otherwise default with nop #if defined(USE_CME_QUEUED_SCOM) -#define CME_GETSCOM(addr, core, scom_op, data) \ - PPE_LVD(CME_SCOM_ADDR(addr, core, scom_op), data); #define CME_PUTSCOM(addr, core, data) \ putscom_norc(CME_SCOM_ADDR(addr, core, CME_SCOM_QUEUED), data); #else -#define CME_GETSCOM(addr, core, scom_op, data) \ - PPE_LVD(CME_SCOM_ADDR(addr, core, scom_op), data); #define CME_PUTSCOM(addr, core, data) \ putscom_norc(CME_SCOM_ADDR(addr, core, CME_SCOM_NOP), data); #endif |