1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

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
This commit is contained in:
juhosg
2012-03-11 19:05:53 +00:00
parent 86b5f9e15f
commit 9fb8ca891c
11 changed files with 18 additions and 21 deletions

View File

@@ -23,15 +23,16 @@
void __iomem * rt305x_sysc_base;
void __iomem * rt305x_memc_base;
void __init rt305x_detect_sys_type(void)
void __init ramips_soc_prom_init(void)
{
void __iomem *sysc = (void __iomem *) KSEG1ADDR(RT305X_SYSC_BASE);
u32 n0;
u32 n1;
u32 id;
n0 = rt305x_sysc_rr(SYSC_REG_CHIP_NAME0);
n1 = rt305x_sysc_rr(SYSC_REG_CHIP_NAME1);
id = rt305x_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",