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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user