realtek: harmonize variables in prom.c

There is mix of variable naming in prom.c. Use a fixed
prefix of "rtl_" for all static variables. Additionally
remove the prefix from rtl83xx_set_system_type as it is
a generic function for all SoC types.

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 09:59:26 +01:00 committed by Hauke Mehrtens
parent 2c81176f2b
commit 8337573422

View file

@ -20,13 +20,13 @@
struct rtl83xx_soc_info soc_info;
const void *fdt;
static char soc_name[16];
static char rtl83xx_system_type[48];
static char rtl_soc_name[16];
static char rtl_system_type[48];
#ifdef CONFIG_MIPS_MT_SMP
extern const struct plat_smp_ops vsmp_smp_ops;
static struct plat_smp_ops rtlops;
static struct plat_smp_ops rtl_smp_ops;
static void rtlsmp_init_secondary(void)
{
@ -62,10 +62,10 @@ static int rtlsmp_register(void)
if (!cpu_has_mipsmt)
return 1;
rtlops = vsmp_smp_ops;
rtlops.init_secondary = rtlsmp_init_secondary;
rtlops.smp_finish = rtlsmp_finish;
register_smp_ops(&rtlops);
rtl_smp_ops = vsmp_smp_ops;
rtl_smp_ops.init_secondary = rtlsmp_init_secondary;
rtl_smp_ops.smp_finish = rtlsmp_finish;
register_smp_ops(&rtl_smp_ops);
return 0;
}
@ -99,7 +99,7 @@ void __init device_tree_init(void)
const char *get_system_type(void)
{
return rtl83xx_system_type;
return rtl_system_type;
}
static void __init rtl838x_read_details(u32 model)
@ -206,13 +206,13 @@ static void __init parse_model(u32 model)
if (val > 0 && val <= 26)
suffix = 'A' + (val - 1);
snprintf(soc_name, sizeof(soc_name), "RTL%04X%c",
snprintf(rtl_soc_name, sizeof(rtl_soc_name), "RTL%04X%c",
soc_info.id, suffix);
soc_info.name = soc_name;
soc_info.name = rtl_soc_name;
}
static void __init rtl83xx_set_system_type(void)
static void __init set_system_type(void)
{
char revision = '?';
char *es = "";
@ -223,7 +223,7 @@ static void __init rtl83xx_set_system_type(void)
if (soc_info.testchip)
es = " ES";
snprintf(rtl83xx_system_type, sizeof(rtl83xx_system_type),
snprintf(rtl_system_type, sizeof(rtl_system_type),
"Realtek %s%s rev %c (%04X)",
soc_info.name, es, revision, soc_info.cpu);
}
@ -233,7 +233,7 @@ void __init prom_init(void)
u32 model = read_model();
parse_model(model);
rtl83xx_set_system_type();
set_system_type();
pr_info("SoC Type: %s\n", get_system_type());