MIPS: Alchemy: introduce helpers to access SYS register block.
This patch changes all absolute SYS_XY registers to offsets from the SYS block base, prefixes them with AU1000 to avoid silent failures due to changed addresses, and introduces helper functions to read/write them. No functional changes, comparing assembly of a few select functions shows no differences. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Cc: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/7464/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
2ef1bb9911
commit
1d09de7dc7
@@ -420,7 +420,7 @@ static void __init alchemy_setup_macs(int ctype)
|
||||
memcpy(au1xxx_eth1_platform_data.mac, ethaddr, 6);
|
||||
|
||||
/* Register second MAC if enabled in pinfunc */
|
||||
if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2)) {
|
||||
if (!(alchemy_rdsys(AU1000_SYS_PINFUNC) & SYS_PF_NI2)) {
|
||||
ret = platform_device_register(&au1xxx_eth1_device);
|
||||
if (ret)
|
||||
printk(KERN_INFO "Alchemy: failed to register MAC1\n");
|
||||
|
Reference in New Issue
Block a user