mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
mips: ralink: mt7621: define MT7621_SYSC_BASE with __iomem
[ Upstream commita2cab953b4
] So that MT7621_SYSC_BASE can be used later in multiple functions without needing to repeat this __iomem declaration each time Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Stable-dep-of:7c18b64bba
("mips: ralink: mt7621: do not use kzalloc too early") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
49d271df99
commit
792fee08ca
2 changed files with 6 additions and 5 deletions
|
@ -7,10 +7,12 @@
|
||||||
#ifndef _MT7621_REGS_H_
|
#ifndef _MT7621_REGS_H_
|
||||||
#define _MT7621_REGS_H_
|
#define _MT7621_REGS_H_
|
||||||
|
|
||||||
|
#define IOMEM(x) ((void __iomem *)(KSEG1ADDR(x)))
|
||||||
|
|
||||||
#define MT7621_PALMBUS_BASE 0x1C000000
|
#define MT7621_PALMBUS_BASE 0x1C000000
|
||||||
#define MT7621_PALMBUS_SIZE 0x03FFFFFF
|
#define MT7621_PALMBUS_SIZE 0x03FFFFFF
|
||||||
|
|
||||||
#define MT7621_SYSC_BASE 0x1E000000
|
#define MT7621_SYSC_BASE IOMEM(0x1E000000)
|
||||||
|
|
||||||
#define SYSC_REG_CHIP_NAME0 0x00
|
#define SYSC_REG_CHIP_NAME0 0x00
|
||||||
#define SYSC_REG_CHIP_NAME1 0x04
|
#define SYSC_REG_CHIP_NAME1 0x04
|
||||||
|
|
|
@ -95,7 +95,6 @@ static void soc_dev_init(struct ralink_soc_info *soc_info, u32 rev)
|
||||||
|
|
||||||
void __init prom_soc_init(struct ralink_soc_info *soc_info)
|
void __init prom_soc_init(struct ralink_soc_info *soc_info)
|
||||||
{
|
{
|
||||||
void __iomem *sysc = (void __iomem *) KSEG1ADDR(MT7621_SYSC_BASE);
|
|
||||||
unsigned char *name = NULL;
|
unsigned char *name = NULL;
|
||||||
u32 n0;
|
u32 n0;
|
||||||
u32 n1;
|
u32 n1;
|
||||||
|
@ -123,8 +122,8 @@ void __init prom_soc_init(struct ralink_soc_info *soc_info)
|
||||||
__sync();
|
__sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
n0 = __raw_readl(sysc + SYSC_REG_CHIP_NAME0);
|
n0 = __raw_readl(MT7621_SYSC_BASE + SYSC_REG_CHIP_NAME0);
|
||||||
n1 = __raw_readl(sysc + SYSC_REG_CHIP_NAME1);
|
n1 = __raw_readl(MT7621_SYSC_BASE + SYSC_REG_CHIP_NAME1);
|
||||||
|
|
||||||
if (n0 == MT7621_CHIP_NAME0 && n1 == MT7621_CHIP_NAME1) {
|
if (n0 == MT7621_CHIP_NAME0 && n1 == MT7621_CHIP_NAME1) {
|
||||||
name = "MT7621";
|
name = "MT7621";
|
||||||
|
@ -133,7 +132,7 @@ void __init prom_soc_init(struct ralink_soc_info *soc_info)
|
||||||
panic("mt7621: unknown SoC, n0:%08x n1:%08x\n", n0, n1);
|
panic("mt7621: unknown SoC, n0:%08x n1:%08x\n", n0, n1);
|
||||||
}
|
}
|
||||||
ralink_soc = MT762X_SOC_MT7621AT;
|
ralink_soc = MT762X_SOC_MT7621AT;
|
||||||
rev = __raw_readl(sysc + SYSC_REG_CHIP_REV);
|
rev = __raw_readl(MT7621_SYSC_BASE + SYSC_REG_CHIP_REV);
|
||||||
|
|
||||||
snprintf(soc_info->sys_type, RAMIPS_SYS_TYPE_LEN,
|
snprintf(soc_info->sys_type, RAMIPS_SYS_TYPE_LEN,
|
||||||
"MediaTek %s ver:%u eco:%u",
|
"MediaTek %s ver:%u eco:%u",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue