aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/ath79
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-11-17 19:17:46 -0500
committerRalf Baechle <ralf@linux-mips.org>2011-12-07 17:02:47 -0500
commitbe5f3623204e15cb8a95a6d381ae6eb074ba46b5 (patch)
tree52fb613a75ad0c563323de0ddcb646d595196d1b /arch/mips/ath79
parent2dc7b4a1977e3bd3b7c819c63cab1baf7d260d89 (diff)
MIPS: ath79: Store the SoC revision in a global variable
Knowing the exact revision of the SoC is required to make runtime decisions in various code paths. We have determined the SoC revision already, so we only need to store that in a global variable. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Imre Kaloz <kaloz@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3027/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ath79')
-rw-r--r--arch/mips/ath79/common.c1
-rw-r--r--arch/mips/ath79/setup.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c
index 38c2ad7bd871..f0fda982b965 100644
--- a/arch/mips/ath79/common.c
+++ b/arch/mips/ath79/common.c
@@ -30,6 +30,7 @@ u32 ath79_ddr_freq;
30EXPORT_SYMBOL_GPL(ath79_ddr_freq); 30EXPORT_SYMBOL_GPL(ath79_ddr_freq);
31 31
32enum ath79_soc_type ath79_soc; 32enum ath79_soc_type ath79_soc;
33unsigned int ath79_soc_rev;
33 34
34void __iomem *ath79_pll_base; 35void __iomem *ath79_pll_base;
35void __iomem *ath79_reset_base; 36void __iomem *ath79_reset_base;
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
index 4187a1122048..61bf3397251a 100644
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -149,6 +149,8 @@ static void __init ath79_detect_sys_type(void)
149 panic("ath79: unknown SoC, id:0x%08x\n", id); 149 panic("ath79: unknown SoC, id:0x%08x\n", id);
150 } 150 }
151 151
152 ath79_soc_rev = rev;
153
152 sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); 154 sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev);
153 pr_info("SoC: %s\n", ath79_sys_type); 155 pr_info("SoC: %s\n", ath79_sys_type);
154} 156}