Skip to content

Commit 8e6cd26

Browse files
plappermaulhauke
authored andcommitted
realtek: setup cpu port in soc_info structure
A lot of soc_info usage has been reorganized. Nevertheless there are some consumers left. A very critical one is the dsa/qos coding. It makes use of the cpu_port in this shared structure. This is totally broken as that info is never properly initialized. Fill the cpu_port according to the identified hardware. Remark: Looking at the prom.c history soc_info.cpu_port was never setup since the beginning of time. So no "fixes" tag here. Signed-off-by: Markus Stockhausen <[email protected]> Link: openwrt/openwrt#21327 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent 6b2e7ff commit 8e6cd26

File tree

1 file changed

+4
-0
lines changed
  • target/linux/realtek/files-6.12/arch/mips/rtl838x

1 file changed

+4
-0
lines changed

target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ static u32 __init read_model(void)
187187
if ((id >= 0x8380 && id <= 0x8382) || id == 0x8330 || id == 0x8332) {
188188
soc_info.id = id;
189189
soc_info.family = RTL8380_FAMILY_ID;
190+
soc_info.cpu_port = RTL838X_CPU_PORT;
190191
rtl838x_read_details(model);
191192
return model;
192193
}
@@ -196,6 +197,7 @@ static u32 __init read_model(void)
196197
if ((id >= 0x8391 && id <= 0x8396) || (id >= 0x8351 && id <= 0x8353)) {
197198
soc_info.id = id;
198199
soc_info.family = RTL8390_FAMILY_ID;
200+
soc_info.cpu_port = RTL839X_CPU_PORT;
199201
rtl839x_read_details(model);
200202
return model;
201203
}
@@ -205,11 +207,13 @@ static u32 __init read_model(void)
205207
if (id >= 0x9301 && id <= 0x9303) {
206208
soc_info.id = id;
207209
soc_info.family = RTL9300_FAMILY_ID;
210+
soc_info.cpu_port = RTL930X_CPU_PORT;
208211
rtl93xx_read_details(model);
209212
return model;
210213
} else if (id >= 0x9311 && id <= 0x9313) {
211214
soc_info.id = id;
212215
soc_info.family = RTL9310_FAMILY_ID;
216+
soc_info.cpu_port = RTL931X_CPU_PORT;
213217
rtl93xx_read_details(model);
214218
return model;
215219
}

0 commit comments

Comments
 (0)