Skip to content

Commit 0fa1f06

Browse files
lunnolofj
authored andcommitted
ARM: Orion: Fix Virtual/Physical mixup with watchdog
The orion watchdog is expecting to be passed the physcial address of the hardware, and will ioremap() it to give a virtual address it will use as the base address for the hardware. However, when creating the platform resource record, a virtual address was being used. Add the necassary #define's so we can pass the physical address as expected. Tested on Kirkwood and Orion5x. Cc: stable <[email protected]> Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
1 parent 5fb2ce1 commit 0fa1f06

File tree

5 files changed

+5
-2
lines changed

5 files changed

+5
-2
lines changed

arch/arm/mach-kirkwood/include/mach/bridge-regs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#define IRQ_MASK_HIGH_OFF 0x0014
3939

4040
#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
41+
#define TIMER_PHYS_BASE (BRIDGE_PHYS_BASE | 0x0300)
4142

4243
#define L2_CONFIG_REG (BRIDGE_VIRT_BASE | 0x0128)
4344
#define L2_WRITETHROUGH 0x00000010

arch/arm/mach-kirkwood/include/mach/kirkwood.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
8181

8282
#define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000)
83+
#define BRIDGE_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x20000)
8384

8485
#define CRYPTO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x30000)
8586

arch/arm/mach-orion5x/include/mach/bridge-regs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@
3535
#define MAIN_IRQ_MASK (ORION5X_BRIDGE_VIRT_BASE | 0x204)
3636

3737
#define TIMER_VIRT_BASE (ORION5X_BRIDGE_VIRT_BASE | 0x300)
38-
38+
#define TIMER_PHYS_BASE (ORION5X_BRIDGE_PHYS_BASE | 0x300)
3939
#endif

arch/arm/mach-orion5x/include/mach/orion5x.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
#define UART1_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2100)
8383

8484
#define ORION5X_BRIDGE_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x20000)
85+
#define ORION5X_BRIDGE_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x20000)
8586

8687
#define ORION5X_PCI_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x30000)
8788

arch/arm/plat-orion/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ void __init orion_spi_1_init(unsigned long mapbase)
582582
* Watchdog
583583
****************************************************************************/
584584
static struct resource orion_wdt_resource =
585-
DEFINE_RES_MEM(TIMER_VIRT_BASE, 0x28);
585+
DEFINE_RES_MEM(TIMER_PHYS_BASE, 0x28);
586586

587587
static struct platform_device orion_wdt_device = {
588588
.name = "orion_wdt",

0 commit comments

Comments
 (0)