From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Date: Tue, 20 Nov 2018 20:32:06 +0200 Subject: [U-Boot] [PATCH v2 1/5] serial: Introduce ->getinfo() callback In-Reply-To: References: <20181115175854.7550-1-andriy.shevchenko@linux.intel.com> <20181115175854.7550-2-andriy.shevchenko@linux.intel.com> Message-ID: <20181120183206.GE10650@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 Thu, Nov 15, 2018 at 11:45:32AM -0800, Simon Glass wrote: > On 15 November 2018 at 09:58, Andy Shevchenko > 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