projects
/
openwrt
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e6af9d3
)
ramips: add RT3350 detection
author
Gabor Juhos
<juhosg@openwrt.org>
Mon, 12 Mar 2012 16:12:13 +0000
(16:12 +0000)
committer
Gabor Juhos
<juhosg@openwrt.org>
Mon, 12 Mar 2012 16:12:13 +0000
(16:12 +0000)
SVN-Revision: 30900
target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x.h
patch
|
blob
|
history
target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_regs.h
patch
|
blob
|
history
target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c
patch
|
blob
|
history
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 9aab64f45977841769ee854826db1830ae1c0222..2c62a1689b5d0111b5af26590c20709cdaae2035 100644
(file)
--- 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_UNKNOWN = 0,
RT305X_SOC_RT3050,
RT305X_SOC_RT3052,
+ RT305X_SOC_RT3350,
RT305X_SOC_RT3352,
};
RT305X_SOC_RT3352,
};
@@
-40,6
+41,11
@@
static inline int soc_is_rt305x(void)
return soc_is_rt3050() || soc_is_rt3052();
}
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;
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 819f1ee6068269a18f548010a41a40819d68339a..9e1aa66429109dd4900a33f5851b8059ede3815a 100644
(file)
--- 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 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
#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 863972eba09bb78ba9cb06a14b434adca65e78ef..831db84c73f54ae208f65bed275381ce86c64467 100644
(file)
--- 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";
}
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";
} else if (n0 == RT3352_CHIP_NAME0 && n1 == RT3352_CHIP_NAME1) {
rt305x_soc = RT305X_SOC_RT3352;
name = "RT3352";