[Skiboot] [PATCH] include/errorlog.h : Renames SRC component's macro name

Mukesh Ojha mukesh02 at linux.vnet.ibm.com
Fri Jul 15 18:39:02 AEST 2016


It replaces two letter SRC components macro name with some meaningful
components name to make it more legible.

E.g:
	OPAL_XS => OPAL_SRC_COMPONENT_XSCOM

Signed-off-by: Mukesh Ojha <mukesh02 at linux.vnet.ibm.com>
---
 include/errorlog.h | 268 ++++++++++++++++++++++++++---------------------------
 1 file changed, 134 insertions(+), 134 deletions(-)

diff --git a/include/errorlog.h b/include/errorlog.h
index 2926098..938decc 100644
--- a/include/errorlog.h
+++ b/include/errorlog.h
@@ -162,173 +162,173 @@ struct opal_err_info {
  * character name in FSP and displayed.
  */
 /* SAPPHIRE components */
-#define OPAL_CODEUPDATE			0x4355	/* CU */
-#define OPAL_CONSOLE			0x434E	/* CN */
-#define OPAL_CEC			0x4345	/* CE */
-#define OPAL_CHIP			0x4348	/* CH */
-#define OPAL_ELOG			0x454C	/* EL */
-#define OPAL_NVRAM			0x4E56	/* NV */
-#define OPAL_RTC			0x5254	/* RT */
-#define OPAL_SURVEILLANCE		0x5355	/* SU */
-#define OPAL_SYSPARAM			0x5350	/* SP */
-#define OPAL_LPC			0x4C50	/* LP */
-#define OPAL_UART			0x5541	/* UA */
-#define OPAL_OCC			0x4F43	/* OC */
-#define OPAL_OP_PANEL			0x4F50	/* OP */
-#define OPAL_PHB3			0x5048	/* PH */
-#define OPAL_PSI			0x5053	/* PS */
-#define OPAL_VPD			0x5650	/* VP */
-#define OPAL_XSCOM			0x5853	/* XS */
-#define OPAL_PCI			0x5043	/* PC */
-#define OPAL_MISC			0x4D49	/* MI */
-#define OPAL_ATTN			0x4154	/* AT */
-#define OPAL_MEM_ERR			0x4D45	/* ME */
-#define OPAL_CENTAUR			0x4354	/* CT */
-#define OPAL_MFSI			0x4D46	/* MF */
-#define OPAL_DUMP			0x4455	/* DU */
-#define OPAL_LED			0x4C45	/* LE */
-#define OPAL_SENSOR			0x5345	/* SE */
-#define OPAL_SLW			0x534C	/* SL */
-#define OPAL_FSP			0x4650	/* FP */
-#define OPAL_I2C			0x4943	/* IC */
-#define OPAL_IPMI			0x4950  /* IP */
+#define OPAL_CODEUPDATE				0x4355
+#define OPAL_CONSOLE				0x434E
+#define OPAL_CEC				0x4345
+#define OPAL_CHIP				0x4348
+#define OPAL_ELOG				0x454C
+#define OPAL_NVRAM				0x4E56
+#define OPAL_RTC				0x5254
+#define OPAL_SURVEILLANCE			0x5355
+#define OPAL_SYSPARAM				0x5350
+#define OPAL_LPC				0x4C50
+#define OPAL_UART				0x5541
+#define OPAL_OCC				0x4F43
+#define OPAL_OP_PANEL				0x4F50
+#define OPAL_PHB3				0x5048
+#define OPAL_PSI				0x5053
+#define OPAL_VPD				0x5650
+#define OPAL_XSCOM				0x5853
+#define OPAL_PCI				0x5043
+#define OPAL_MISC				0x4D49
+#define OPAL_ATTN				0x4154
+#define OPAL_MEM_ERR				0x4D45
+#define OPAL_CENTAUR				0x4354
+#define OPAL_MFSI				0x4D46
+#define OPAL_DUMP				0x4455
+#define OPAL_LED				0x4C45
+#define OPAL_SENSOR				0x5345
+#define OPAL_SLW				0x534C
+#define OPAL_FSP				0x4650
+#define OPAL_I2C				0x4943
+#define OPAL_IPMI				0x4950
 
 /* SAPPHIRE SRC component ID*/
-#define OPAL_CU				0x1000
-#define OPAL_XS				0x1100
-#define OPAL_PC				0x1200
-#define OPAL_MI				0x1300
-#define OPAL_AT				0x1400
-#define OPAL_ME				0x1500
-#define OPAL_CT				0x1600
-#define OPAL_MF				0x1700
-#define OPAL_DU				0x1800
-#define OPAL_LE				0x1900
-#define OPAL_VP				0x1a00
-#define OPAL_CN				0x1b00
-#define OPAL_SE				0x2000
-#define OPAL_SL				0x2100
-#define OPAL_FP				0x2200
-#define OPAL_IC				0x2300
-#define OPAL_IP				0x2400
-#define OPAL_CE				0x3000
-#define OPAL_CH				0x4000
-#define OPAL_EL				0x5000
-#define OPAL_NV				0x6000
-#define OPAL_RT				0x7000
-#define OPAL_SU				0x8000
-#define OPAL_SP				0x9000
-#define OPAL_LP				0xa000
-#define OPAL_UA				0xb000
-#define OPAL_OC				0xc000
-#define OPAL_OP				0xd000
-#define OPAL_PH				0xe000
-#define OPAL_PS				0xf000
+#define OPAL_SRC_COMPONENT_CODE_UPDATE		0x1000
+#define OPAL_SRC_COMPONENT_XSCOM		0x1100
+#define OPAL_SRC_COMPONENT_PCI			0x1200
+#define OPAL_SRC_COMPONENT_MISC			0x1300
+#define OPAL_SRC_COMPONENT_ATTN			0x1400
+#define OPAL_SRC_COMPONENT_MEM_ERR		0x1500
+#define OPAL_SRC_COMPONENT_CENTAUR		0x1600
+#define OPAL_SRC_COMPONENT_MFSI			0x1700
+#define OPAL_SRC_COMPONENT_DUMP			0x1800
+#define OPAL_SRC_COMPONENT_LED			0x1900
+#define OPAL_SRC_COMPONENT_VPD			0x1a00
+#define OPAL_SRC_COMPONENT_CONSOLE		0x1b00
+#define OPAL_SRC_COMPONENT_SENSOR		0x2000
+#define OPAL_SRC_COMPONENT_SLW			0x2100
+#define OPAL_SRC_COMPONENT_FSP			0x2200
+#define OPAL_SRC_COMPONENT_I2C			0x2300
+#define OPAL_SRC_COMPONENT_IPMI			0x2400
+#define OPAL_SRC_COMPONENT_CEC			0x3000
+#define OPAL_SRC_COMPONENT_CHIP			0x4000
+#define OPAL_SRC_COMPONENT_ELOG			0x5000
+#define OPAL_SRC_COMPONENT_NVRAM		0x6000
+#define OPAL_SRC_COMPONENT_RTC			0x7000
+#define OPAL_SRC_COMPONENT_SURVEILLANCE		0x8000
+#define OPAL_SRC_COMPONENT_SYSPARAM		0x9000
+#define OPAL_SRC_COMPONENT_LPC			0xa000
+#define OPAL_SRC_COMPONENT_UART			0xb000
+#define OPAL_SRC_COMPONENT_OCC			0xc000
+#define OPAL_SRC_COMPONENT_OP_PANEL		0xd000
+#define OPAL_SRC_COMPONENT_PHB3			0xe000
+#define OPAL_SRC_COMPONENT_PSI			0xf000
 
 enum opal_reasoncode {
 /* code update */
-	OPAL_RC_CU_FLASH        = OPAL_CU | 0x10,
-	OPAL_RC_CU_INIT         = OPAL_CU | 0x11,
-	OPAL_RC_CU_SG_LIST      = OPAL_CU | 0x12,
-	OPAL_RC_CU_COMMIT	= OPAL_CU | 0x13,
-	OPAL_RC_CU_MSG		= OPAL_CU | 0x14,
-	OPAL_RC_CU_NOTIFY       = OPAL_CU | 0x15,
-	OPAL_RC_CU_MARKER_LID	= OPAL_CU | 0x16,
+	OPAL_RC_CU_FLASH	    = OPAL_SRC_COMPONENT_CODE_UPDATE | 0x10,
+	OPAL_RC_CU_INIT		    = OPAL_SRC_COMPONENT_CODE_UPDATE | 0x11,
+	OPAL_RC_CU_SG_LIST	    = OPAL_SRC_COMPONENT_CODE_UPDATE | 0x12,
+	OPAL_RC_CU_COMMIT	    = OPAL_SRC_COMPONENT_CODE_UPDATE | 0x13,
+	OPAL_RC_CU_MSG		    = OPAL_SRC_COMPONENT_CODE_UPDATE | 0x14,
+	OPAL_RC_CU_NOTIFY	    = OPAL_SRC_COMPONENT_CODE_UPDATE | 0x15,
+	OPAL_RC_CU_MARKER_LID	    = OPAL_SRC_COMPONENT_CODE_UPDATE | 0x16,
 /* NVRAM */
-	OPAL_RC_NVRAM_INIT      = OPAL_NV | 0x10,
-	OPAL_RC_NVRAM_OPEN	= OPAL_NV | 0x11,
-	OPAL_RC_NVRAM_SIZE      = OPAL_NV | 0x12,
-	OPAL_RC_NVRAM_WRITE     = OPAL_NV | 0x13,
-	OPAL_RC_NVRAM_READ      = OPAL_NV | 0x14,
+	OPAL_RC_NVRAM_INIT	    = OPAL_SRC_COMPONENT_NVRAM | 0x10,
+	OPAL_RC_NVRAM_OPEN	    = OPAL_SRC_COMPONENT_NVRAM | 0x11,
+	OPAL_RC_NVRAM_SIZE	    = OPAL_SRC_COMPONENT_NVRAM | 0x12,
+	OPAL_RC_NVRAM_WRITE	    = OPAL_SRC_COMPONENT_NVRAM | 0x13,
+	OPAL_RC_NVRAM_READ	    = OPAL_SRC_COMPONENT_NVRAM | 0x14,
 /* CENTAUR */
-	OPAL_RC_CENTAUR_INIT    = OPAL_CT | 0x10,
-	OPAL_RC_CENTAUR_RW_ERR  = OPAL_CT | 0x11,
+	OPAL_RC_CENTAUR_INIT	    = OPAL_SRC_COMPONENT_CENTAUR | 0x10,
+	OPAL_RC_CENTAUR_RW_ERR	    = OPAL_SRC_COMPONENT_CENTAUR | 0x11,
 /* MFSI */
-	OPAL_RC_MFSI_RW_ERR     = OPAL_MF | 0x10,
+	OPAL_RC_MFSI_RW_ERR	    = OPAL_SRC_COMPONENT_MFSI | 0x10,
 /* UART */
-	OPAL_RC_UART_INIT       = OPAL_UA | 0x10,
+	OPAL_RC_UART_INIT	    = OPAL_SRC_COMPONENT_UART | 0x10,
 /* OCC */
-	OPAL_RC_OCC_RESET       = OPAL_OC | 0x10,
-	OPAL_RC_OCC_LOAD        = OPAL_OC | 0x11,
-	OPAL_RC_OCC_PSTATE_INIT = OPAL_OC | 0x12,
-	OPAL_RC_OCC_TIMEOUT	= OPAL_OC | 0x13,
+	OPAL_RC_OCC_RESET	    = OPAL_SRC_COMPONENT_OCC | 0x10,
+	OPAL_RC_OCC_LOAD	    = OPAL_SRC_COMPONENT_OCC | 0x11,
+	OPAL_RC_OCC_PSTATE_INIT	    = OPAL_SRC_COMPONENT_OCC | 0x12,
+	OPAL_RC_OCC_TIMEOUT	    = OPAL_SRC_COMPONENT_OCC | 0x13,
 /* RTC	*/
-	OPAL_RC_RTC_READ	= OPAL_RT | 0x10,
-	OPAL_RC_RTC_TOD		= OPAL_RT | 0x11,
+	OPAL_RC_RTC_READ	    = OPAL_SRC_COMPONENT_RTC | 0x10,
+	OPAL_RC_RTC_TOD		    = OPAL_SRC_COMPONENT_RTC | 0x11,
 /* SURVEILLANCE */
-	OPAL_RC_SURVE_INIT      = OPAL_SU | 0x10,
-	OPAL_RC_SURVE_STATUS	= OPAL_SU | 0x11,
-	OPAL_RC_SURVE_ACK	= OPAL_SU | 0x12,
+	OPAL_RC_SURVE_INIT	    = OPAL_SRC_COMPONENT_SURVEILLANCE | 0x10,
+	OPAL_RC_SURVE_STATUS	    = OPAL_SRC_COMPONENT_SURVEILLANCE | 0x11,
+	OPAL_RC_SURVE_ACK	    = OPAL_SRC_COMPONENT_SURVEILLANCE | 0x12,
 /* SYSPARAM */
-	OPAL_RC_SYSPARM_INIT    = OPAL_SP | 0x10,
-	OPAL_RC_SYSPARM_MSG     = OPAL_SP | 0x11,
+	OPAL_RC_SYSPARM_INIT	    = OPAL_SRC_COMPONENT_SYSPARAM | 0x10,
+	OPAL_RC_SYSPARM_MSG	    = OPAL_SRC_COMPONENT_SYSPARAM | 0x11,
 /* LPC */
-	OPAL_RC_LPC_READ        = OPAL_LP | 0x10,
-	OPAL_RC_LPC_WRITE       = OPAL_LP | 0x11,
-	OPAL_RC_LPC_SYNC        = OPAL_LP | 0x12,
+	OPAL_RC_LPC_READ	    = OPAL_SRC_COMPONENT_LPC | 0x10,
+	OPAL_RC_LPC_WRITE	    = OPAL_SRC_COMPONENT_LPC | 0x11,
+	OPAL_RC_LPC_SYNC	    = OPAL_SRC_COMPONENT_LPC | 0x12,
 /* OP_PANEL */
-	OPAL_RC_PANEL_WRITE     = OPAL_OP | 0x10,
+	OPAL_RC_PANEL_WRITE	    = OPAL_SRC_COMPONENT_OP_PANEL | 0x10,
 /* PSI */
-	OPAL_RC_PSI_INIT        = OPAL_PS | 0x10,
-	OPAL_RC_PSI_IRQ_RESET   = OPAL_PS | 0x11,
-	OPAL_RC_PSI_TIMEOUT	= OPAL_PS | 0X12,
+	OPAL_RC_PSI_INIT	    = OPAL_SRC_COMPONENT_PSI | 0x10,
+	OPAL_RC_PSI_IRQ_RESET	    = OPAL_SRC_COMPONENT_PSI | 0x11,
+	OPAL_RC_PSI_TIMEOUT	    = OPAL_SRC_COMPONENT_PSI | 0X12,
 /* XSCOM */
-	OPAL_RC_XSCOM_RW		= OPAL_XS | 0x10,
-	OPAL_RC_XSCOM_INDIRECT_RW	= OPAL_XS | 0x11,
-	OPAL_RC_XSCOM_RESET		= OPAL_XS | 0x12,
-	OPAL_RC_XSCOM_BUSY		= OPAL_XS | 0x13,
+	OPAL_RC_XSCOM_RW	    = OPAL_SRC_COMPONENT_XSCOM | 0x10,
+	OPAL_RC_XSCOM_INDIRECT_RW   = OPAL_SRC_COMPONENT_XSCOM | 0x11,
+	OPAL_RC_XSCOM_RESET	    = OPAL_SRC_COMPONENT_XSCOM | 0x12,
+	OPAL_RC_XSCOM_BUSY	    = OPAL_SRC_COMPONENT_XSCOM | 0x13,
 /* PCI */
-	OPAL_RC_PCI_INIT_SLOT   = OPAL_PC | 0x10,
-	OPAL_RC_PCI_ADD_SLOT    = OPAL_PC | 0x11,
-	OPAL_RC_PCI_SCAN        = OPAL_PC | 0x12,
-	OPAL_RC_PCI_RESET_PHB   = OPAL_PC | 0x10,
+	OPAL_RC_PCI_INIT_SLOT	    = OPAL_SRC_COMPONENT_PCI | 0x10,
+	OPAL_RC_PCI_ADD_SLOT	    = OPAL_SRC_COMPONENT_PCI | 0x11,
+	OPAL_RC_PCI_SCAN	    = OPAL_SRC_COMPONENT_PCI | 0x12,
+	OPAL_RC_PCI_RESET_PHB	    = OPAL_SRC_COMPONENT_PCI | 0x10,
 /* ATTN */
-	OPAL_RC_ATTN		= OPAL_AT | 0x10,
+	OPAL_RC_ATTN		    = OPAL_SRC_COMPONENT_ATTN | 0x10,
 /* MEM_ERR */
-	OPAL_RC_MEM_ERR_RES	= OPAL_ME | 0x10,
-	OPAL_RC_MEM_ERR_DEALLOC	= OPAL_ME | 0x11,
+	OPAL_RC_MEM_ERR_RES	    = OPAL_SRC_COMPONENT_MEM_ERR | 0x10,
+	OPAL_RC_MEM_ERR_DEALLOC	    = OPAL_SRC_COMPONENT_MEM_ERR | 0x11,
 /* DUMP */
-	OPAL_RC_DUMP_INIT	= OPAL_DU | 0x10,
-	OPAL_RC_DUMP_LIST	= OPAL_DU | 0x11,
-	OPAL_RC_DUMP_ACK	= OPAL_DU | 0x12,
-	OPAL_RC_DUMP_MDST_INIT	= OPAL_DU | 0x13,
-	OPAL_RC_DUMP_MDST_UPDATE= OPAL_DU | 0x14,
-	OPAL_RC_DUMP_MDST_ADD	= OPAL_DU | 0x15,
-	OPAL_RC_DUMP_MDST_REMOVE= OPAL_DU | 0x16,
+	OPAL_RC_DUMP_INIT	    = OPAL_SRC_COMPONENT_DUMP | 0x10,
+	OPAL_RC_DUMP_LIST	    = OPAL_SRC_COMPONENT_DUMP | 0x11,
+	OPAL_RC_DUMP_ACK	    = OPAL_SRC_COMPONENT_DUMP | 0x12,
+	OPAL_RC_DUMP_MDST_INIT	    = OPAL_SRC_COMPONENT_DUMP | 0x13,
+	OPAL_RC_DUMP_MDST_UPDATE    = OPAL_SRC_COMPONENT_DUMP | 0x14,
+	OPAL_RC_DUMP_MDST_ADD	    = OPAL_SRC_COMPONENT_DUMP | 0x15,
+	OPAL_RC_DUMP_MDST_REMOVE    = OPAL_SRC_COMPONENT_DUMP | 0x16,
 /* LED	*/
-	OPAL_RC_LED_SPCN	= OPAL_LE | 0x10,
-	OPAL_RC_LED_BUFF	= OPAL_LE | 0x11,
-	OPAL_RC_LED_LC		= OPAL_LE | 0x12,
-	OPAL_RC_LED_STATE	= OPAL_LE | 0x13,
-	OPAL_RC_LED_SUPPORT	= OPAL_LE | 0x14,
+	OPAL_RC_LED_SPCN	    = OPAL_SRC_COMPONENT_LED | 0x10,
+	OPAL_RC_LED_BUFF	    = OPAL_SRC_COMPONENT_LED | 0x11,
+	OPAL_RC_LED_LC		    = OPAL_SRC_COMPONENT_LED | 0x12,
+	OPAL_RC_LED_STATE	    = OPAL_SRC_COMPONENT_LED | 0x13,
+	OPAL_RC_LED_SUPPORT	    = OPAL_SRC_COMPONENT_LED | 0x14,
 /* SENSOR */
-	OPAL_RC_SENSOR_INIT	= OPAL_SE | 0x10,
-	OPAL_RC_SENSOR_READ	= OPAL_SE | 0x11,
+	OPAL_RC_SENSOR_INIT	    = OPAL_SRC_COMPONENT_SENSOR | 0x10,
+	OPAL_RC_SENSOR_READ	    = OPAL_SRC_COMPONENT_SENSOR | 0x11,
 	OPAL_RC_SENSOR_ASYNC_COMPLETE
-				= OPAL_SE | 0x12,
+				    = OPAL_SRC_COMPONENT_SENSOR | 0x12,
 /* SLW */
-	OPAL_RC_SLW_INIT	= OPAL_SL | 0x10,
-	OPAL_RC_SLW_SET		= OPAL_SL | 0x11,
-	OPAL_RC_SLW_GET		= OPAL_SL | 0x12,
-	OPAL_RC_SLW_REG		= OPAL_SL | 0x13,
+	OPAL_RC_SLW_INIT	    = OPAL_SRC_COMPONENT_SLW | 0x10,
+	OPAL_RC_SLW_SET		    = OPAL_SRC_COMPONENT_SLW | 0x11,
+	OPAL_RC_SLW_GET		    = OPAL_SRC_COMPONENT_SLW | 0x12,
+	OPAL_RC_SLW_REG		    = OPAL_SRC_COMPONENT_SLW | 0x13,
 /* FSP	*/
 	OPAL_RC_FSP_POLL_TIMEOUT
-				= OPAL_FP | 0x10,
+				    = OPAL_SRC_COMPONENT_FSP | 0x10,
 /* I2C */
-	OPAL_RC_I2C_INIT	= OPAL_IC | 0X10,
-	OPAL_RC_I2C_START_REQ	= OPAL_IC | 0X11,
-	OPAL_RC_I2C_TIMEOUT	= OPAL_IC | 0x12,
-	OPAL_RC_I2C_TRANSFER	= OPAL_IC | 0x13,
-	OPAL_RC_I2C_RESET	= OPAL_IC | 0x14,
+	OPAL_RC_I2C_INIT	    = OPAL_SRC_COMPONENT_I2C | 0X10,
+	OPAL_RC_I2C_START_REQ	    = OPAL_SRC_COMPONENT_I2C | 0X11,
+	OPAL_RC_I2C_TIMEOUT	    = OPAL_SRC_COMPONENT_I2C | 0x12,
+	OPAL_RC_I2C_TRANSFER	    = OPAL_SRC_COMPONENT_I2C | 0x13,
+	OPAL_RC_I2C_RESET	    = OPAL_SRC_COMPONENT_I2C | 0x14,
 
 /* IPMI */
-	OPAL_RC_IPMI_REQ	= OPAL_IP | 0x10,
-	OPAL_RC_IPMI_RESP	= OPAL_IP | 0x11,
+	OPAL_RC_IPMI_REQ	    = OPAL_SRC_COMPONENT_IPMI | 0x10,
+	OPAL_RC_IPMI_RESP	    = OPAL_SRC_COMPONENT_IPMI | 0x11,
 	OPAL_RC_IPMI_DMA_ERROR_RESP
-				= OPAL_IP | 0x12,
+				    = OPAL_SRC_COMPONENT_IPMI | 0x12,
 
 /* Platform error */
-	OPAL_RC_ABNORMAL_REBOOT	= OPAL_CE | 0x10,
+	OPAL_RC_ABNORMAL_REBOOT	    = OPAL_SRC_COMPONENT_CEC | 0x10,
 };
 
 #define DEFINE_LOG_ENTRY(reason, type, id, subsys,			\
-- 
2.7.4



More information about the Skiboot mailing list