diff mbox

[U-Boot,01/15] sunxi_nand_spl: Fix CONFIG_SPL_NAND_SUNXI handling

Message ID 1439668968-3882-2-git-send-email-hdegoede@redhat.com
State Accepted
Delegated to: Hans de Goede
Headers show

Commit Message

Hans de Goede Aug. 15, 2015, 8:02 p.m. UTC
CONFIG_SPL_NAND_SUPPORT gets used via IS_ENABLED so it must be defined
to 1, rather then just being defined.

While at remove 2 other unused NAND related defines from sunxi-common.h.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 include/configs/sunxi-common.h | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Ian Campbell Aug. 17, 2015, 8:11 a.m. UTC | #1
On Sat, 2015-08-15 at 22:02 +0200, Hans de Goede wrote:
> CONFIG_SPL_NAND_SUPPORT gets used via IS_ENABLED so it must be 
> defined
> to 1, rather then just being defined.
> 
> While at remove 2 other unused NAND related defines from sunxi
> -common.h.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Ian Campbell <ijc@hellion.org.uk>
Maxime Ripard Aug. 19, 2015, 1:45 p.m. UTC | #2
On Sat, Aug 15, 2015 at 10:02:34PM +0200, Hans de Goede wrote:
> CONFIG_SPL_NAND_SUPPORT gets used via IS_ENABLED so it must be defined
> to 1, rather then just being defined.
> 
> While at remove 2 other unused NAND related defines from sunxi-common.h.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  include/configs/sunxi-common.h | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 1abf73c..3735afb 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -138,15 +138,10 @@
>  #define CONFIG_SERIAL_TAG
>  
>  #if defined(CONFIG_SPL_NAND_SUNXI)
> -#define CONFIG_SPL_NAND_DRIVERS
> -#define CONFIG_SPL_NAND_SUPPORT
> -
> -#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
> +#define CONFIG_SPL_NAND_SUPPORT 1

Every other platform just use an empty define for this one, and the
only user of IS_ENABLED together with this option is the sunxi
board. Why not simply replace the IS_ENABLED by an ifdef to maintain
consistency?

AFAIK, IS_ENABLED doesn't bring anythnig to the table here.

Maxime
Hans de Goede Aug. 20, 2015, 6:33 a.m. UTC | #3
Hi,

On 08/19/2015 03:45 PM, Maxime Ripard wrote:
> On Sat, Aug 15, 2015 at 10:02:34PM +0200, Hans de Goede wrote:
>> CONFIG_SPL_NAND_SUPPORT gets used via IS_ENABLED so it must be defined
>> to 1, rather then just being defined.
>>
>> While at remove 2 other unused NAND related defines from sunxi-common.h.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   include/configs/sunxi-common.h | 7 +------
>>   1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
>> index 1abf73c..3735afb 100644
>> --- a/include/configs/sunxi-common.h
>> +++ b/include/configs/sunxi-common.h
>> @@ -138,15 +138,10 @@
>>   #define CONFIG_SERIAL_TAG
>>
>>   #if defined(CONFIG_SPL_NAND_SUNXI)
>> -#define CONFIG_SPL_NAND_DRIVERS
>> -#define CONFIG_SPL_NAND_SUPPORT
>> -
>> -#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
>> +#define CONFIG_SPL_NAND_SUPPORT 1
>
> Every other platform just use an empty define for this one, and the
> only user of IS_ENABLED together with this option is the sunxi
> board. Why not simply replace the IS_ENABLED by an ifdef to maintain
> consistency?

Because u-boot is moving to Kconfig which will define it to 1,
and ...

> AFAIK, IS_ENABLED doesn't bring anythnig to the table here.

IS_ENABLED leads too cleaner / easier to read code, so it does
bring something to the table.

REgards,

Hans
Maxime Ripard Aug. 27, 2015, 12:36 p.m. UTC | #4
On Thu, Aug 20, 2015 at 08:33:01AM +0200, Hans de Goede wrote:
> Hi,
> 
> On 08/19/2015 03:45 PM, Maxime Ripard wrote:
> >On Sat, Aug 15, 2015 at 10:02:34PM +0200, Hans de Goede wrote:
> >>CONFIG_SPL_NAND_SUPPORT gets used via IS_ENABLED so it must be defined
> >>to 1, rather then just being defined.
> >>
> >>While at remove 2 other unused NAND related defines from sunxi-common.h.
> >>
> >>Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >>---
> >>  include/configs/sunxi-common.h | 7 +------
> >>  1 file changed, 1 insertion(+), 6 deletions(-)
> >>
> >>diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> >>index 1abf73c..3735afb 100644
> >>--- a/include/configs/sunxi-common.h
> >>+++ b/include/configs/sunxi-common.h
> >>@@ -138,15 +138,10 @@
> >>  #define CONFIG_SERIAL_TAG
> >>
> >>  #if defined(CONFIG_SPL_NAND_SUNXI)
> >>-#define CONFIG_SPL_NAND_DRIVERS
> >>-#define CONFIG_SPL_NAND_SUPPORT
> >>-
> >>-#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
> >>+#define CONFIG_SPL_NAND_SUPPORT 1
> >
> >Every other platform just use an empty define for this one, and the
> >only user of IS_ENABLED together with this option is the sunxi
> >board. Why not simply replace the IS_ENABLED by an ifdef to maintain
> >consistency?
> 
> Because u-boot is moving to Kconfig which will define it to 1,
> and ...
> 
> >AFAIK, IS_ENABLED doesn't bring anythnig to the table here.
> 
> IS_ENABLED leads too cleaner / easier to read code, so it does
> bring something to the table.

Ok, if the plan is to move to Kconfig eventually, I guess it makes
sense.

Maxime
diff mbox

Patch

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 1abf73c..3735afb 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -138,15 +138,10 @@ 
 #define CONFIG_SERIAL_TAG
 
 #if defined(CONFIG_SPL_NAND_SUNXI)
-#define CONFIG_SPL_NAND_DRIVERS
-#define CONFIG_SPL_NAND_SUPPORT
-
-#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
+#define CONFIG_SPL_NAND_SUPPORT 1
 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x008000
-
 #endif
 
-
 /* mmc config */
 #if !defined(CONFIG_UART0_PORT_F)
 #define CONFIG_MMC