summaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files/arch/mips/ralink/rt3883
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-03-11 19:05:53 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-03-11 19:05:53 +0000
commit9fb8ca891c66f6f2eff5d3003c9ca3b306fb062a (patch)
tree118e6872dc0a7554fe29faba0ebfd5c06d9a2f58 /target/linux/ramips/files/arch/mips/ralink/rt3883
parent86b5f9e15f37d932d9bba3b7ef81ade0085c40dd (diff)
ramips: introduce ramips_soc_prom_init and move SoC detection into that
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30887 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/files/arch/mips/ralink/rt3883')
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt3883/rt3883.c9
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt3883/setup.c1
2 files changed, 5 insertions, 5 deletions
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt3883/rt3883.c b/target/linux/ramips/files/arch/mips/ralink/rt3883/rt3883.c
index 6e75b390f..8f5994892 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt3883/rt3883.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt3883/rt3883.c
@@ -22,15 +22,16 @@
void __iomem * rt3883_sysc_base;
void __iomem * rt3883_memc_base;
-void __init rt3883_detect_sys_type(void)
+void __init ramips_soc_prom_init(void)
{
+ void __iomem *sysc = (void __iomem *) KSEG1ADDR(RT3883_SYSC_BASE);
u32 n0;
u32 n1;
u32 id;
- n0 = rt3883_sysc_rr(RT3883_SYSC_REG_CHIPID0_3);
- n1 = rt3883_sysc_rr(RT3883_SYSC_REG_CHIPID4_7);
- id = rt3883_sysc_rr(RT3883_SYSC_REG_REVID);
+ n0 = __raw_readl(sysc + RT3883_SYSC_REG_CHIPID0_3);
+ n1 = __raw_readl(sysc + RT3883_SYSC_REG_CHIPID4_7);
+ id = __raw_readl(sysc + RT3883_SYSC_REG_REVID);
snprintf(ramips_sys_type, RAMIPS_SYS_TYPE_LEN,
"Ralink %c%c%c%c%c%c%c%c ver:%u eco:%u",
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt3883/setup.c b/target/linux/ramips/files/arch/mips/ralink/rt3883/setup.c
index f4c7296fa..6e037a729 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt3883/setup.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt3883/setup.c
@@ -52,7 +52,6 @@ void __init ramips_soc_setup(void)
rt3883_sysc_base = ioremap_nocache(RT3883_SYSC_BASE, PAGE_SIZE);
rt3883_memc_base = ioremap_nocache(RT3883_MEMC_BASE, PAGE_SIZE);
- rt3883_detect_sys_type();
rt3883_clocks_init();
clk = clk_get(NULL, "cpu");