[U-Boot] [PATCH v2 3/3] common: Generic loader for file system

Marek Vasut marex at denx.de
Wed Jun 6 08:39:10 UTC 2018


On 05/24/2018 07:04 AM, tien.fong.chee at intel.com wrote:
> From: Tien Fong Chee <tien.fong.chee at intel.com>
> 
> This is file system generic loader which can be used to load
> the file image from the storage into target such as memory.
> The consumer driver would then use this loader to program whatever,
> ie. the FPGA device.
> 
> Signed-off-by: Tien Fong Chee <tien.fong.chee at intel.com>
> ---
[...]
> +static int fs_loader_probe(struct udevice *dev)
> +{
> +	return 0;
> +};
> +
> +static const struct udevice_id fs_loader_ids[] = {
> +	{ .compatible = "fs_loader"},

Why exactly is there a DT compatible for a firmware loader?

> +	{ }
> +};
> +
> +U_BOOT_DRIVER(fs_loader) = {
> +	.name			= "fs_loader",
> +	.id			= UCLASS_FS_FIRMWARE_LOADER,
> +	.of_match		= fs_loader_ids,
> +	.probe			= fs_loader_probe,
> +	.ofdata_to_platdata	= fs_loader_ofdata_to_platdata,
> +	.platdata_auto_alloc_size	= sizeof(struct device_platdata),
> +};
> +
> +UCLASS_DRIVER(fs_loader) = {
> +	.id		= UCLASS_FS_FIRMWARE_LOADER,
> +	.name		= "fs_loader",
> +};

[...]
-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list