Skip to content

Commit 9d106c6

Browse files
logostdavem330
authored andcommitted
net: atlantic: MACSec egress offload HW bindings
This patch adds the Atlantic HW-specific bindings for MACSec egress, e.g. register addresses / structs, helper function, etc, which will be used by actual callback implementations. Signed-off-by: Dmitry Bogdanov <[email protected]> Signed-off-by: Mark Starovoytov <[email protected]> Signed-off-by: Igor Russkikh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 62c1c2e commit 9d106c6

File tree

5 files changed

+1451
-1
lines changed

5 files changed

+1451
-1
lines changed

drivers/net/ethernet/aquantia/atlantic/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ atlantic-objs := aq_main.o \
2424
hw_atl/hw_atl_b0.o \
2525
hw_atl/hw_atl_utils.o \
2626
hw_atl/hw_atl_utils_fw2x.o \
27-
hw_atl/hw_atl_llh.o
27+
hw_atl/hw_atl_llh.o \
28+
macsec/macsec_api.o
2829

2930
atlantic-$(CONFIG_MACSEC) += aq_macsec.o
3031

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
/* Atlantic Network Driver
3+
* Copyright (C) 2020 Marvell International Ltd.
4+
*/
5+
6+
#ifndef MSS_EGRESS_REGS_HEADER
7+
#define MSS_EGRESS_REGS_HEADER
8+
9+
#define MSS_EGRESS_CTL_REGISTER_ADDR 0x00005002
10+
#define MSS_EGRESS_SA_EXPIRED_STATUS_REGISTER_ADDR 0x00005060
11+
#define MSS_EGRESS_SA_THRESHOLD_EXPIRED_STATUS_REGISTER_ADDR 0x00005062
12+
#define MSS_EGRESS_LUT_ADDR_CTL_REGISTER_ADDR 0x00005080
13+
#define MSS_EGRESS_LUT_CTL_REGISTER_ADDR 0x00005081
14+
#define MSS_EGRESS_LUT_DATA_CTL_REGISTER_ADDR 0x000050A0
15+
16+
struct mss_egress_ctl_register {
17+
union {
18+
struct {
19+
unsigned int soft_reset : 1;
20+
unsigned int drop_kay_packet : 1;
21+
unsigned int drop_egprc_lut_miss : 1;
22+
unsigned int gcm_start : 1;
23+
unsigned int gcm_test_mode : 1;
24+
unsigned int unmatched_use_sc_0 : 1;
25+
unsigned int drop_invalid_sa_sc_packets : 1;
26+
unsigned int reserved0 : 1;
27+
/* Should always be set to 0. */
28+
unsigned int external_classification_enable : 1;
29+
unsigned int icv_lsb_8bytes_enable : 1;
30+
unsigned int high_prio : 1;
31+
unsigned int clear_counter : 1;
32+
unsigned int clear_global_time : 1;
33+
unsigned int ethertype_explicit_sectag_lsb : 3;
34+
} bits_0;
35+
unsigned short word_0;
36+
};
37+
union {
38+
struct {
39+
unsigned int ethertype_explicit_sectag_msb : 13;
40+
unsigned int reserved0 : 3;
41+
} bits_1;
42+
unsigned short word_1;
43+
};
44+
};
45+
46+
struct mss_egress_lut_addr_ctl_register {
47+
union {
48+
struct {
49+
unsigned int lut_addr : 9;
50+
unsigned int reserved0 : 3;
51+
/* 0x0 : Egress MAC Control FIlter (CTLF) LUT
52+
* 0x1 : Egress Classification LUT
53+
* 0x2 : Egress SC/SA LUT
54+
* 0x3 : Egress SMIB
55+
*/
56+
unsigned int lut_select : 4;
57+
} bits_0;
58+
unsigned short word_0;
59+
};
60+
};
61+
62+
struct mss_egress_lut_ctl_register {
63+
union {
64+
struct {
65+
unsigned int reserved0 : 14;
66+
unsigned int lut_read : 1;
67+
unsigned int lut_write : 1;
68+
} bits_0;
69+
unsigned short word_0;
70+
};
71+
};
72+
73+
#endif /* MSS_EGRESS_REGS_HEADER */

0 commit comments

Comments
 (0)