X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=include%2Fdm%2Fplatdata.h;h=488b2ab0aea446f524b7edede8cc7ee583b920b5;hb=b66c60dde9d48889b93694326d40f7e5208cff25;hp=fbc8a6b3adda18424bd485a0ea39df981143f55e;hpb=21109577635a871d038cfd53dd75e264d0e636bf;p=u-boot diff --git a/include/dm/platdata.h b/include/dm/platdata.h index fbc8a6b3ad..488b2ab0ae 100644 --- a/include/dm/platdata.h +++ b/include/dm/platdata.h @@ -16,14 +16,28 @@ /** * struct driver_info - Information required to instantiate a device * + * NOTE: Avoid using this except in extreme circumstances, where device tree + * is not feasible (e.g. serial driver in SPL where <8KB of SRAM is + * available). U-Boot's driver model uses device tree for configuration. + * * @name: Driver name * @platdata: Driver-specific platform data + * @platdata_size: Size of platform data structure + * @flags: Platform data flags (DM_FLAG_...) */ struct driver_info { const char *name; const void *platdata; +#if CONFIG_IS_ENABLED(OF_PLATDATA) + uint platdata_size; +#endif }; +/** + * NOTE: Avoid using these except in extreme circumstances, where device tree + * is not feasible (e.g. serial driver in SPL where <8KB of SRAM is + * available). U-Boot's driver model uses device tree for configuration. + */ #define U_BOOT_DEVICE(__name) \ ll_entry_declare(struct driver_info, __name, driver_info)