[U-Boot] [PATCH v2 1/5] serial: Introduce ->getinfo() callback
    Andy Shevchenko 
    andriy.shevchenko at linux.intel.com
       
    Tue Nov 20 18:32:06 UTC 2018
    
    
  
On Thu, Nov 15, 2018 at 11:45:32AM -0800, Simon Glass wrote:
> On 15 November 2018 at 09:58, Andy Shevchenko
> <andriy.shevchenko at linux.intel.com> wrote:
> > +/* REVISIT: ACPI GAS specification implied */
> > +struct serial_device_info {
> > +       unsigned int baudrate;
> > +       u8      addr_space;     /* 0 - MMIO, 1 - IO */
> 
> Please make this an enum
OK.
> 
> > +       u8      reg_width;
> > +       u8      reg_offset;
> > +       u8      reg_shift;
> > +       u64     addr;
> 
> ulong
This, unfortunately, will not work. ACPI takes the address as 32-bit halves,
and shift to 32 on 32-bit platform is UB.
> Needs a struct comment as I don't know what most of these do.
OK.
> What about parity, number of bits, etc?
As discussed before, it will be filled thru getconfig().
Though, I would add necessary members explicitly.
-- 
With Best Regards,
Andy Shevchenko
    
    
More information about the U-Boot
mailing list