1
0
Fork 0
forked from mirror/openwrt

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 <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21327
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Markus Stockhausen 2025-12-30 14:07:32 +01:00 committed by Hauke Mehrtens
parent 6b2e7ffd4b
commit 8e6cd2608a

View file

@ -187,6 +187,7 @@ static u32 __init read_model(void)
if ((id >= 0x8380 && id <= 0x8382) || id == 0x8330 || id == 0x8332) {
soc_info.id = id;
soc_info.family = RTL8380_FAMILY_ID;
soc_info.cpu_port = RTL838X_CPU_PORT;
rtl838x_read_details(model);
return model;
}
@ -196,6 +197,7 @@ static u32 __init read_model(void)
if ((id >= 0x8391 && id <= 0x8396) || (id >= 0x8351 && id <= 0x8353)) {
soc_info.id = id;
soc_info.family = RTL8390_FAMILY_ID;
soc_info.cpu_port = RTL839X_CPU_PORT;
rtl839x_read_details(model);
return model;
}
@ -205,11 +207,13 @@ static u32 __init read_model(void)
if (id >= 0x9301 && id <= 0x9303) {
soc_info.id = id;
soc_info.family = RTL9300_FAMILY_ID;
soc_info.cpu_port = RTL930X_CPU_PORT;
rtl93xx_read_details(model);
return model;
} else if (id >= 0x9311 && id <= 0x9313) {
soc_info.id = id;
soc_info.family = RTL9310_FAMILY_ID;
soc_info.cpu_port = RTL931X_CPU_PORT;
rtl93xx_read_details(model);
return model;
}