diff options
Diffstat (limited to 'target/linux/ramips/files/arch/mips/ralink')
6 files changed, 14 insertions, 18 deletions
diff --git a/target/linux/ramips/files/arch/mips/ralink/common/setup.c b/target/linux/ramips/files/arch/mips/ralink/common/setup.c index 86e951ca2..988965bc7 100644 --- a/target/linux/ramips/files/arch/mips/ralink/common/setup.c +++ b/target/linux/ramips/files/arch/mips/ralink/common/setup.c @@ -19,6 +19,13 @@ #include <asm/mach-ralink/common.h> #include <ralink_soc.h> +unsigned char ramips_sys_type[RAMIPS_SYS_TYPE_LEN]; + +const char *get_system_type(void) +{ + return ramips_sys_type; +} + static void __init detect_mem_size(void) { unsigned long size; diff --git a/target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c b/target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c index 0c47df814..e7c3787e1 100644 --- a/target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c +++ b/target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c @@ -15,11 +15,10 @@ #include <linux/init.h> #include <linux/module.h> +#include <asm/mach-ralink/common.h> #include <asm/mach-ralink/rt288x.h> #include <asm/mach-ralink/rt288x_regs.h> -unsigned char rt288x_sys_type[RT288X_SYS_TYPE_LEN]; - unsigned long rt288x_cpu_freq; EXPORT_SYMBOL_GPL(rt288x_cpu_freq); @@ -39,7 +38,7 @@ void __init rt288x_detect_sys_type(void) n1 = rt288x_sysc_rr(SYSC_REG_CHIP_NAME1); id = rt288x_sysc_rr(SYSC_REG_CHIP_ID); - snprintf(rt288x_sys_type, RT288X_SYS_TYPE_LEN, + snprintf(ramips_sys_type, RAMIPS_SYS_TYPE_LEN, "Ralink %c%c%c%c%c%c%c%c id:%u rev:%u", (char) (n0 & 0xff), (char) ((n0 >> 8) & 0xff), (char) ((n0 >> 16) & 0xff), (char) ((n0 >> 24) & 0xff), diff --git a/target/linux/ramips/files/arch/mips/ralink/rt288x/setup.c b/target/linux/ramips/files/arch/mips/ralink/rt288x/setup.c index 920f44ae4..05184f0bd 100644 --- a/target/linux/ramips/files/arch/mips/ralink/rt288x/setup.c +++ b/target/linux/ramips/files/arch/mips/ralink/rt288x/setup.c @@ -73,11 +73,6 @@ static void __init rt288x_early_serial_setup(void) err); } -const char *get_system_type(void) -{ - return rt288x_sys_type; -} - unsigned int __cpuinit get_c0_compare_irq(void) { return CP0_LEGACY_COMPARE_IRQ; @@ -91,7 +86,7 @@ void __init ramips_soc_setup(void) rt288x_detect_sys_type(); rt288x_detect_sys_freq(); - printk(KERN_INFO "%s running at %lu.%02lu MHz\n", get_system_type(), + printk(KERN_INFO "%s running at %lu.%02lu MHz\n", ramips_sys_type, rt288x_cpu_freq / 1000000, (rt288x_cpu_freq % 1000000) * 100 / 1000000); diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/prom.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/prom.c index 756f237ea..8f5ddf200 100644 --- a/target/linux/ramips/files/arch/mips/ralink/rt305x/prom.c +++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/prom.c @@ -13,6 +13,7 @@ #include <asm/bootinfo.h> +#include <asm/mach-ralink/common.h> #include <asm/mach-ralink/rt305x.h> #include <asm/mach-ralink/rt305x_regs.h> diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c index b2ab3cdf5..249da36b0 100644 --- a/target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c +++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c @@ -15,11 +15,10 @@ #include <linux/init.h> #include <linux/module.h> +#include <asm/mach-ralink/common.h> #include <asm/mach-ralink/rt305x.h> #include <asm/mach-ralink/rt305x_regs.h> -unsigned char rt305x_sys_type[RT305X_SYS_TYPE_LEN]; - unsigned long rt305x_cpu_freq; EXPORT_SYMBOL_GPL(rt305x_cpu_freq); @@ -39,7 +38,7 @@ void __init rt305x_detect_sys_type(void) n1 = rt305x_sysc_rr(SYSC_REG_CHIP_NAME1); id = rt305x_sysc_rr(SYSC_REG_CHIP_ID); - snprintf(rt305x_sys_type, RT305X_SYS_TYPE_LEN, + snprintf(ramips_sys_type, RAMIPS_SYS_TYPE_LEN, "Ralink %c%c%c%c%c%c%c%c id:%u rev:%u", (char) (n0 & 0xff), (char) ((n0 >> 8) & 0xff), (char) ((n0 >> 16) & 0xff), (char) ((n0 >> 24) & 0xff), diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c index 3aa6c9b9f..ac945b8be 100644 --- a/target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c +++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c @@ -75,11 +75,6 @@ static void __init rt305x_early_serial_setup(void) err); } -const char *get_system_type(void) -{ - return rt305x_sys_type; -} - unsigned int __cpuinit get_c0_compare_irq(void) { return CP0_LEGACY_COMPARE_IRQ; @@ -93,7 +88,7 @@ void __init ramips_soc_setup(void) rt305x_detect_sys_type(); rt305x_detect_sys_freq(); - printk(KERN_INFO "%s running at %lu.%02lu MHz\n", get_system_type(), + printk(KERN_INFO "%s running at %lu.%02lu MHz\n", ramips_sys_type, rt305x_cpu_freq / 1000000, (rt305x_cpu_freq % 1000000) * 100 / 1000000); |