diff mbox

[U-Boot] include: configs: Fix build warnings due to redefined

Message ID 1491925992-17782-1-git-send-email-suniel.spartan@gmail.com
State Changes Requested
Delegated to: Marek Vasut
Headers show

Commit Message

Suniel Mahesh April 11, 2017, 3:53 p.m. UTC
From: Suniel Mahesh <suniel.spartan@gmail.com>

Driver model for OMAP24XX and later Multichannel SPI master controller,
if used, OMAP3 SPI configuration is set.
The same configuration is defined in ti_armv7_omap.h, because
of redefinition, warnings are spilled during build.

Fixed warnings for AM335x SOC by using #ifndef directive in
ti_armv7_omap.h.

Signed-off-by: Suniel Mahesh <suniel.spartan@gmail.com>
---
Note:
Tested on Beaglebone Black using latest u-boot mainline tree
with device tree set
---
 include/configs/ti_armv7_omap.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Marek Vasut April 11, 2017, 3:57 p.m. UTC | #1
On 04/11/2017 05:53 PM, suniel.spartan@gmail.com wrote:
> From: Suniel Mahesh <suniel.spartan@gmail.com>
> 
> Driver model for OMAP24XX and later Multichannel SPI master controller,
> if used, OMAP3 SPI configuration is set.
> The same configuration is defined in ti_armv7_omap.h, because
> of redefinition, warnings are spilled during build.

If it's set by Kconfig, it should NOT be set in include/configs/ .
If I understand the explanation right, it is set by Kconfig and thus
this patch is wrong. The correct fix is to remove it from here and
verify that no board is affected.

> Fixed warnings for AM335x SOC by using #ifndef directive in
> ti_armv7_omap.h.
> 
> Signed-off-by: Suniel Mahesh <suniel.spartan@gmail.com>
> ---
> Note:
> Tested on Beaglebone Black using latest u-boot mainline tree
> with device tree set
> ---
>  include/configs/ti_armv7_omap.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/configs/ti_armv7_omap.h b/include/configs/ti_armv7_omap.h
> index de14b85..3167b61 100644
> --- a/include/configs/ti_armv7_omap.h
> +++ b/include/configs/ti_armv7_omap.h
> @@ -21,7 +21,9 @@
>  #define CONFIG_SYS_I2C_OMAP24XX
>  
>  /* SPI IP Block */
> +#ifndef CONFIG_OMAP3_SPI
>  #define CONFIG_OMAP3_SPI
> +#endif
>  
>  /* GPIO block */
>  #define CONFIG_OMAP_GPIO
>
Tom Rini April 11, 2017, 4:01 p.m. UTC | #2
On Tue, Apr 11, 2017 at 05:57:42PM +0200, Marek Vasut wrote:
> On 04/11/2017 05:53 PM, suniel.spartan@gmail.com wrote:
> > From: Suniel Mahesh <suniel.spartan@gmail.com>
> > 
> > Driver model for OMAP24XX and later Multichannel SPI master controller,
> > if used, OMAP3 SPI configuration is set.
> > The same configuration is defined in ti_armv7_omap.h, because
> > of redefinition, warnings are spilled during build.
> 
> If it's set by Kconfig, it should NOT be set in include/configs/ .
> If I understand the explanation right, it is set by Kconfig and thus
> this patch is wrong. The correct fix is to remove it from here and
> verify that no board is affected.

Correct, moveconfig.py needs to be run to migrate the rest of the users
over.  Thanks!
diff mbox

Patch

diff --git a/include/configs/ti_armv7_omap.h b/include/configs/ti_armv7_omap.h
index de14b85..3167b61 100644
--- a/include/configs/ti_armv7_omap.h
+++ b/include/configs/ti_armv7_omap.h
@@ -21,7 +21,9 @@ 
 #define CONFIG_SYS_I2C_OMAP24XX
 
 /* SPI IP Block */
+#ifndef CONFIG_OMAP3_SPI
 #define CONFIG_OMAP3_SPI
+#endif
 
 /* GPIO block */
 #define CONFIG_OMAP_GPIO