@@ -5875,6 +5875,69 @@ static inline void mlxsw_reg_pmtdb_pack(char *payload, u8 slot_index, u8 module,
58755875 mlxsw_reg_pmtdb_num_ports_set (payload , num_ports );
58765876}
58775877
5878+ /* PMECR - Ports Mapping Event Configuration Register
5879+ * --------------------------------------------------
5880+ * The PMECR register is used to enable/disable event triggering
5881+ * in case of local port mapping change.
5882+ */
5883+ #define MLXSW_REG_PMECR_ID 0x501B
5884+ #define MLXSW_REG_PMECR_LEN 0x20
5885+
5886+ MLXSW_REG_DEFINE (pmecr , MLXSW_REG_PMECR_ID , MLXSW_REG_PMECR_LEN );
5887+
5888+ /* reg_pmecr_local_port
5889+ * Local port number.
5890+ * Access: Index
5891+ */
5892+ MLXSW_ITEM32_LP (reg , pmecr , 0x00 , 16 , 0x00 , 12 );
5893+
5894+ /* reg_pmecr_ee
5895+ * Event update enable. If this bit is set, event generation will be updated
5896+ * based on the e field. Only relevant on Set operations.
5897+ * Access: WO
5898+ */
5899+ MLXSW_ITEM32 (reg , pmecr , ee , 0x04 , 30 , 1 );
5900+
5901+ /* reg_pmecr_eswi
5902+ * Software ignore enable bit. If this bit is set, the value of swi is used.
5903+ * If this bit is clear, the value of swi is ignored.
5904+ * Only relevant on Set operations.
5905+ * Access: WO
5906+ */
5907+ MLXSW_ITEM32 (reg , pmecr , eswi , 0x04 , 24 , 1 );
5908+
5909+ /* reg_pmecr_swi
5910+ * Software ignore. If this bit is set, the device shouldn't generate events
5911+ * in case of PMLP SET operation but only upon self local port mapping change
5912+ * (if applicable according to e configuration). This is supplementary
5913+ * configuration on top of e value.
5914+ * Access: RW
5915+ */
5916+ MLXSW_ITEM32 (reg , pmecr , swi , 0x04 , 8 , 1 );
5917+
5918+ enum mlxsw_reg_pmecr_e {
5919+ MLXSW_REG_PMECR_E_DO_NOT_GENERATE_EVENT ,
5920+ MLXSW_REG_PMECR_E_GENERATE_EVENT ,
5921+ MLXSW_REG_PMECR_E_GENERATE_SINGLE_EVENT ,
5922+ };
5923+
5924+ /* reg_pmecr_e
5925+ * Event generation on local port mapping change.
5926+ * Access: RW
5927+ */
5928+ MLXSW_ITEM32 (reg , pmecr , e , 0x04 , 0 , 2 );
5929+
5930+ static inline void mlxsw_reg_pmecr_pack (char * payload , u16 local_port ,
5931+ enum mlxsw_reg_pmecr_e e )
5932+ {
5933+ MLXSW_REG_ZERO (pmecr , payload );
5934+ mlxsw_reg_pmecr_local_port_set (payload , local_port );
5935+ mlxsw_reg_pmecr_e_set (payload , e );
5936+ mlxsw_reg_pmecr_ee_set (payload , true);
5937+ mlxsw_reg_pmecr_swi_set (payload , true);
5938+ mlxsw_reg_pmecr_eswi_set (payload , true);
5939+ }
5940+
58785941/* PMPE - Port Module Plug/Unplug Event Register
58795942 * ---------------------------------------------
58805943 * This register reports any operational status change of a module.
@@ -12678,6 +12741,7 @@ static const struct mlxsw_reg_info *mlxsw_reg_infos[] = {
1267812741 MLXSW_REG (pmaos ),
1267912742 MLXSW_REG (pplr ),
1268012743 MLXSW_REG (pmtdb ),
12744+ MLXSW_REG (pmecr ),
1268112745 MLXSW_REG (pmpe ),
1268212746 MLXSW_REG (pddr ),
1268312747 MLXSW_REG (pmmp ),
0 commit comments