[U-Boot] [PATCH v5 4/8] x86: slimbootloader: Add serial driver
Andy Shevchenko
andy.shevchenko at gmail.com
Mon Jul 22 15:37:46 UTC 2019
On Wed, Jul 17, 2019 at 7:41 AM Park, Aiden <aiden.park at intel.com> wrote:
>
> Slim Bootloader provides serial port info thru its HOB list pointer.
> All these HOBs are eligible for Slim Bootloader based board only.
> - Get serial port information from the serial port info hob
> - Leverage ns16550 driver with slimbootloader specific platform data
> + /*
> + * The serial_info->type provides port io or mmio access type info,
> + * but the access type will be controlled by
> + * CONFIG_SYS_NS16550_PORT_MAPPED or CONFIG_SYS_NS16550_MEM32.
> + *
> + * TBD: ns16550 access type configuration in runtime.
> + * ex) plat->access_type = serial_info->type
> + */
io -> IO
mmio -> MMIO
> + plat->base = serial_info->base;
> + /* ns16550 uses reg_shift, then covert stride to shift */
> + plat->reg_shift = (serial_info->stride >> 1);
Too many parenthesis.
> + plat->clock = serial_info->clk;
> +
> + return 0;
> +}
> +/**
> + * A GUID to get SerialPort info hob which is provided by Slim Bootloader
> + */
> +#define LOADER_SERIAL_PORT_INFO_GUID \
> + { \
> + 0x6c6872fe, 0x56a9, 0x4403, \
> + { 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } \
> + }
EFI_GUID()
> +struct serial_port_info {
serial is not this platform namespace, choose more particular one, please.
> + u8 rev;
> + u8 rsvd[3];
> + u32 type;
> + u32 base;
> + u32 baud;
> + u32 stride;
> + u32 clk;
> + u32 rsvd1;
> +} __packed;
Does __packed service for anything here?
--
With Best Regards,
Andy Shevchenko
More information about the U-Boot
mailing list