rb532: do not KSEG1ADDR an already virtual address
PATCH 3/6 rb532: do not KSEG1ADDR an already virtual address
This patch removes the superfluous double KSEG1ADDR against the base register in the setup code.
---
arch/mips/rb532/setup.c +2 -1
@@ -10,6 +10,7 @@#include <linux/ioport.h> #include <asm/mach-rc32434/rc32434.h> +#include <asm/mach-rc32434/rb.h> #include <asm/mach-rc32434/pci.h> struct pci_reg __iomem *pci_reg;
@@ -27,7 +28,7 @@ static struct resource pci0_res[] = {static void rb_machine_restart (char *command) {/* just jump to the reset vector */ -writel (0x80000001 , (void *)KSEG1ADDR (RC32434_REG_BASE +RC32434_RST )); +writel (0x80000001 , (void *)KSEG1ADDR (REG_BASE +RC32434_RST )); ((void (*)(void ))KSEG1ADDR (0x1FC00000u ))(); }
Hello.
Quoted 18 lines · Florian Fainelli
This patch removes the superfluous double KSEG1ADDR against the base register in the setup code.
Signed-off-by Florian Fainelli <[email protected]>---
arch/mips/rb532/setup.c +1
-0@@ -10,6 +10,7 @@#include <linux/ioport.h> #include <asm/mach-rc32434/rc32434.h> +#include <asm/mach-rc32434/rb.h> #include <asm/mach-rc32434/pci.h> struct pci_reg __iomem *pci_reg;
arch/mips/rb532/setup.c static struct resource pci0_res[] = { · line 32
Quoted 6 lines
arch/mips/rb532/setup.c +1
-1@@ -27,7 +28,7 @@ static struct resource pci0_res[] = {static void rb_machine_restart (char *command) {/* just jump to the reset vector */ -writel (0x80000001 , (void *)KSEG1ADDR (RC32434_REG_BASE +RC32434_RST )); +writel (0x80000001 , (void *)KSEG1ADDR (REG_BASE +RC32434_RST ));
Why not just leave RC32434_REG_BASE + RC32434_RST and remove
KSEG1ADDR? BTW, the cast could be removed as well, since it's already a part of RC32434_REG_BASE...
WBR, Sergei
Hi Sergei,
Le Friday 22 August 2008 11:41:16 Sergei Shtylyov, vous avez écrit :
Quoted 3 lines
Why not just leave
RC32434_REG_BASE+RC32434_RSTand remove
KSEG1ADDR? BTW, the cast could be removed as well, since it's already a part ofRC32434_REG_BASE...
In fact,I need to cleanup other headers, so I will just drop this one for now.