diff mbox

[U-Boot,6/7] sunxi: Kconfig: move common settings into a shared code block

Message ID 1406879207-12322-6-git-send-email-hdegoede@redhat.com
State Accepted
Delegated to: Hans de Goede
Headers show

Commit Message

Hans de Goede Aug. 1, 2014, 7:46 a.m. UTC
SYS_CPU, SYS_BOARD and SYS_SOC are identical for all sunxi boards, move
them to a shared code block.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 board/sunxi/Kconfig | 32 ++++++--------------------------
 1 file changed, 6 insertions(+), 26 deletions(-)

Comments

Ian Campbell Aug. 4, 2014, 9:26 p.m. UTC | #1
On Fri, 2014-08-01 at 09:46 +0200, Hans de Goede wrote:
> SYS_CPU, SYS_BOARD and SYS_SOC are identical for all sunxi boards, move
> them to a shared code block.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

This is an improvement so:
Acked-by: Ian Campbell <ijc@hellion.org.uk>

But eventually we could clean up even more, e.g.

config SYS_CONFIG_NAME
	string
	default "sun4i" if TARGET_SUN4I
	default "sun5i" if TARGET_SUN5I
	etc

Possibly even some things should be select'd rather than default'd.

Ian.
Chen-Yu Tsai Aug. 5, 2014, 1:24 a.m. UTC | #2
On Tue, Aug 5, 2014 at 5:26 AM, Ian Campbell <ijc@hellion.org.uk> wrote:
> On Fri, 2014-08-01 at 09:46 +0200, Hans de Goede wrote:
>> SYS_CPU, SYS_BOARD and SYS_SOC are identical for all sunxi boards, move
>> them to a shared code block.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> This is an improvement so:
> Acked-by: Ian Campbell <ijc@hellion.org.uk>
>
> But eventually we could clean up even more, e.g.
>
> config SYS_CONFIG_NAME
>         string
>         default "sun4i" if TARGET_SUN4I
>         default "sun5i" if TARGET_SUN5I
>         etc
>
> Possibly even some things should be select'd rather than default'd.

Selected sounds better. :)
Ian Campbell Aug. 5, 2014, 7:03 a.m. UTC | #3
On Tue, 2014-08-05 at 09:24 +0800, Chen-Yu Tsai wrote:
> On Tue, Aug 5, 2014 at 5:26 AM, Ian Campbell <ijc@hellion.org.uk> wrote:
> > On Fri, 2014-08-01 at 09:46 +0200, Hans de Goede wrote:
> >> SYS_CPU, SYS_BOARD and SYS_SOC are identical for all sunxi boards, move
> >> them to a shared code block.
> >>
> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >
> > This is an improvement so:
> > Acked-by: Ian Campbell <ijc@hellion.org.uk>
> >
> > But eventually we could clean up even more, e.g.
> >
> > config SYS_CONFIG_NAME
> >         string
> >         default "sun4i" if TARGET_SUN4I
> >         default "sun5i" if TARGET_SUN5I
> >         etc
> >
> > Possibly even some things should be select'd rather than default'd.
> 
> Selected sounds better. :)

The main thing I know about select is that one needs to be very careful
about when it is used, since it can have odd side effects....

Ian.
diff mbox

Patch

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index b06b5e0..24cca47 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -1,17 +1,5 @@ 
 if TARGET_SUN4I
 
-config SYS_CPU
-	string
-	default "armv7"
-
-config SYS_BOARD
-	string
-	default "sunxi"
-
-config SYS_SOC
-	string
-	default "sunxi"
-
 config SYS_CONFIG_NAME
 	string
 	default "sun4i"
@@ -20,25 +8,21 @@  endif
 
 if TARGET_SUN5I
 
-config SYS_CPU
+config SYS_CONFIG_NAME
 	string
-	default "armv7"
+	default "sun5i"
 
-config SYS_BOARD
-	string
-	default "sunxi"
+endif
 
-config SYS_SOC
-	string
-	default "sunxi"
+if TARGET_SUN7I
 
 config SYS_CONFIG_NAME
 	string
-	default "sun5i"
+	default "sun7i"
 
 endif
 
-if TARGET_SUN7I
+if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN7I
 
 config SYS_CPU
 	string
@@ -52,8 +36,4 @@  config SYS_SOC
 	string
 	default "sunxi"
 
-config SYS_CONFIG_NAME
-	string
-	default "sun7i"
-
 endif