aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-03-12 16:12:13 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-03-12 16:12:13 +0000
commit0f77d0b2baccc813342d69143a0554d8125a9d54 (patch)
tree9c9c87a7f0b4ff7fc36251cf933829a01b02e367 /target/linux/ramips/files
parente6af9d374aeea2718aaa3bbc86ed516cdd2df4d9 (diff)
downloadupstream-0f77d0b2baccc813342d69143a0554d8125a9d54.tar.gz
upstream-0f77d0b2baccc813342d69143a0554d8125a9d54.tar.bz2
upstream-0f77d0b2baccc813342d69143a0554d8125a9d54.zip
ramips: add RT3350 detection
SVN-Revision: 30900
Diffstat (limited to 'target/linux/ramips/files')
-rw-r--r--target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x.h6
-rw-r--r--target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_regs.h3
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c3
3 files changed, 12 insertions, 0 deletions
diff --git a/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x.h b/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x.h
index 9aab64f459..2c62a1689b 100644
--- a/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x.h
+++ b/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x.h
@@ -20,6 +20,7 @@ enum rt305x_soc_type {
RT305X_SOC_UNKNOWN = 0,
RT305X_SOC_RT3050,
RT305X_SOC_RT3052,
+ RT305X_SOC_RT3350,
RT305X_SOC_RT3352,
};
@@ -40,6 +41,11 @@ static inline int soc_is_rt305x(void)
return soc_is_rt3050() || soc_is_rt3052();
}
+static inline int soc_is_rt3350(void)
+{
+ return rt305x_soc == RT305X_SOC_RT3350;
+}
+
static inline int soc_is_rt3352(void)
{
return rt305x_soc == RT305X_SOC_RT3352;
diff --git a/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_regs.h b/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_regs.h
index 819f1ee606..9e1aa66429 100644
--- a/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_regs.h
+++ b/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_regs.h
@@ -60,6 +60,9 @@
#define RT3052_CHIP_NAME0 0x30335452
#define RT3052_CHIP_NAME1 0x20203235
+#define RT3350_CHIP_NAME0 0x33335452
+#define RT3350_CHIP_NAME1 0x20203035
+
#define RT3352_CHIP_NAME0 0x33335452
#define RT3352_CHIP_NAME1 0x20203235
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 863972eba0..831db84c73 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c
@@ -48,6 +48,9 @@ void __init ramips_soc_prom_init(void)
rt305x_soc = RT305X_SOC_RT3052;
name = "RT3052";
}
+ } else if (n0 == RT3350_CHIP_NAME0 && n1 == RT3350_CHIP_NAME1) {
+ rt305x_soc = RT305X_SOC_RT3350;
+ name = "RT3350";
} else if (n0 == RT3352_CHIP_NAME0 && n1 == RT3352_CHIP_NAME1) {
rt305x_soc = RT305X_SOC_RT3352;
name = "RT3352";