From: Andy Shevchenko Date: Thu, 15 Nov 2018 18:03:37 +0200 Subject: [U-Boot] [PATCH v1 1/2] WIP: serial: Introduce ->getinfo() callback In-Reply-To: References: <20180922130505.77474-1-andriy.shevchenko@linux.intel.com> <20180922130505.77474-2-andriy.shevchenko@linux.intel.com> Message-ID: <20181115160337.GT10650@smile.fi.intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Sep 25, 2018 at 10:24:42AM +0800, Bin Meng wrote: > On Sat, Sep 22, 2018 at 9:05 PM Andy Shevchenko > wrote: I found a bit of time to look at this again. > > +static int ns16550_serial_getinfo(struct udevice *dev, struct serial_device_info *info) > > +{ > > + struct NS16550 *const com_port = dev_get_priv(dev); > > + struct ns16550_platdata *plat = com_port->plat; > > + > > + info->addr_space = 0; > This one is tricky. Looks current 8250 DT binding does not have a > property to describe the address space to be MMIO or PIO. I am not > sure what's the best option here. For now I suggest to leave it hard coded to MMIO. > > + info->reg_width = 8; > For this one, I believe we can use "reg-io-width" property from device tree. I will try this path. > > + info->reg_shift = plat->reg_shift; > > + info->reg_offset = plat->reg_offset; > > + info->addr = plat->base; > > + return 0; > > +} > Generally this patch looks OK to me. Thanks! Still I have few amendments for the real submission of the series. > BTW: why doesn't the kernel use the 'earlycon' command line? Not all hardware supports it or supports it in a right way. -- With Best Regards, Andy Shevchenko