Hi Bin, -----"Bin Meng" <bmeng...@gmail.com> schrieb: ----- >Betreff: [PATCH v2] 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. Ideally if any PCI bus based ns16550 >wrapper driver tries to access plat->base before calling probe(), >it is subject to break. > >Fixes: 720f9e1fdb0c9 ("serial: ns16550: Move PCI access from >ofdata_to_platdata() to probe()") >Reported-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> >Signed-off-by: Bin Meng <bmeng...@gmail.com> >Tested-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> >Reviewed-by: Wolfgang Wallner <wolfgang.wall...@br-automation.com> >Tested-by: Wolfgang Wallner <wolfgang.wall...@br-automation.com> > >--- > >Changes in v2: >- not to break Fixes, etc to two or more lines in the commit message >- add the same CONFIG_SYS_NS16550_PORT_MAPPED ifdefs in the PCI case > > drivers/serial/ns16550.c | 53 >++++++++++++++++++++++++------------------------ > 1 file changed, 27 insertions(+), 26 deletions(-)
I have also tested v2, just to be sure. Works as expected. regards, Wolfgang