[U-Boot] [PATCH 12/14] dm: omap: serial: Add driver model support

Masahiro Yamada yamada.m at jp.panasonic.com
Wed Oct 22 11:47:22 CEST 2014


Hi Simon,

One minor comment from me.



On Mon, 22 Sep 2014 09:48:52 -0600
Simon Glass <sjg at chromium.org> wrote:
> +
> +U_BOOT_DRIVER(serial_omap_ns16550) = {
> +	.name	= "serial_omap",
> +	.id	= UCLASS_SERIAL,
> +#ifdef CONFIG_OF_CONTROL
> +	.of_match = omap_serial_ids,
> +	.ofdata_to_platdata = omap_serial_ofdata_to_platdata,
> +#endif
> +	.platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
> +	.priv_auto_alloc_size = sizeof(struct NS16550),
> +	.probe = ns16550_serial_probe,
> +	.ops	= &ns16550_serial_ops,
> +	.flags	= DM_FLAG_PRE_RELOC,
> +};


U_BOOT_DRIVER(serial_omap_ns16550) = {
	.name	= "serial_omap",
	.id	= UCLASS_SERIAL,
	.of_match = of_match_ptr(omap_serial_ids),
	.ofdata_to_platdata = of_match_ptr(omap_serial_ofdata_to_platdata),
	.platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
	.priv_auto_alloc_size = sizeof(struct NS16550),
	.probe = ns16550_serial_probe,
	.ops	= &ns16550_serial_ops,
	.flags	= DM_FLAG_PRE_RELOC,
};


is cleaner
though you need to apply the following first:
http://patchwork.ozlabs.org/patch/397088/


Best Regards
Masahiro Yamada



More information about the U-Boot mailing list