diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-03-11 19:05:53 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-03-11 19:05:53 +0000 |
commit | ef72092022bd4d893ec52b662fd809f045933c67 (patch) | |
tree | 118e6872dc0a7554fe29faba0ebfd5c06d9a2f58 /target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c | |
parent | c1db1347f6f1b0dd17a89722fe5b82b66dbeb8e7 (diff) | |
download | upstream-ef72092022bd4d893ec52b662fd809f045933c67.tar.gz upstream-ef72092022bd4d893ec52b662fd809f045933c67.tar.bz2 upstream-ef72092022bd4d893ec52b662fd809f045933c67.zip |
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/rt288x/rt288x.c')
-rw-r--r-- | target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c | 9 |
1 files changed, 5 insertions, 4 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", |