
Hi Andy/Bin,
-----Original Message----- From: Bin Meng [mailto:bmeng.cn@gmail.com] Sent: Wednesday, August 21, 2019 2:45 AM To: Andy Shevchenko andy.shevchenko@gmail.com Cc: Park, Aiden aiden.park@intel.com; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH 1/1] serial: ns16550: Read reg-io-type from device tree
On Wed, Aug 21, 2019 at 3:26 PM Andy Shevchenko andy.shevchenko@gmail.com wrote:
On Wed, Aug 21, 2019 at 3:43 AM Park, Aiden aiden.park@intel.com
wrote:
ns16550 can select register access type from device tree. This also allows an inherited serial driver of ns16550 to configure register access type at run-time by overriding ofdata_to_platdata.
Can you elaborate more on this?
For now it looks like a hack due to misunderstanding of the design.
Right, this is a just hack. As Bin said, we may need refactor whole codes. By the way, do we need to keep current design which selects I/O port or MMIO at compile time by defining CONFIG_SYS_NS16550_PORT_MAPPED or CONFIG_SYS_NS16550_MEM32?
The reg-io-type is not a standard DTS property for 8250 (Documentation/devicetree/bindings/serial/8250.txt) so I guess we may need refactor the ns16550 codes to support both I/O port and memory- mapped variants.
Thanks for letting me know 8250.txt(doc/device-tree-bindings/serial/8250.txt). I agree that ns16550 codes may need refactor. Let me abandon this patch.
Regards, Bin
Best Regards, Aiden