提交 2c88543b 编写于 作者: L Linus Walleij 提交者: Russell King

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: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 9bf26a18
...@@ -99,11 +99,14 @@ int __init integrator_init(bool is_cp) ...@@ -99,11 +99,14 @@ int __init integrator_init(bool is_cp)
static void integrator_uart_set_mctrl(struct amba_device *dev, void __iomem *base, unsigned int mctrl) static void integrator_uart_set_mctrl(struct amba_device *dev, void __iomem *base, unsigned int mctrl)
{ {
unsigned int ctrls = 0, ctrlc = 0, rts_mask, dtr_mask; unsigned int ctrls = 0, ctrlc = 0, rts_mask, dtr_mask;
u32 phybase = dev->res.start;
if (dev == &uart0_device) { if (phybase == INTEGRATOR_UART0_BASE) {
/* UART0 */
rts_mask = 1 << 4; rts_mask = 1 << 4;
dtr_mask = 1 << 5; dtr_mask = 1 << 5;
} else { } else {
/* UART1 */
rts_mask = 1 << 6; rts_mask = 1 << 6;
dtr_mask = 1 << 7; dtr_mask = 1 << 7;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册