Message ID | 20200227152156.87385-2-andriy.shevchenko@linux.intel.com |
---|---|
State | Accepted |
Commit | 5db92a0e960ea0559e82f8c3e2ec7f80a4e86c51 |
Headers | show |
Series | [v1,1/3] dm: serial: Add clock member to struct serial_device_info | expand |
On Thu, 27 Feb 2020 at 07:22, Andy Shevchenko <andriy.shevchenko at linux.intel.com> wrote: > > Some callers may need the UART base clock speed value. > Provide it in the ->getinfo() callback. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com> > --- > drivers/serial/ns16550.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Simon Glass <sjg at chromium.org> > > diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c > index 1fcbc35015..386b5e04c8 100644 > --- a/drivers/serial/ns16550.c > +++ b/drivers/serial/ns16550.c > @@ -476,6 +476,7 @@ static int ns16550_serial_getinfo(struct udevice *dev, > info->reg_width = plat->reg_width; > info->reg_shift = plat->reg_shift; > info->reg_offset = plat->reg_offset; > + info->clock = plat->clock; blank line before return > return 0; > } > > -- > 2.25.0 >
On Fri, Feb 28, 2020 at 7:41 AM Simon Glass <sjg at chromium.org> wrote: > > On Thu, 27 Feb 2020 at 07:22, Andy Shevchenko > <andriy.shevchenko at linux.intel.com> wrote: > > > > Some callers may need the UART base clock speed value. > > Provide it in the ->getinfo() callback. > > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com> > > --- > > drivers/serial/ns16550.c | 1 + > > 1 file changed, 1 insertion(+) > > Reviewed-by: Simon Glass <sjg at chromium.org> > > > > > diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c > > index 1fcbc35015..386b5e04c8 100644 > > --- a/drivers/serial/ns16550.c > > +++ b/drivers/serial/ns16550.c > > @@ -476,6 +476,7 @@ static int ns16550_serial_getinfo(struct udevice *dev, > > info->reg_width = plat->reg_width; > > info->reg_shift = plat->reg_shift; > > info->reg_offset = plat->reg_offset; > > + info->clock = plat->clock; > > blank line before return I can fix this when applying. > > > return 0; > > } Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
On Wed, Apr 15, 2020 at 10:19 PM Bin Meng <bmeng.cn at gmail.com> wrote: > > On Fri, Feb 28, 2020 at 7:41 AM Simon Glass <sjg at chromium.org> wrote: > > > > On Thu, 27 Feb 2020 at 07:22, Andy Shevchenko > > <andriy.shevchenko at linux.intel.com> wrote: > > > > > > Some callers may need the UART base clock speed value. > > > Provide it in the ->getinfo() callback. > > > > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com> > > > --- > > > drivers/serial/ns16550.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > Reviewed-by: Simon Glass <sjg at chromium.org> > > > > > > > > diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c > > > index 1fcbc35015..386b5e04c8 100644 > > > --- a/drivers/serial/ns16550.c > > > +++ b/drivers/serial/ns16550.c > > > @@ -476,6 +476,7 @@ static int ns16550_serial_getinfo(struct udevice *dev, > > > info->reg_width = plat->reg_width; > > > info->reg_shift = plat->reg_shift; > > > info->reg_offset = plat->reg_offset; > > > + info->clock = plat->clock; > > > > blank line before return > > I can fix this when applying. > > > > > > return 0; > > > } > > Reviewed-by: Bin Meng <bmeng.cn at gmail.com> applied to u-boot-x86, thanks!
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 1fcbc35015..386b5e04c8 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -476,6 +476,7 @@ static int ns16550_serial_getinfo(struct udevice *dev, info->reg_width = plat->reg_width; info->reg_shift = plat->reg_shift; info->reg_offset = plat->reg_offset; + info->clock = plat->clock; return 0; }
Some callers may need the UART base clock speed value. Provide it in the ->getinfo() callback. Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com> --- drivers/serial/ns16550.c | 1 + 1 file changed, 1 insertion(+)