aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files/arch/mips/ralink/rt288x
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-03-11 19:05:53 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-03-11 19:05:53 +0000
commit8cff770eb35ddb48e62cf95e83c8f1777c8db56a (patch)
treeecc826a5693467641fe73c9eac6c6d6551ddb874 /target/linux/ramips/files/arch/mips/ralink/rt288x
parent2149facb537a6f4a58dd773004d47ea2712544ac (diff)
downloadupstream-8cff770eb35ddb48e62cf95e83c8f1777c8db56a.tar.gz
upstream-8cff770eb35ddb48e62cf95e83c8f1777c8db56a.tar.bz2
upstream-8cff770eb35ddb48e62cf95e83c8f1777c8db56a.zip
ramips: introduce ramips_soc_prom_init and move SoC detection into that
SVN-Revision: 30887
Diffstat (limited to 'target/linux/ramips/files/arch/mips/ralink/rt288x')
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c9
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt288x/setup.c1
2 files changed, 5 insertions, 5 deletions
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c b/target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c
index 53b1a69114..633e83d8c0 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c
@@ -23,15 +23,16 @@
void __iomem * rt288x_sysc_base;
void __iomem * rt288x_memc_base;
-void __init rt288x_detect_sys_type(void)
+void __init ramips_soc_prom_init(void)
{
+ void __iomem *sysc = (void __iomem *) KSEG1ADDR(RT2880_SYSC_BASE);
u32 n0;
u32 n1;
u32 id;
- n0 = rt288x_sysc_rr(SYSC_REG_CHIP_NAME0);
- n1 = rt288x_sysc_rr(SYSC_REG_CHIP_NAME1);
- id = rt288x_sysc_rr(SYSC_REG_CHIP_ID);
+ n0 = __raw_readl(sysc + SYSC_REG_CHIP_NAME0);
+ n1 = __raw_readl(sysc + SYSC_REG_CHIP_NAME1);
+ id = __raw_readl(sysc + SYSC_REG_CHIP_ID);
snprintf(ramips_sys_type, RAMIPS_SYS_TYPE_LEN,
"Ralink %c%c%c%c%c%c%c%c id:%u rev:%u",
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt288x/setup.c b/target/linux/ramips/files/arch/mips/ralink/rt288x/setup.c
index 65e187d3ac..be474b5292 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt288x/setup.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt288x/setup.c
@@ -52,7 +52,6 @@ void __init ramips_soc_setup(void)
rt288x_sysc_base = ioremap_nocache(RT2880_SYSC_BASE, RT2880_SYSC_SIZE);
rt288x_memc_base = ioremap_nocache(RT2880_MEMC_BASE, RT2880_MEMC_SIZE);
- rt288x_detect_sys_type();
rt288x_clocks_init();
clk = clk_get(NULL, "cpu");