mirror of
https://github.com/torvalds/linux.git
synced 2026-04-28 03:22:27 -04:00
On dual complex E825, only complex 0 has functional CGU (Clock
Generation Unit), powering all the PHYs.
SBQ (Side Band Queue) destination device 'cgu' in current implementation
points to CGU on current complex and, in order to access primary CGU
from the secondary complex, the driver should use 'cgu_peer' as
a destination device in read/write CGU registers operations.
Define new 'cgu_peer' (15) as RDA (Remote Device Access) client over
SB-IOSF interface and use it as device target when accessing CGU from
secondary complex.
This problem has been identified when working on recovery clock
enablement [1]. In existing implementation for E825 devices, only PF0,
which is clock owner, is involved in CGU configuration, thus the
problem was not exposed to the user.
[1] https://lore.kernel.org/intel-wired-lan/20250905150947.871566-1-grzegorz.nitka@intel.com/
Fixes: e2193f9f9e ("ice: enable timesync operation on 2xNAC E825 devices")
Signed-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com>
Reviewed-by: Arkadiusz Kubalewski <Arkadiusz.kubalewski@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
93 lines
1.6 KiB
C
93 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (C) 2021, Intel Corporation. */
|
|
|
|
#ifndef _ICE_SBQ_CMD_H_
|
|
#define _ICE_SBQ_CMD_H_
|
|
|
|
/* This header file defines the Sideband Queue commands, error codes and
|
|
* descriptor format. It is shared between Firmware and Software.
|
|
*/
|
|
|
|
/* Sideband Queue command structure and opcodes */
|
|
enum ice_sbq_opc {
|
|
/* Sideband Queue commands */
|
|
ice_sbq_opc_neigh_dev_req = 0x0C00,
|
|
ice_sbq_opc_neigh_dev_ev = 0x0C01
|
|
};
|
|
|
|
/* Sideband Queue descriptor. Indirect command
|
|
* and non posted
|
|
*/
|
|
struct ice_sbq_cmd_desc {
|
|
__le16 flags;
|
|
__le16 opcode;
|
|
__le16 datalen;
|
|
__le16 cmd_retval;
|
|
|
|
/* Opaque message data */
|
|
__le32 cookie_high;
|
|
__le32 cookie_low;
|
|
|
|
union {
|
|
__le16 cmd_len;
|
|
__le16 cmpl_len;
|
|
} param0;
|
|
|
|
u8 reserved[6];
|
|
__le32 addr_high;
|
|
__le32 addr_low;
|
|
};
|
|
|
|
struct ice_sbq_evt_desc {
|
|
__le16 flags;
|
|
__le16 opcode;
|
|
__le16 datalen;
|
|
__le16 cmd_retval;
|
|
u8 data[24];
|
|
};
|
|
|
|
enum ice_sbq_dev_id {
|
|
ice_sbq_dev_phy_0 = 0x02,
|
|
ice_sbq_dev_cgu = 0x06,
|
|
ice_sbq_dev_phy_0_peer = 0x0D,
|
|
ice_sbq_dev_cgu_peer = 0x0F,
|
|
};
|
|
|
|
enum ice_sbq_msg_opcode {
|
|
ice_sbq_msg_rd = 0x00,
|
|
ice_sbq_msg_wr = 0x01
|
|
};
|
|
|
|
#define ICE_SBQ_MSG_FLAGS 0x40
|
|
#define ICE_SBQ_MSG_SBE_FBE 0x0F
|
|
|
|
struct ice_sbq_msg_req {
|
|
u8 dest_dev;
|
|
u8 src_dev;
|
|
u8 opcode;
|
|
u8 flags;
|
|
u8 sbe_fbe;
|
|
u8 func_id;
|
|
__le16 msg_addr_low;
|
|
__le32 msg_addr_high;
|
|
__le32 data;
|
|
};
|
|
|
|
struct ice_sbq_msg_cmpl {
|
|
u8 dest_dev;
|
|
u8 src_dev;
|
|
u8 opcode;
|
|
u8 flags;
|
|
__le32 data;
|
|
};
|
|
|
|
/* Internal struct */
|
|
struct ice_sbq_msg_input {
|
|
u8 dest_dev;
|
|
u8 opcode;
|
|
u16 msg_addr_low;
|
|
u32 msg_addr_high;
|
|
u32 data;
|
|
};
|
|
#endif /* _ICE_SBQ_CMD_H_ */
|