summaryrefslogtreecommitdiff
path: root/arch/mips/ralink/mt7620.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-11-04 11:50:07 +0100
committerRalf Baechle <ralf@linux-mips.org>2015-11-11 08:37:56 +0100
commit418d29c8706170c6801998e48341181b274a47a8 (patch)
tree4fb4ada53d40a1a4e97238bb07947e03872643bc /arch/mips/ralink/mt7620.c
parent81857db913e9782546d29b52cd3efc80c0145c23 (diff)
MIPS: ralink: Unify SoC id handling
This makes detection a lot easier for audio, wifi, ... drivers. Signed-off-by: John Crispin <blogic@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11440/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ralink/mt7620.c')
-rw-r--r--arch/mips/ralink/mt7620.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c
index 4d1a0339dd54..f3a4a08f2e71 100644
--- a/arch/mips/ralink/mt7620.c
+++ b/arch/mips/ralink/mt7620.c
@@ -37,9 +37,6 @@
#define PMU1_CFG 0x8C
#define DIG_SW_SEL BIT(25)
-/* is this a MT7620 or a MT7628 */
-enum mt762x_soc_type mt762x_soc;
-
/* EFUSE bits */
#define EFUSE_MT7688 0x100000
@@ -235,8 +232,8 @@ static struct rt2880_pmx_group mt7628an_pinmux_data[] = {
static inline int is_mt76x8(void)
{
- return mt762x_soc == MT762X_SOC_MT7628AN ||
- mt762x_soc == MT762X_SOC_MT7688;
+ return ralink_soc == MT762X_SOC_MT7628AN ||
+ ralink_soc == MT762X_SOC_MT7688;
}
static __init u32
@@ -511,11 +508,11 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
if (n0 == MT7620_CHIP_NAME0 && n1 == MT7620_CHIP_NAME1) {
if (bga) {
- mt762x_soc = MT762X_SOC_MT7620A;
+ ralink_soc = MT762X_SOC_MT7620A;
name = "MT7620A";
soc_info->compatible = "ralink,mt7620a-soc";
} else {
- mt762x_soc = MT762X_SOC_MT7620N;
+ ralink_soc = MT762X_SOC_MT7620N;
name = "MT7620N";
soc_info->compatible = "ralink,mt7620n-soc";
#ifdef CONFIG_PCI
@@ -526,10 +523,10 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
u32 efuse = __raw_readl(sysc + SYSC_REG_EFUSE_CFG);
if (efuse & EFUSE_MT7688) {
- mt762x_soc = MT762X_SOC_MT7688;
+ ralink_soc = MT762X_SOC_MT7688;
name = "MT7688";
} else {
- mt762x_soc = MT762X_SOC_MT7628AN;
+ ralink_soc = MT762X_SOC_MT7628AN;
name = "MT7628AN";
}
soc_info->compatible = "ralink,mt7628an-soc";