use common get_system_type function
authorGabor Juhos <juhosg@openwrt.org>
Mon, 31 Aug 2009 18:53:31 +0000 (18:53 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Mon, 31 Aug 2009 18:53:31 +0000 (18:53 +0000)
SVN-Revision: 17455

target/linux/ramips/files/arch/mips/include/asm/mach-ralink/common.h
target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt288x.h
target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x.h
target/linux/ramips/files/arch/mips/ralink/common/setup.c
target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c
target/linux/ramips/files/arch/mips/ralink/rt288x/setup.c
target/linux/ramips/files/arch/mips/ralink/rt305x/prom.c
target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c
target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c

index 240951bb1b760b4185b1a42f785bd8494734787f..250e5a7787f4569d4469a45763078d509eedee94 100644 (file)
@@ -9,6 +9,9 @@
 #ifndef __ASM_MACH_RALINK_COMMON_H
 #define __ASM_MACH_RALINK_COMMON_H
 
+#define RAMIPS_SYS_TYPE_LEN    64
+extern unsigned char ramips_sys_type[RAMIPS_SYS_TYPE_LEN];
+
 void __init ramips_intc_irq_init(unsigned intc_base, unsigned irq,
                                 unsigned irq_base);
 u32 ramips_intc_get_status(void);
index 4e0e36e8ecc6fdb083a0ed5a86faf688b98989b5..85331a5ba9a90af395454bf34c7f7b8b3009f39b 100644 (file)
 #include <linux/io.h>
 
 void rt288x_detect_sys_type(void) __init;
-
-#define RT288X_SYS_TYPE_LEN    64
-extern unsigned char rt288x_sys_type[RT288X_SYS_TYPE_LEN];
-
 void rt288x_detect_sys_freq(void) __init;
 
 extern unsigned long rt288x_cpu_freq;
index c94f28c45ed2f5d878de250732569e3a1fbf0009..c9d5b4458b8a84fb8d9e75f1a15fa87265ba98d9 100644 (file)
 #include <linux/io.h>
 
 void rt305x_detect_sys_type(void) __init;
-
-#define RT305X_SYS_TYPE_LEN    64
-extern unsigned char rt305x_sys_type[RT305X_SYS_TYPE_LEN];
-
 void rt305x_detect_sys_freq(void) __init;
 
 extern unsigned long rt305x_cpu_freq;
index 86e951ca20bc26355878f0c3e8a3353761e6004f..988965bc71cb6bd5fe0ecd70655f3f3fff4eb030 100644 (file)
 #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;
index 0c47df814138351786f48ba0550dfbfe6a6993b2..e7c3787e1b97ba7bd51959ad37cd73075ddea8c0 100644 (file)
 #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),
index 920f44ae416568c40c0dda80d17a1b3e78a74f84..05184f0bd806ffee10354163fbcf388f07439d6a 100644 (file)
@@ -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);
 
index 756f237eabfaec57701cdd4e8ceba23a2c1fae81..8f5ddf2002597784c49479a209e60cb5e013de8c 100644 (file)
@@ -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>
 
index b2ab3cdf50ea9bf1ed701b5ef87ec6c5a281a047..249da36b064b0533983bd7b7492bcef6f16781ce 100644 (file)
 #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),
index 3aa6c9b9fa78da988d3d92c9ad4cda9b10d4812c..ac945b8beedee2ebcb0f88e51205e1f89e6fc8ed 100644 (file)
@@ -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);