1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-29 22:41:17 +02:00

dm: core: Use separate priv/plat data region

Make use of the new priv/plat data region if enabled. This is implemented
as a simple offset from the position set up by dtoc to the new position.

So long as all access goes through dm_priv_to_rw() this is safe.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2021-03-15 17:25:40 +13:00
parent d5cc19288e
commit cfb9c9b77c
3 changed files with 24 additions and 6 deletions

View File

@@ -49,3 +49,12 @@ void dm_dump_driver_compat(void);
void dm_dump_static_driver_info(void);
#endif
#if CONFIG_IS_ENABLED(OF_PLATDATA_INST) && CONFIG_IS_ENABLED(READ_ONLY)
void *dm_priv_to_rw(void *priv);
#else
static inline void *dm_priv_to_rw(void *priv)
{
return priv;
}
#endif