Commit 9e6ce621 authored by Bin Meng's avatar Bin Meng

serial: ns16550: Fix ordering of getting base address

Currently the driver gets ns16550 base address in the driver
probe() routine, which may potentially break any ns16550 wrapper
driver that does additional initialization before calling
ns16550_serial_probe().

Things are complicated that we need consider ns16550 devices on
both simple-bus and PCI bus. To fix the issue we move the base
address assignment for simple-bus ns16550 device back to the
ofdata_to_platdata(), and assign base address for PCI ns16550
device in ns16550_serial_probe().

This is still not perfect. If any PCI bus based ns16550 wrapper
driver tries to access plat->base before calling probe(), it is
still subject to break.

Fixes: 720f9e1f ("serial: ns16550: Move PCI access from ofdata_to_platdata() to probe()")
Reported-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
Tested-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarWolfgang Wallner <wolfgang.wallner@br-automation.com>
Tested-by: default avatarWolfgang Wallner <wolfgang.wallner@br-automation.com>
parent 4d073fa8
Pipeline #2611 failed with stages
in 78 minutes and 17 seconds