aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-09-06 04:07:27 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-09-16 19:25:42 -0400
commit2c88543b953581f70f05bf133a1b8f196c48ef23 (patch)
tree26a2499bbaec3a409df2653a1115572fc44ba6bf /arch/arm/mach-integrator
parent9bf26a180578b92890ed77890d4e9e9807adcda3 (diff)
ARM: 7515/1: integrator: check PL010 base address from resource
In the PL010 UART callback a comparison against the location of the statically allocated PL010 device is done to figure out which UART is doing the callback. This does not play well with dynamic devices such as in device tree, so let's check the base address of the memory resource inside the amba_device instead. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r--arch/arm/mach-integrator/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index 5ba4bc8c0aa3..268eadf6d3e6 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -99,11 +99,14 @@ int __init integrator_init(bool is_cp)
99static void integrator_uart_set_mctrl(struct amba_device *dev, void __iomem *base, unsigned int mctrl) 99static void integrator_uart_set_mctrl(struct amba_device *dev, void __iomem *base, unsigned int mctrl)
100{ 100{
101 unsigned int ctrls = 0, ctrlc = 0, rts_mask, dtr_mask; 101 unsigned int ctrls = 0, ctrlc = 0, rts_mask, dtr_mask;
102 u32 phybase = dev->res.start;
102 103
103 if (dev == &uart0_device) { 104 if (phybase == INTEGRATOR_UART0_BASE) {
105 /* UART0 */
104 rts_mask = 1 << 4; 106 rts_mask = 1 << 4;
105 dtr_mask = 1 << 5; 107 dtr_mask = 1 << 5;
106 } else { 108 } else {
109 /* UART1 */
107 rts_mask = 1 << 6; 110 rts_mask = 1 << 6;
108 dtr_mask = 1 << 7; 111 dtr_mask = 1 << 7;
109 } 112 }