summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-03-15 07:25:41 +0300
committerSimon Glass <sjg@chromium.org>2021-03-26 07:03:09 +0300
commite81bf6d72fbd016027d856f6da6047d39903390b (patch)
treedd0b10d68ea607c147f2cfff39833c498fe7267a /include
parentcfb9c9b77c29f48ae2c71ff30ca294bdaf369d87 (diff)
downloadu-boot-e81bf6d72fbd016027d856f6da6047d39903390b.tar.xz
dm: core: Add warnings to private / platform setters
Add a warning to each of these functions so that people do not attempt to use them outside driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/dm/device-internal.h18
-rw-r--r--include/dm/uclass-internal.h3
2 files changed, 21 insertions, 0 deletions
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index 71e5c75028..e6b71cbfd2 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -284,6 +284,9 @@ static inline int device_chld_remove(struct udevice *dev, struct driver *drv,
* Use this function to override normal operation for special situations, such
* as needing to allocate a variable amount of data.
*
+ * If OF_PLATDATA_RT is enabled, this function cannot be used out of core driver
+ * model code, since the pointer must be within the gd->dm_priv_base region.
+ *
* @dev Device to check
* @priv New private-data pointer
*/
@@ -298,6 +301,9 @@ void dev_set_priv(struct udevice *dev, void *priv);
* Use this function to override normal operation for special situations, such
* as needing to allocate a variable amount of data.
*
+ * If OF_PLATDATA_RT is enabled, this function cannot be used out of core driver
+ * model code, since the pointer must be within the gd->dm_priv_base region.
+ *
* @dev: Device to update
* @parent_priv: New parent-private data
*/
@@ -312,6 +318,9 @@ void dev_set_parent_priv(struct udevice *dev, void *parent_priv);
* Use this function to override normal operation for special situations, such
* as needing to allocate a variable amount of data.
*
+ * If OF_PLATDATA_RT is enabled, this function cannot be used out of core driver
+ * model code, since the pointer must be within the gd->dm_priv_base region.
+ *
* @dev: Device to update
* @uclass_priv: New uclass private data
*/
@@ -326,6 +335,9 @@ void dev_set_uclass_priv(struct udevice *dev, void *uclass_priv);
* Use this function to override normal operation for special situations, such
* as needing to allocate a variable amount of data.
*
+ * If OF_PLATDATA_RT is enabled, this function cannot be used out of core driver
+ * model code, since the pointer must be within the gd->dm_priv_base region.
+ *
* @dev Device to check
* @plat New platform-data pointer
*/
@@ -340,6 +352,9 @@ void dev_set_plat(struct udevice *dev, void *priv);
* Use this function to override normal operation for special situations, such
* as needing to allocate a variable amount of data.
*
+ * If OF_PLATDATA_RT is enabled, this function cannot be used out of core driver
+ * model code, since the pointer must be within the gd->dm_priv_base region.
+ *
* @dev: Device to update
* @parent_plat: New parent platform data
*/
@@ -354,6 +369,9 @@ void dev_set_parent_plat(struct udevice *dev, void *parent_plat);
* Use this function to override normal operation for special situations, such
* as needing to allocate a variable amount of data.
*
+ * If OF_PLATDATA_RT is enabled, this function cannot be used out of core driver
+ * model code, since the pointer must be within the gd->dm_priv_base region.
+ *
* @dev: Device to update
* @uclass_plat: New uclass platform data
*/
diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h
index f2a780682b..57c664c6da 100644
--- a/include/dm/uclass-internal.h
+++ b/include/dm/uclass-internal.h
@@ -69,6 +69,9 @@
* Use this function to override normal operation for special situations, such
* as needing to allocate a variable amount of data.
*
+ * If OF_PLATDATA_RT is enabled, this function cannot be used out of core driver
+ * model code, since the pointer must be within the gd->dm_priv_base region.
+ *
* @uc Uclass to update
* @priv New private-data pointer
*/