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