mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
Octeontx2-af: Fetch MAC channel info from firmware
Packet ingress and egress MAC/serdes channel numbers are configurable on CN10K series of silicons. These channel numbers inturn used while installing MCAM rules to match ingress/egress port. Fetch these channel numbers from firmware at driver init time. Signed-off-by: Hariprasad Kelam <hkelam@marvell.com> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b53e84645b
commit
997814491c
2 changed files with 17 additions and 1 deletions
|
@ -443,6 +443,13 @@ struct mbox_wq_info {
|
||||||
struct workqueue_struct *mbox_wq;
|
struct workqueue_struct *mbox_wq;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct channel_fwdata {
|
||||||
|
struct sdp_node_info info;
|
||||||
|
u8 valid;
|
||||||
|
#define RVU_CHANL_INFO_RESERVED 379
|
||||||
|
u8 reserved[RVU_CHANL_INFO_RESERVED];
|
||||||
|
};
|
||||||
|
|
||||||
struct rvu_fwdata {
|
struct rvu_fwdata {
|
||||||
#define RVU_FWDATA_HEADER_MAGIC 0xCFDA /* Custom Firmware Data*/
|
#define RVU_FWDATA_HEADER_MAGIC 0xCFDA /* Custom Firmware Data*/
|
||||||
#define RVU_FWDATA_VERSION 0x0001
|
#define RVU_FWDATA_VERSION 0x0001
|
||||||
|
@ -461,7 +468,8 @@ struct rvu_fwdata {
|
||||||
u64 msixtr_base;
|
u64 msixtr_base;
|
||||||
u32 ptp_ext_clk_rate;
|
u32 ptp_ext_clk_rate;
|
||||||
u32 ptp_ext_tstamp;
|
u32 ptp_ext_tstamp;
|
||||||
#define FWDATA_RESERVED_MEM 1022
|
struct channel_fwdata channel_data;
|
||||||
|
#define FWDATA_RESERVED_MEM 1014
|
||||||
u64 reserved[FWDATA_RESERVED_MEM];
|
u64 reserved[FWDATA_RESERVED_MEM];
|
||||||
#define CGX_MAX 9
|
#define CGX_MAX 9
|
||||||
#define CGX_LMACS_MAX 4
|
#define CGX_LMACS_MAX 4
|
||||||
|
|
|
@ -56,6 +56,14 @@ int rvu_sdp_init(struct rvu *rvu)
|
||||||
struct rvu_pfvf *pfvf;
|
struct rvu_pfvf *pfvf;
|
||||||
u32 i = 0;
|
u32 i = 0;
|
||||||
|
|
||||||
|
if (rvu->fwdata->channel_data.valid) {
|
||||||
|
sdp_pf_num[0] = 0;
|
||||||
|
pfvf = &rvu->pf[sdp_pf_num[0]];
|
||||||
|
pfvf->sdp_info = &rvu->fwdata->channel_data.info;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
while ((i < MAX_SDP) && (pdev = pci_get_device(PCI_VENDOR_ID_CAVIUM,
|
while ((i < MAX_SDP) && (pdev = pci_get_device(PCI_VENDOR_ID_CAVIUM,
|
||||||
PCI_DEVID_OTX2_SDP_PF,
|
PCI_DEVID_OTX2_SDP_PF,
|
||||||
pdev)) != NULL) {
|
pdev)) != NULL) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue