[U-Boot] [PATCH v3 1/7] generic-board: move __HAVE_ARCH_GENERIC_BOARD to Kconfig

2015-03-19 Thread Masahiro Yamada
Move the option to Kconfig renaming it to CONFIG_HAVE_GENERIC_BOARD.

Signed-off-by: Masahiro Yamada 
---

Changes in v2: None

 Makefile  |  2 +-
 README|  6 +++---
 arch/Kconfig  | 14 ++
 arch/arc/config.mk|  3 ---
 arch/arm/config.mk|  3 ---
 arch/avr32/config.mk  |  3 ---
 arch/blackfin/config.mk   |  3 ---
 arch/m68k/config.mk   |  3 ---
 arch/microblaze/config.mk |  1 -
 arch/mips/config.mk   |  2 --
 arch/nios2/config.mk  |  2 --
 arch/powerpc/config.mk|  3 ---
 arch/sandbox/config.mk|  3 ---
 arch/x86/config.mk|  3 ---
 doc/README.generic-board  | 12 +++-
 15 files changed, 25 insertions(+), 38 deletions(-)

diff --git a/Makefile b/Makefile
index 346ea27..0d160c9 100644
--- a/Makefile
+++ b/Makefile
@@ -1163,7 +1163,7 @@ prepare2: prepare3 outputmakefile
 
 prepare1: prepare2 $(version_h) $(timestamp_h) \
include/config/auto.conf
-ifeq ($(__HAVE_ARCH_GENERIC_BOARD),)
+ifeq ($(CONFIG_HAVE_GENERIC_BOARD),)
 ifeq ($(CONFIG_SYS_GENERIC_BOARD),y)
@echo >&2 "  Your architecture does not support generic board."
@echo >&2 "  Please undefine CONFIG_SYS_GENERIC_BOARD in your board 
config file."
diff --git a/README b/README
index b0124d6..5d57eb9 100644
--- a/README
+++ b/README
@@ -4190,9 +4190,9 @@ Configuration Settings:
to this new framework over time. Defining this will disable the
arch/foo/lib/board.c file and use common/board_f.c and
common/board_r.c instead. To use this option your architecture
-   must support it (i.e. must define __HAVE_ARCH_GENERIC_BOARD in
-   its config.mk file). If you find problems enabling this option on
-   your board please report the problem and send patches!
+   must support it (i.e. must select HAVE_GENERIC_BOARD in arch/Kconfig).
+   If you find problems enabling this option on your board please report
+   the problem and send patches!
 
 - CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC (OMAP only)
This is set by OMAP boards for the max time that reset should
diff --git a/arch/Kconfig b/arch/Kconfig
index 3d419bc..cdd1662 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1,3 +1,6 @@
+config HAVE_GENERIC_BOARD
+   bool
+
 choice
prompt "Architecture select"
default SANDBOX
@@ -5,34 +8,42 @@ choice
 config ARC
bool "ARC architecture"
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
 
 config ARM
bool "ARM architecture"
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config AVR32
bool "AVR32 architecture"
+   select HAVE_GENERIC_BOARD
 
 config BLACKFIN
bool "Blackfin architecture"
+   select HAVE_GENERIC_BOARD
 
 config M68K
bool "M68000 architecture"
+   select HAVE_GENERIC_BOARD
 
 config MICROBLAZE
bool "MicroBlaze architecture"
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config MIPS
bool "MIPS architecture"
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
 
 config NDS32
bool "NDS32 architecture"
 
 config NIOS2
bool "Nios II architecture"
+   select HAVE_GENERIC_BOARD
 
 config OPENRISC
bool "OpenRISC architecture"
@@ -40,10 +51,12 @@ config OPENRISC
 config PPC
bool "PowerPC architecture"
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config SANDBOX
bool "Sandbox"
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config SH
@@ -56,6 +69,7 @@ config SPARC
 config X86
bool "x86 architecture"
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 endchoice
diff --git a/arch/arc/config.mk b/arch/arc/config.mk
index 4fcd407..04c034b 100644
--- a/arch/arc/config.mk
+++ b/arch/arc/config.mk
@@ -57,6 +57,3 @@ LDFLAGS_FINAL += -pie
 
 # Load address for standalone apps
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x8200
-
-# Support generic board on ARC
-__HAVE_ARCH_GENERIC_BOARD := y
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 0667984..c005ce4 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -19,9 +19,6 @@ PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \
 PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
   $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
 
-# Support generic board on ARM
-__HAVE_ARCH_GENERIC_BOARD := y
-
 PLATFORM_CPPFLAGS += -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
diff --git a/arch/avr32/config.mk b/arch/avr32/config.mk
index 8252f59..469185e 100644
--- a/arch/avr32/config.mk
+++ b/arch/avr32/config.mk
@@ -9,9 +9,6 @@ ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE := avr32-linux-
 endif
 
-# avr32 has generic board support
-__HAVE_ARCH_GENERIC_BOARD := y
-
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x
 

Re: [U-Boot] [PATCH v3 1/7] generic-board: move __HAVE_ARCH_GENERIC_BOARD to Kconfig

2015-03-23 Thread Simon Glass
On 19 March 2015 at 04:42, Masahiro Yamada
 wrote:
> Move the option to Kconfig renaming it to CONFIG_HAVE_GENERIC_BOARD.
>
> Signed-off-by: Masahiro Yamada 
> ---
>
> Changes in v2: None
>
>  Makefile  |  2 +-
>  README|  6 +++---
>  arch/Kconfig  | 14 ++
>  arch/arc/config.mk|  3 ---
>  arch/arm/config.mk|  3 ---
>  arch/avr32/config.mk  |  3 ---
>  arch/blackfin/config.mk   |  3 ---
>  arch/m68k/config.mk   |  3 ---
>  arch/microblaze/config.mk |  1 -
>  arch/mips/config.mk   |  2 --
>  arch/nios2/config.mk  |  2 --
>  arch/powerpc/config.mk|  3 ---
>  arch/sandbox/config.mk|  3 ---
>  arch/x86/config.mk|  3 ---
>  doc/README.generic-board  | 12 +++-
>  15 files changed, 25 insertions(+), 38 deletions(-)

Reviewed-by: Simon Glass 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/7] generic-board: move __HAVE_ARCH_GENERIC_BOARD to Kconfig

2015-03-24 Thread Alexey Brodkin
On Mon, 2015-03-23 at 15:33 -0600, Simon Glass wrote:
> On 19 March 2015 at 04:42, Masahiro Yamada
>  wrote:
> > Move the option to Kconfig renaming it to CONFIG_HAVE_GENERIC_BOARD.
> >
> > Signed-off-by: Masahiro Yamada 
> > ---
> >
> > Changes in v2: None
> >
> >  Makefile  |  2 +-
> >  README|  6 +++---
> >  arch/Kconfig  | 14 ++
> >  arch/arc/config.mk|  3 ---
> >  arch/arm/config.mk|  3 ---
> >  arch/avr32/config.mk  |  3 ---
> >  arch/blackfin/config.mk   |  3 ---
> >  arch/m68k/config.mk   |  3 ---
> >  arch/microblaze/config.mk |  1 -
> >  arch/mips/config.mk   |  2 --
> >  arch/nios2/config.mk  |  2 --
> >  arch/powerpc/config.mk|  3 ---
> >  arch/sandbox/config.mk|  3 ---
> >  arch/x86/config.mk|  3 ---
> >  doc/README.generic-board  | 12 +++-
> >  15 files changed, 25 insertions(+), 38 deletions(-)
> 
> Reviewed-by: Simon Glass 

Reviewed-by: Alexey Brodkin 

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot