diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-05-01 14:05:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-01 15:03:12 -0400 |
commit | bf7d71c0451776143cdbd9a42a5bcbd6478da3c8 (patch) | |
tree | 13a30eed06c328032049b8ac6bcda20c36bd6c00 | |
parent | 0ad5daf6ba80af4a8d72b4284079357c4e3b9e4a (diff) |
net: dsa: mv88e6xxx: make VTU helpers static
Now that we have chip operations for VTU accesses, mark all helpers from
global1_vtu.c as static. Only the various implementations of the
GetNext, LoadPurge and Flush operations need to be exposed.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/global1.h | 24 | ||||
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/global1_vtu.c | 48 |
2 files changed, 24 insertions, 48 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/global1.h b/drivers/net/dsa/mv88e6xxx/global1.h index 60dd7079c756..82e9812b8ba7 100644 --- a/drivers/net/dsa/mv88e6xxx/global1.h +++ b/drivers/net/dsa/mv88e6xxx/global1.h | |||
@@ -50,30 +50,6 @@ int mv88e6xxx_g1_atu_flush(struct mv88e6xxx_chip *chip, u16 fid, bool all); | |||
50 | int mv88e6xxx_g1_atu_remove(struct mv88e6xxx_chip *chip, u16 fid, int port, | 50 | int mv88e6xxx_g1_atu_remove(struct mv88e6xxx_chip *chip, u16 fid, int port, |
51 | bool all); | 51 | bool all); |
52 | 52 | ||
53 | int mv88e6xxx_g1_vtu_fid_read(struct mv88e6xxx_chip *chip, | ||
54 | struct mv88e6xxx_vtu_entry *entry); | ||
55 | int mv88e6xxx_g1_vtu_fid_write(struct mv88e6xxx_chip *chip, | ||
56 | struct mv88e6xxx_vtu_entry *entry); | ||
57 | int mv88e6xxx_g1_vtu_sid_read(struct mv88e6xxx_chip *chip, | ||
58 | struct mv88e6xxx_vtu_entry *entry); | ||
59 | int mv88e6xxx_g1_vtu_sid_write(struct mv88e6xxx_chip *chip, | ||
60 | struct mv88e6xxx_vtu_entry *entry); | ||
61 | int mv88e6xxx_g1_vtu_vid_read(struct mv88e6xxx_chip *chip, | ||
62 | struct mv88e6xxx_vtu_entry *entry); | ||
63 | int mv88e6xxx_g1_vtu_vid_write(struct mv88e6xxx_chip *chip, | ||
64 | struct mv88e6xxx_vtu_entry *entry); | ||
65 | int mv88e6185_g1_vtu_data_read(struct mv88e6xxx_chip *chip, | ||
66 | struct mv88e6xxx_vtu_entry *entry); | ||
67 | int mv88e6185_g1_vtu_data_write(struct mv88e6xxx_chip *chip, | ||
68 | struct mv88e6xxx_vtu_entry *entry); | ||
69 | int mv88e6xxx_g1_vtu_op_wait(struct mv88e6xxx_chip *chip); | ||
70 | int mv88e6xxx_g1_vtu_op(struct mv88e6xxx_chip *chip, u16 op); | ||
71 | int mv88e6xxx_g1_vtu_getnext(struct mv88e6xxx_chip *chip, | ||
72 | struct mv88e6xxx_vtu_entry *entry); | ||
73 | int mv88e6xxx_g1_vtu_stu_getnext(struct mv88e6xxx_chip *chip, | ||
74 | struct mv88e6xxx_vtu_entry *vtu); | ||
75 | int mv88e6xxx_g1_vtu_stu_get(struct mv88e6xxx_chip *chip, | ||
76 | struct mv88e6xxx_vtu_entry *vtu); | ||
77 | int mv88e6185_g1_vtu_getnext(struct mv88e6xxx_chip *chip, | 53 | int mv88e6185_g1_vtu_getnext(struct mv88e6xxx_chip *chip, |
78 | struct mv88e6xxx_vtu_entry *entry); | 54 | struct mv88e6xxx_vtu_entry *entry); |
79 | int mv88e6185_g1_vtu_loadpurge(struct mv88e6xxx_chip *chip, | 55 | int mv88e6185_g1_vtu_loadpurge(struct mv88e6xxx_chip *chip, |
diff --git a/drivers/net/dsa/mv88e6xxx/global1_vtu.c b/drivers/net/dsa/mv88e6xxx/global1_vtu.c index 73e08c5c3948..469056d0b421 100644 --- a/drivers/net/dsa/mv88e6xxx/global1_vtu.c +++ b/drivers/net/dsa/mv88e6xxx/global1_vtu.c | |||
@@ -16,8 +16,8 @@ | |||
16 | 16 | ||
17 | /* Offset 0x02: VTU FID Register */ | 17 | /* Offset 0x02: VTU FID Register */ |
18 | 18 | ||
19 | int mv88e6xxx_g1_vtu_fid_read(struct mv88e6xxx_chip *chip, | 19 | static int mv88e6xxx_g1_vtu_fid_read(struct mv88e6xxx_chip *chip, |
20 | struct mv88e6xxx_vtu_entry *entry) | 20 | struct mv88e6xxx_vtu_entry *entry) |
21 | { | 21 | { |
22 | u16 val; | 22 | u16 val; |
23 | int err; | 23 | int err; |
@@ -31,8 +31,8 @@ int mv88e6xxx_g1_vtu_fid_read(struct mv88e6xxx_chip *chip, | |||
31 | return 0; | 31 | return 0; |
32 | } | 32 | } |
33 | 33 | ||
34 | int mv88e6xxx_g1_vtu_fid_write(struct mv88e6xxx_chip *chip, | 34 | static int mv88e6xxx_g1_vtu_fid_write(struct mv88e6xxx_chip *chip, |
35 | struct mv88e6xxx_vtu_entry *entry) | 35 | struct mv88e6xxx_vtu_entry *entry) |
36 | { | 36 | { |
37 | u16 val = entry->fid & GLOBAL_VTU_FID_MASK; | 37 | u16 val = entry->fid & GLOBAL_VTU_FID_MASK; |
38 | 38 | ||
@@ -41,8 +41,8 @@ int mv88e6xxx_g1_vtu_fid_write(struct mv88e6xxx_chip *chip, | |||
41 | 41 | ||
42 | /* Offset 0x03: VTU SID Register */ | 42 | /* Offset 0x03: VTU SID Register */ |
43 | 43 | ||
44 | int mv88e6xxx_g1_vtu_sid_read(struct mv88e6xxx_chip *chip, | 44 | static int mv88e6xxx_g1_vtu_sid_read(struct mv88e6xxx_chip *chip, |
45 | struct mv88e6xxx_vtu_entry *entry) | 45 | struct mv88e6xxx_vtu_entry *entry) |
46 | { | 46 | { |
47 | u16 val; | 47 | u16 val; |
48 | int err; | 48 | int err; |
@@ -56,8 +56,8 @@ int mv88e6xxx_g1_vtu_sid_read(struct mv88e6xxx_chip *chip, | |||
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | 58 | ||
59 | int mv88e6xxx_g1_vtu_sid_write(struct mv88e6xxx_chip *chip, | 59 | static int mv88e6xxx_g1_vtu_sid_write(struct mv88e6xxx_chip *chip, |
60 | struct mv88e6xxx_vtu_entry *entry) | 60 | struct mv88e6xxx_vtu_entry *entry) |
61 | { | 61 | { |
62 | u16 val = entry->sid & GLOBAL_VTU_SID_MASK; | 62 | u16 val = entry->sid & GLOBAL_VTU_SID_MASK; |
63 | 63 | ||
@@ -66,12 +66,12 @@ int mv88e6xxx_g1_vtu_sid_write(struct mv88e6xxx_chip *chip, | |||
66 | 66 | ||
67 | /* Offset 0x05: VTU Operation Register */ | 67 | /* Offset 0x05: VTU Operation Register */ |
68 | 68 | ||
69 | int mv88e6xxx_g1_vtu_op_wait(struct mv88e6xxx_chip *chip) | 69 | static int mv88e6xxx_g1_vtu_op_wait(struct mv88e6xxx_chip *chip) |
70 | { | 70 | { |
71 | return mv88e6xxx_g1_wait(chip, GLOBAL_VTU_OP, GLOBAL_VTU_OP_BUSY); | 71 | return mv88e6xxx_g1_wait(chip, GLOBAL_VTU_OP, GLOBAL_VTU_OP_BUSY); |
72 | } | 72 | } |
73 | 73 | ||
74 | int mv88e6xxx_g1_vtu_op(struct mv88e6xxx_chip *chip, u16 op) | 74 | static int mv88e6xxx_g1_vtu_op(struct mv88e6xxx_chip *chip, u16 op) |
75 | { | 75 | { |
76 | int err; | 76 | int err; |
77 | 77 | ||
@@ -84,8 +84,8 @@ int mv88e6xxx_g1_vtu_op(struct mv88e6xxx_chip *chip, u16 op) | |||
84 | 84 | ||
85 | /* Offset 0x06: VTU VID Register */ | 85 | /* Offset 0x06: VTU VID Register */ |
86 | 86 | ||
87 | int mv88e6xxx_g1_vtu_vid_read(struct mv88e6xxx_chip *chip, | 87 | static int mv88e6xxx_g1_vtu_vid_read(struct mv88e6xxx_chip *chip, |
88 | struct mv88e6xxx_vtu_entry *entry) | 88 | struct mv88e6xxx_vtu_entry *entry) |
89 | { | 89 | { |
90 | u16 val; | 90 | u16 val; |
91 | int err; | 91 | int err; |
@@ -100,8 +100,8 @@ int mv88e6xxx_g1_vtu_vid_read(struct mv88e6xxx_chip *chip, | |||
100 | return 0; | 100 | return 0; |
101 | } | 101 | } |
102 | 102 | ||
103 | int mv88e6xxx_g1_vtu_vid_write(struct mv88e6xxx_chip *chip, | 103 | static int mv88e6xxx_g1_vtu_vid_write(struct mv88e6xxx_chip *chip, |
104 | struct mv88e6xxx_vtu_entry *entry) | 104 | struct mv88e6xxx_vtu_entry *entry) |
105 | { | 105 | { |
106 | u16 val = entry->vid & 0xfff; | 106 | u16 val = entry->vid & 0xfff; |
107 | 107 | ||
@@ -116,8 +116,8 @@ int mv88e6xxx_g1_vtu_vid_write(struct mv88e6xxx_chip *chip, | |||
116 | * Offset 0x09: VTU/STU Data Register 3 | 116 | * Offset 0x09: VTU/STU Data Register 3 |
117 | */ | 117 | */ |
118 | 118 | ||
119 | int mv88e6185_g1_vtu_data_read(struct mv88e6xxx_chip *chip, | 119 | static int mv88e6185_g1_vtu_data_read(struct mv88e6xxx_chip *chip, |
120 | struct mv88e6xxx_vtu_entry *entry) | 120 | struct mv88e6xxx_vtu_entry *entry) |
121 | { | 121 | { |
122 | u16 regs[3]; | 122 | u16 regs[3]; |
123 | int i; | 123 | int i; |
@@ -144,8 +144,8 @@ int mv88e6185_g1_vtu_data_read(struct mv88e6xxx_chip *chip, | |||
144 | return 0; | 144 | return 0; |
145 | } | 145 | } |
146 | 146 | ||
147 | int mv88e6185_g1_vtu_data_write(struct mv88e6xxx_chip *chip, | 147 | static int mv88e6185_g1_vtu_data_write(struct mv88e6xxx_chip *chip, |
148 | struct mv88e6xxx_vtu_entry *entry) | 148 | struct mv88e6xxx_vtu_entry *entry) |
149 | { | 149 | { |
150 | u16 regs[3] = { 0 }; | 150 | u16 regs[3] = { 0 }; |
151 | int i; | 151 | int i; |
@@ -174,8 +174,8 @@ int mv88e6185_g1_vtu_data_write(struct mv88e6xxx_chip *chip, | |||
174 | 174 | ||
175 | /* VLAN Translation Unit Operations */ | 175 | /* VLAN Translation Unit Operations */ |
176 | 176 | ||
177 | int mv88e6xxx_g1_vtu_stu_getnext(struct mv88e6xxx_chip *chip, | 177 | static int mv88e6xxx_g1_vtu_stu_getnext(struct mv88e6xxx_chip *chip, |
178 | struct mv88e6xxx_vtu_entry *entry) | 178 | struct mv88e6xxx_vtu_entry *entry) |
179 | { | 179 | { |
180 | int err; | 180 | int err; |
181 | 181 | ||
@@ -194,8 +194,8 @@ int mv88e6xxx_g1_vtu_stu_getnext(struct mv88e6xxx_chip *chip, | |||
194 | return mv88e6xxx_g1_vtu_vid_read(chip, entry); | 194 | return mv88e6xxx_g1_vtu_vid_read(chip, entry); |
195 | } | 195 | } |
196 | 196 | ||
197 | int mv88e6xxx_g1_vtu_stu_get(struct mv88e6xxx_chip *chip, | 197 | static int mv88e6xxx_g1_vtu_stu_get(struct mv88e6xxx_chip *chip, |
198 | struct mv88e6xxx_vtu_entry *vtu) | 198 | struct mv88e6xxx_vtu_entry *vtu) |
199 | { | 199 | { |
200 | struct mv88e6xxx_vtu_entry stu; | 200 | struct mv88e6xxx_vtu_entry stu; |
201 | int err; | 201 | int err; |
@@ -216,8 +216,8 @@ int mv88e6xxx_g1_vtu_stu_get(struct mv88e6xxx_chip *chip, | |||
216 | return 0; | 216 | return 0; |
217 | } | 217 | } |
218 | 218 | ||
219 | int mv88e6xxx_g1_vtu_getnext(struct mv88e6xxx_chip *chip, | 219 | static int mv88e6xxx_g1_vtu_getnext(struct mv88e6xxx_chip *chip, |
220 | struct mv88e6xxx_vtu_entry *entry) | 220 | struct mv88e6xxx_vtu_entry *entry) |
221 | { | 221 | { |
222 | int err; | 222 | int err; |
223 | 223 | ||