diff mbox series

[U-Boot,v2,1/9] doc: fix: Replace SPL_OF_PLATDATA with OF_PLATDATA in examples

Message ID 20190818213603.28171-2-lukma@denx.de
State Superseded
Delegated to: Stefano Babic
Headers show
Series imx: mxs: Fixes and DM/DTS conversion code for several i.MX28 drivers | expand

Commit Message

Lukasz Majewski Aug. 18, 2019, 9:35 p.m. UTC
The of-plat.rst file till this change has been using
#if CONFIG_IS_ENABLED(SPL_OF_PLATDATA) it its examples.

This is at best misleading as SPL_OF_PLATDATA is always defined when we
want to use this SPL tinification feature (also in U-Boot proper).
As a result the OF_PLATDATA SPL specific code is also compiled in when
U-Boot proper is build.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

Changes in v2: None

 doc/driver-model/of-plat.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Peng Fan Aug. 19, 2019, 1:19 a.m. UTC | #1
> Subject: [PATCH v2 1/9] doc: fix: Replace SPL_OF_PLATDATA with
> OF_PLATDATA in examples
> 
> The of-plat.rst file till this change has been using #if
> CONFIG_IS_ENABLED(SPL_OF_PLATDATA) it its examples.
> 
> This is at best misleading as SPL_OF_PLATDATA is always defined when we
> want to use this SPL tinification feature (also in U-Boot proper).
> As a result the OF_PLATDATA SPL specific code is also compiled in when
> U-Boot proper is build.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
> 
> Changes in v2: None
> 
>  doc/driver-model/of-plat.rst | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/doc/driver-model/of-plat.rst b/doc/driver-model/of-plat.rst index
> 0d3cd8c01e..a38e58e4d2 100644
> --- a/doc/driver-model/of-plat.rst
> +++ b/doc/driver-model/of-plat.rst
> @@ -224,7 +224,7 @@ For example:
>      #include <dt-structs.h>
> 
>      struct mmc_platdata {
> -    #if CONFIG_IS_ENABLED(SPL_OF_PLATDATA)
> +    #if CONFIG_IS_ENABLED(OF_PLATDATA)
>              /* Put this first since driver model will copy the data here */
>              struct dtd_mmc dtplat;
>      #endif
> @@ -237,7 +237,7 @@ For example:
> 
>      static int mmc_ofdata_to_platdata(struct udevice *dev)
>      {
> -    #if !CONFIG_IS_ENABLED(SPL_OF_PLATDATA)
> +    #if !CONFIG_IS_ENABLED(OF_PLATDATA)
>              /* Decode the device tree data */
>              struct mmc_platdata *plat = dev_get_platdata(dev);
>              const void *blob = gd->fdt_blob; @@ -253,7 +253,7 @@ For
> example:
>      {
>              struct mmc_platdata *plat = dev_get_platdata(dev);
> 
> -    #if CONFIG_IS_ENABLED(SPL_OF_PLATDATA)
> +    #if CONFIG_IS_ENABLED(OF_PLATDATA)
>              /* Decode the of-platdata from the C structures */
>              struct dtd_mmc *dtplat = &plat->dtplat;
> 
> @@ -308,7 +308,7 @@ The dt-structs.h file includes the generated file
>  (include/generated//dt-structs.h) if CONFIG_SPL_OF_PLATDATA is enabled.
>  Otherwise (such as in U-Boot proper) these structs are not available. This
> prevents them being used inadvertently. All usage must be bracketed with -#if
> CONFIG_IS_ENABLED(SPL_OF_PLATDATA).
> +#if CONFIG_IS_ENABLED(OF_PLATDATA).
> 
>  The dt-platdata.c file contains the device declarations and is is built in
> spl/dt-platdata.c.

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> --
> 2.11.0
Simon Glass Sept. 17, 2019, 5:47 a.m. UTC | #2
On Sun, 18 Aug 2019 at 19:19, Peng Fan <peng.fan@nxp.com> wrote:
>
> > Subject: [PATCH v2 1/9] doc: fix: Replace SPL_OF_PLATDATA with
> > OF_PLATDATA in examples
> >
> > The of-plat.rst file till this change has been using #if
> > CONFIG_IS_ENABLED(SPL_OF_PLATDATA) it its examples.
> >
> > This is at best misleading as SPL_OF_PLATDATA is always defined when we
> > want to use this SPL tinification feature (also in U-Boot proper).
> > As a result the OF_PLATDATA SPL specific code is also compiled in when
> > U-Boot proper is build.
> >
> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > ---
> >
> > Changes in v2: None
> >
> >  doc/driver-model/of-plat.rst | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/doc/driver-model/of-plat.rst b/doc/driver-model/of-plat.rst
index 0d3cd8c01e..a38e58e4d2 100644
--- a/doc/driver-model/of-plat.rst
+++ b/doc/driver-model/of-plat.rst
@@ -224,7 +224,7 @@  For example:
     #include <dt-structs.h>
 
     struct mmc_platdata {
-    #if CONFIG_IS_ENABLED(SPL_OF_PLATDATA)
+    #if CONFIG_IS_ENABLED(OF_PLATDATA)
             /* Put this first since driver model will copy the data here */
             struct dtd_mmc dtplat;
     #endif
@@ -237,7 +237,7 @@  For example:
 
     static int mmc_ofdata_to_platdata(struct udevice *dev)
     {
-    #if !CONFIG_IS_ENABLED(SPL_OF_PLATDATA)
+    #if !CONFIG_IS_ENABLED(OF_PLATDATA)
             /* Decode the device tree data */
             struct mmc_platdata *plat = dev_get_platdata(dev);
             const void *blob = gd->fdt_blob;
@@ -253,7 +253,7 @@  For example:
     {
             struct mmc_platdata *plat = dev_get_platdata(dev);
 
-    #if CONFIG_IS_ENABLED(SPL_OF_PLATDATA)
+    #if CONFIG_IS_ENABLED(OF_PLATDATA)
             /* Decode the of-platdata from the C structures */
             struct dtd_mmc *dtplat = &plat->dtplat;
 
@@ -308,7 +308,7 @@  The dt-structs.h file includes the generated file
 (include/generated//dt-structs.h) if CONFIG_SPL_OF_PLATDATA is enabled.
 Otherwise (such as in U-Boot proper) these structs are not available. This
 prevents them being used inadvertently. All usage must be bracketed with
-#if CONFIG_IS_ENABLED(SPL_OF_PLATDATA).
+#if CONFIG_IS_ENABLED(OF_PLATDATA).
 
 The dt-platdata.c file contains the device declarations and is is built in
 spl/dt-platdata.c.