public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v8 07/31] __HAVE_ARCH_GENERIC_BOARD controls availabilty of generic board
@ 2013-03-08 23:45 Simon Glass
  2013-03-08 23:45 ` [U-Boot] [PATCH v8 13/31] arm: Enable generic board support Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Simon Glass @ 2013-03-08 23:45 UTC (permalink / raw)
  To: u-boot

We are introducing a new unified board setup. Add a check to make sure that
board config files do not define CONFIG_SYS_GENERIC_BOARD unless their
architecture defines __HAVE_ARCH_GENERIC_BOARD

__HAVE_ARCH_GENERIC_BOARD will currently not be the default setting, but
we can switch this later when most architecture support generic board.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v8:
- Switch polarity: !CONFIG_SYS_LEGACY_BOARD becomes __HAVE_ARCH_GENERIC_BOARD

Changes in v7:
- Add description of CONFIG_SYS_LEGACY_BOARD to README

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 README    | 10 ++++++++++
 config.mk |  8 ++++++++
 2 files changed, 18 insertions(+)

diff --git a/README b/README
index 42544ce..2c36e00 100644
--- a/README
+++ b/README
@@ -3211,6 +3211,16 @@ Configuration Settings:
 	If defined, don't allow the -f switch to env set override variable
 	access flags.
 
+- CONFIG_SYS_GENERIC_BOARD
+	This selects the architecture-generic board system instead of the
+	architecture-specific board files. It is intended to move boards
+	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!
+
 The following definitions that deal with the placement and management
 of environment data (variable area); in general, we support the
 following configurations:
diff --git a/config.mk b/config.mk
index b7cd481..9886415 100644
--- a/config.mk
+++ b/config.mk
@@ -221,6 +221,14 @@ ifeq ($(CONFIG_SPL_BUILD),y)
 CPPFLAGS += -DCONFIG_SPL_BUILD
 endif
 
+# Does this architecture support generic board init?
+ifeq ($(__HAVE_ARCH_GENERIC_BOARD),)
+ifneq ($(CONFIG_SYS_GENERIC_BOARD),)
+$(error Your architecture does not support generic board. Please undefined \
+CONFIG_SYS_GENERIC_BOARD in your board config file)
+endif
+endif
+
 ifneq ($(RESET_VECTOR_ADDRESS),)
 CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS)
 endif
-- 
1.8.1.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v8 13/31] arm: Enable generic board support
  2013-03-08 23:45 [U-Boot] [PATCH v8 07/31] __HAVE_ARCH_GENERIC_BOARD controls availabilty of generic board Simon Glass
@ 2013-03-08 23:45 ` Simon Glass
  2013-03-09 12:31   ` Otavio Salvador
  2013-03-08 23:45 ` [U-Boot] [PATCH v8 17/31] ppc: " Simon Glass
  2013-03-08 23:45 ` [U-Boot] [PATCH v8 21/31] x86: " Simon Glass
  2 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2013-03-08 23:45 UTC (permalink / raw)
  To: u-boot

This enables generic board support so that ARM boards can define
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v8:
- Define __HAVE_ARCH_GENERIC_BOARD in ARM's config.mk

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/config.mk            | 3 +++
 arch/arm/include/asm/u-boot.h | 9 +++++++++
 arch/arm/lib/Makefile         | 3 +++
 3 files changed, 15 insertions(+)

diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 24b9d7c..a0c89b7 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
 endif
 endif
 
+# Support generic board on ARM
+__HAVE_ARCH_GENERIC_BOARD := y
+
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h
index 2ba98bc..8e7e27b 100644
--- a/arch/arm/include/asm/u-boot.h
+++ b/arch/arm/include/asm/u-boot.h
@@ -36,6 +36,12 @@
 #ifndef _U_BOOT_H_
 #define _U_BOOT_H_	1
 
+#ifdef CONFIG_SYS_GENERIC_BOARD
+/* Use the generic board which requires a unified bd_info */
+#include <asm-generic/u-boot.h>
+#else
+
+#ifndef __ASSEMBLY__
 typedef struct bd_info {
 	unsigned int	bi_baudrate;	/* serial console baudrate */
     ulong	        bi_arch_number;	/* unique id for this board */
@@ -49,6 +55,9 @@ typedef struct bd_info {
 	ulong size;
     }			bi_dram[CONFIG_NR_DRAM_BANKS];
 } bd_t;
+#endif
+
+#endif /* nCONFIG_SYS_GENERIC_BOARD */
 
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_ARM
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 57111af..24c7e7a 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -39,7 +39,10 @@ GLCOBJS	+= div0.o
 SOBJS-y += crt0.o
 
 ifndef CONFIG_SPL_BUILD
+ifndef CONFIG_SYS_GENERIC_BOARD
 COBJS-y	+= board.o
+endif
+
 COBJS-y	+= bootm.o
 COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
 SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
-- 
1.8.1.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v8 17/31] ppc: Enable generic board support
  2013-03-08 23:45 [U-Boot] [PATCH v8 07/31] __HAVE_ARCH_GENERIC_BOARD controls availabilty of generic board Simon Glass
  2013-03-08 23:45 ` [U-Boot] [PATCH v8 13/31] arm: Enable generic board support Simon Glass
@ 2013-03-08 23:45 ` Simon Glass
  2013-03-08 23:45 ` [U-Boot] [PATCH v8 21/31] x86: " Simon Glass
  2 siblings, 0 replies; 9+ messages in thread
From: Simon Glass @ 2013-03-08 23:45 UTC (permalink / raw)
  To: u-boot

This enables generic board support so that ppc boards can define
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v8:
- Define __HAVE_ARCH_GENERIC_BOARD in PPC's config.mk

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/powerpc/config.mk            | 3 +++
 arch/powerpc/include/asm/u-boot.h | 7 +++++++
 arch/powerpc/lib/Makefile         | 2 ++
 3 files changed, 12 insertions(+)

diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index b706281..e32d2bf 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -29,6 +29,9 @@ PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
 PLATFORM_LDFLAGS  += -n
 
+# Support generic board on PPC
+__HAVE_ARCH_GENERIC_BOARD := y
+
 #
 # When cross-compiling on NetBSD, we have to define __PPC__ or else we
 # will pick up a va_list declaration that is incompatible with the
diff --git a/arch/powerpc/include/asm/u-boot.h b/arch/powerpc/include/asm/u-boot.h
index 7229a98..951dd6a 100644
--- a/arch/powerpc/include/asm/u-boot.h
+++ b/arch/powerpc/include/asm/u-boot.h
@@ -34,6 +34,11 @@
  * include/asm-ppc/u-boot.h
  */
 
+#ifdef CONFIG_SYS_GENERIC_BOARD
+/* Use the generic board which requires a unified bd_info */
+#include <asm-generic/u-boot.h>
+#else
+
 #ifndef __ASSEMBLY__
 
 typedef struct bd_info {
@@ -144,6 +149,8 @@ typedef struct bd_info {
 
 #endif /* __ASSEMBLY__ */
 
+#endif /* nCONFIG_SYS_GENERIC_BOARD */
+
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_PPC
 
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 86cf02a..59c723b 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -59,8 +59,10 @@ SOBJS-y	+= reloc.o
 
 COBJS-$(CONFIG_BAT_RW) += bat_rw.o
 ifndef CONFIG_SPL_BUILD
+ifndef CONFIG_SYS_GENERIC_BOARD
 COBJS-y	+= board.o
 endif
+endif
 COBJS-y	+= bootm.o
 COBJS-y	+= cache.o
 COBJS-y	+= extable.o
-- 
1.8.1.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v8 21/31] x86: Enable generic board support
  2013-03-08 23:45 [U-Boot] [PATCH v8 07/31] __HAVE_ARCH_GENERIC_BOARD controls availabilty of generic board Simon Glass
  2013-03-08 23:45 ` [U-Boot] [PATCH v8 13/31] arm: Enable generic board support Simon Glass
  2013-03-08 23:45 ` [U-Boot] [PATCH v8 17/31] ppc: " Simon Glass
@ 2013-03-08 23:45 ` Simon Glass
  2 siblings, 0 replies; 9+ messages in thread
From: Simon Glass @ 2013-03-08 23:45 UTC (permalink / raw)
  To: u-boot

This enables generic board support so that x86 boards can define
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v5:
- Avoid setting up gd on x86 as it is already done

Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/x86/include/asm/u-boot.h | 11 +++++++++++
 arch/x86/lib/Makefile         |  3 +++
 common/board_r.c              |  2 ++
 3 files changed, 16 insertions(+)

diff --git a/arch/x86/include/asm/u-boot.h b/arch/x86/include/asm/u-boot.h
index 2f45c7b..19c038a 100644
--- a/arch/x86/include/asm/u-boot.h
+++ b/arch/x86/include/asm/u-boot.h
@@ -39,6 +39,13 @@
 #include <config.h>
 #include <compiler.h>
 
+#ifdef CONFIG_SYS_GENERIC_BOARD
+/* Use the generic board which requires a unified bd_info */
+#include <asm-generic/u-boot.h>
+#else
+
+#ifndef __ASSEMBLY__
+
 typedef struct bd_info {
 	unsigned long	bi_memstart;	/* start of DRAM memory */
 	phys_size_t	bi_memsize;	/* size	 of DRAM memory in bytes */
@@ -60,6 +67,10 @@ typedef struct bd_info {
 	}bi_dram[CONFIG_NR_DRAM_BANKS];
 } bd_t;
 
+#endif /* __ASSEMBLY__ */
+
+#endif /* nCONFIG_SYS_GENERIC_BOARD */
+
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_I386
 
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 9b24dc5..ee89354 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -25,7 +25,10 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(ARCH).o
 
+ifeq ($(CONFIG_SYS_GENERIC_BOARD),)
 COBJS-y	+= board.o
+endif
+
 COBJS-y	+= bootm.o
 COBJS-y	+= cmd_boot.o
 COBJS-y	+= gcc.o
diff --git a/common/board_r.c b/common/board_r.c
index 29eccdf..230887d 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -509,11 +509,13 @@ static int show_model_r(void)
 #endif
 
 /* enable exceptions */
+#ifdef CONFIG_ARM
 static int initr_enable_interrupts(void)
 {
 	enable_interrupts();
 	return 0;
 }
+#endif
 
 #ifdef CONFIG_CMD_NET
 static int initr_ethaddr(void)
-- 
1.8.1.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v8 13/31] arm: Enable generic board support
  2013-03-08 23:45 ` [U-Boot] [PATCH v8 13/31] arm: Enable generic board support Simon Glass
@ 2013-03-09 12:31   ` Otavio Salvador
  2013-03-09 18:30     ` Simon Glass
  0 siblings, 1 reply; 9+ messages in thread
From: Otavio Salvador @ 2013-03-09 12:31 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 8, 2013 at 8:45 PM, Simon Glass <sjg@chromium.org> wrote:
> This enables generic board support so that ARM boards can define
> CONFIG_SYS_GENERIC_BOARD.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> Changes in v8:
> - Define __HAVE_ARCH_GENERIC_BOARD in ARM's config.mk
>
> Changes in v7: None
> Changes in v6: None
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  arch/arm/config.mk            | 3 +++
>  arch/arm/include/asm/u-boot.h | 9 +++++++++
>  arch/arm/lib/Makefile         | 3 +++
>  3 files changed, 15 insertions(+)
>
> diff --git a/arch/arm/config.mk b/arch/arm/config.mk
> index 24b9d7c..a0c89b7 100644
> --- a/arch/arm/config.mk
> +++ b/arch/arm/config.mk
> @@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
>  endif
>  endif
>
> +# Support generic board on ARM
> +__HAVE_ARCH_GENERIC_BOARD := y
> +
>  PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
>
>  # Choose between ARM/Thumb instruction sets
> diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h
> index 2ba98bc..8e7e27b 100644
> --- a/arch/arm/include/asm/u-boot.h
> +++ b/arch/arm/include/asm/u-boot.h
> @@ -36,6 +36,12 @@
>  #ifndef _U_BOOT_H_
>  #define _U_BOOT_H_     1
>
> +#ifdef CONFIG_SYS_GENERIC_BOARD
> +/* Use the generic board which requires a unified bd_info */
> +#include <asm-generic/u-boot.h>
> +#else
> +
> +#ifndef __ASSEMBLY__
>  typedef struct bd_info {
>         unsigned int    bi_baudrate;    /* serial console baudrate */
>      ulong              bi_arch_number; /* unique id for this board */
> @@ -49,6 +55,9 @@ typedef struct bd_info {
>         ulong size;
>      }                  bi_dram[CONFIG_NR_DRAM_BANKS];
>  } bd_t;
> +#endif
> +
> +#endif /* nCONFIG_SYS_GENERIC_BOARD */

Typo?

>  /* For image.h:image_check_target_arch() */
>  #define IH_ARCH_DEFAULT IH_ARCH_ARM
> diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
> index 57111af..24c7e7a 100644
> --- a/arch/arm/lib/Makefile
> +++ b/arch/arm/lib/Makefile
> @@ -39,7 +39,10 @@ GLCOBJS      += div0.o
>  SOBJS-y += crt0.o
>
>  ifndef CONFIG_SPL_BUILD
> +ifndef CONFIG_SYS_GENERIC_BOARD
>  COBJS-y        += board.o
> +endif
> +
>  COBJS-y        += bootm.o
>  COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
>  SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
> --
> 1.8.1.3
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot



-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v8 13/31] arm: Enable generic board support
  2013-03-09 12:31   ` Otavio Salvador
@ 2013-03-09 18:30     ` Simon Glass
  2013-03-09 19:06       ` Otavio Salvador
  2013-03-10 13:27       ` Tom Rini
  0 siblings, 2 replies; 9+ messages in thread
From: Simon Glass @ 2013-03-09 18:30 UTC (permalink / raw)
  To: u-boot

Hi Otavio,

On Sat, Mar 9, 2013 at 4:31 AM, Otavio Salvador <otavio@ossystems.com.br>wrote:

> On Fri, Mar 8, 2013 at 8:45 PM, Simon Glass <sjg@chromium.org> wrote:
> > This enables generic board support so that ARM boards can define
> > CONFIG_SYS_GENERIC_BOARD.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> > Changes in v8:
> > - Define __HAVE_ARCH_GENERIC_BOARD in ARM's config.mk
> >
> > Changes in v7: None
> > Changes in v6: None
> > Changes in v5: None
> > Changes in v4: None
> > Changes in v3: None
> > Changes in v2: None
> >
> >  arch/arm/config.mk            | 3 +++
> >  arch/arm/include/asm/u-boot.h | 9 +++++++++
> >  arch/arm/lib/Makefile         | 3 +++
> >  3 files changed, 15 insertions(+)
> >
> > diff --git a/arch/arm/config.mk b/arch/arm/config.mk
> > index 24b9d7c..a0c89b7 100644
> > --- a/arch/arm/config.mk
> > +++ b/arch/arm/config.mk
> > @@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
> >  endif
> >  endif
> >
> > +# Support generic board on ARM
> > +__HAVE_ARCH_GENERIC_BOARD := y
> > +
> >  PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
> >
> >  # Choose between ARM/Thumb instruction sets
> > diff --git a/arch/arm/include/asm/u-boot.h
> b/arch/arm/include/asm/u-boot.h
> > index 2ba98bc..8e7e27b 100644
> > --- a/arch/arm/include/asm/u-boot.h
> > +++ b/arch/arm/include/asm/u-boot.h
> > @@ -36,6 +36,12 @@
> >  #ifndef _U_BOOT_H_
> >  #define _U_BOOT_H_     1
> >
> > +#ifdef CONFIG_SYS_GENERIC_BOARD
> > +/* Use the generic board which requires a unified bd_info */
> > +#include <asm-generic/u-boot.h>
> > +#else
> > +
> > +#ifndef __ASSEMBLY__
> >  typedef struct bd_info {
> >         unsigned int    bi_baudrate;    /* serial console baudrate */
> >      ulong              bi_arch_number; /* unique id for this board */
> > @@ -49,6 +55,9 @@ typedef struct bd_info {
> >         ulong size;
> >      }                  bi_dram[CONFIG_NR_DRAM_BANKS];
> >  } bd_t;
> > +#endif
> > +
> > +#endif /* nCONFIG_SYS_GENERIC_BOARD */
>
> Typo?
>

The 'n' is intended to mean 'not'. Perhaps I should use ! instead?

Regards,
Simon

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v8 13/31] arm: Enable generic board support
  2013-03-09 18:30     ` Simon Glass
@ 2013-03-09 19:06       ` Otavio Salvador
  2013-03-10 13:27       ` Tom Rini
  1 sibling, 0 replies; 9+ messages in thread
From: Otavio Salvador @ 2013-03-09 19:06 UTC (permalink / raw)
  To: u-boot

On Sat, Mar 9, 2013 at 3:30 PM, Simon Glass <sjg@chromium.org> wrote:
> Hi Otavio,
>
> On Sat, Mar 9, 2013 at 4:31 AM, Otavio Salvador <otavio@ossystems.com.br>
> wrote:
>>
>> On Fri, Mar 8, 2013 at 8:45 PM, Simon Glass <sjg@chromium.org> wrote:
>> > This enables generic board support so that ARM boards can define
>> > CONFIG_SYS_GENERIC_BOARD.
>> >
>> > Signed-off-by: Simon Glass <sjg@chromium.org>
>> > ---
>> > Changes in v8:
>> > - Define __HAVE_ARCH_GENERIC_BOARD in ARM's config.mk
>> >
>> > Changes in v7: None
>> > Changes in v6: None
>> > Changes in v5: None
>> > Changes in v4: None
>> > Changes in v3: None
>> > Changes in v2: None
>> >
>> >  arch/arm/config.mk            | 3 +++
>> >  arch/arm/include/asm/u-boot.h | 9 +++++++++
>> >  arch/arm/lib/Makefile         | 3 +++
>> >  3 files changed, 15 insertions(+)
>> >
>> > diff --git a/arch/arm/config.mk b/arch/arm/config.mk
>> > index 24b9d7c..a0c89b7 100644
>> > --- a/arch/arm/config.mk
>> > +++ b/arch/arm/config.mk
>> > @@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
>> >  endif
>> >  endif
>> >
>> > +# Support generic board on ARM
>> > +__HAVE_ARCH_GENERIC_BOARD := y
>> > +
>> >  PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
>> >
>> >  # Choose between ARM/Thumb instruction sets
>> > diff --git a/arch/arm/include/asm/u-boot.h
>> > b/arch/arm/include/asm/u-boot.h
>> > index 2ba98bc..8e7e27b 100644
>> > --- a/arch/arm/include/asm/u-boot.h
>> > +++ b/arch/arm/include/asm/u-boot.h
>> > @@ -36,6 +36,12 @@
>> >  #ifndef _U_BOOT_H_
>> >  #define _U_BOOT_H_     1
>> >
>> > +#ifdef CONFIG_SYS_GENERIC_BOARD
>> > +/* Use the generic board which requires a unified bd_info */
>> > +#include <asm-generic/u-boot.h>
>> > +#else
>> > +
>> > +#ifndef __ASSEMBLY__
>> >  typedef struct bd_info {
>> >         unsigned int    bi_baudrate;    /* serial console baudrate */
>> >      ulong              bi_arch_number; /* unique id for this board */
>> > @@ -49,6 +55,9 @@ typedef struct bd_info {
>> >         ulong size;
>> >      }                  bi_dram[CONFIG_NR_DRAM_BANKS];
>> >  } bd_t;
>> > +#endif
>> > +
>> > +#endif /* nCONFIG_SYS_GENERIC_BOARD */
>>
>> Typo?
>
>
> The 'n' is intended to mean 'not'. Perhaps I should use ! instead?

I didn't see this use in rest of code; for me it is fine but something
to think about.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v8 13/31] arm: Enable generic board support
  2013-03-09 18:30     ` Simon Glass
  2013-03-09 19:06       ` Otavio Salvador
@ 2013-03-10 13:27       ` Tom Rini
  2013-03-11 16:17         ` Simon Glass
  1 sibling, 1 reply; 9+ messages in thread
From: Tom Rini @ 2013-03-10 13:27 UTC (permalink / raw)
  To: u-boot

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/09/2013 01:30 PM, Simon Glass wrote:
> Hi Otavio,
> 
> On Sat, Mar 9, 2013 at 4:31 AM, Otavio Salvador
> <otavio at ossystems.com.br <mailto:otavio@ossystems.com.br>> wrote:
> 
> On Fri, Mar 8, 2013 at 8:45 PM, Simon Glass <sjg@chromium.org 
> <mailto:sjg@chromium.org>> wrote:
>> This enables generic board support so that ARM boards can define 
>> CONFIG_SYS_GENERIC_BOARD.
>> 
>> Signed-off-by: Simon Glass <sjg@chromium.org
> <mailto:sjg@chromium.org>>
>> --- Changes in v8: - Define __HAVE_ARCH_GENERIC_BOARD in ARM's
>> config.mk
> <http://config.mk>
>> 
>> Changes in v7: None Changes in v6: None Changes in v5: None 
>> Changes in v4: None Changes in v3: None Changes in v2: None
>> 
>> arch/arm/config.mk <http://config.mk>            | 3 +++ 
>> arch/arm/include/asm/u-boot.h | 9 +++++++++ arch/arm/lib/Makefile
>> | 3 +++ 3 files changed, 15 insertions(+)
>> 
>> diff --git a/arch/arm/config.mk <http://config.mk>
> b/arch/arm/config.mk <http://config.mk>
>> index 24b9d7c..a0c89b7 100644 --- a/arch/arm/config.mk
>> <http://config.mk> +++ b/arch/arm/config.mk <http://config.mk> @@
>> -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 endif 
>> endif
>> 
>> +# Support generic board on ARM +__HAVE_ARCH_GENERIC_BOARD := y 
>> + PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
>> 
>> # Choose between ARM/Thumb instruction sets diff --git
>> a/arch/arm/include/asm/u-boot.h
> b/arch/arm/include/asm/u-boot.h
>> index 2ba98bc..8e7e27b 100644 ---
>> a/arch/arm/include/asm/u-boot.h +++
>> b/arch/arm/include/asm/u-boot.h @@ -36,6 +36,12 @@ #ifndef
>> _U_BOOT_H_ #define _U_BOOT_H_     1
>> 
>> +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which
>> requires a unified bd_info */ +#include <asm-generic/u-boot.h> 
>> +#else + +#ifndef __ASSEMBLY__ typedef struct bd_info { unsigned
>> int    bi_baudrate;    /* serial console baudrate */ ulong
>> bi_arch_number; /* unique id for this board */ @@ -49,6 +55,9 @@
>> typedef struct bd_info { ulong size; }
>> bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#endif + +#endif /*
>> nCONFIG_SYS_GENERIC_BOARD */
> 
> Typo?
> 
> 
> The 'n' is intended to mean 'not'. Perhaps I should use ! instead?

!CONFIG is the style of the rest of the codebase.  Thanks.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRPIpAAAoJENk4IS6UOR1WvHsP/RxMk8w1XFl6lMmsJysrdwRd
4pGVk1x1LjRpnleo3nJgQIX5e458g6oM7tra0JQ1RvbxNEZhWiJon/P0kun4gTAt
CPzCNZt0JyAXTu/+MyNTALuLMwY30JSzBR6Tg1uTgrfBDcQVOlRkwCwU91oDBeQH
Dbf8KYfBmOoHy3/uLu/JwEAbAOQFxb4VdTaXnwM9Vp4sDX2TiP1gyJVDT668/i07
SSwYiIE022zJKe/MSmiWzXwClUDKoKwFOsv15y+O2Wv5Dr+uSSd6uCj+tUlEBFmP
uhOZPveAbhL2Myhti1j0GkZD/VSeUhHbAXH5OATQRCJHXZGLSsynxgl4fTFK1Mnn
QLcYGyTWGOzba/ytlvSpCfHrQL+dh48bV8Cz3Mvj1iQyZyMRbfC6JMaZu2AFsqvE
vQni+ZhuE4FIBLt7mD3e5aqDM2Z6kijpDk95sU0G6LwcUJW1KeFTnqKxTE8BjNu4
dmFsqpNXSDCkgCGdnOasEfXzGmUMy/DlwWtPxXxa/CnFcxDkrh7to9kWW5xYYrL8
zItHpvLeuZAbzHCtjJsewjCx9QXcZ+jvpSbpjUrCEAM29ifxbKukRBb6chU3XDaN
KJwRIWlhtkTGXEoUmSsurQGPDD2SvDq10wgml1cQoCB9n756IQBVKruFV+dHjdgw
0TybImGlHorgFeZJh8pX
=zX5G
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v8 13/31] arm: Enable generic board support
  2013-03-10 13:27       ` Tom Rini
@ 2013-03-11 16:17         ` Simon Glass
  0 siblings, 0 replies; 9+ messages in thread
From: Simon Glass @ 2013-03-11 16:17 UTC (permalink / raw)
  To: u-boot

Hi Tom,


On Sun, Mar 10, 2013 at 6:27 AM, Tom Rini <trini@ti.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 03/09/2013 01:30 PM, Simon Glass wrote:
> > Hi Otavio,
> >
> > On Sat, Mar 9, 2013 at 4:31 AM, Otavio Salvador
> > <otavio at ossystems.com.br <mailto:otavio@ossystems.com.br>> wrote:
> >
> > On Fri, Mar 8, 2013 at 8:45 PM, Simon Glass <sjg@chromium.org
> > <mailto:sjg@chromium.org>> wrote:
> >> This enables generic board support so that ARM boards can define
> >> CONFIG_SYS_GENERIC_BOARD.
> >>
> >> Signed-off-by: Simon Glass <sjg@chromium.org
> > <mailto:sjg@chromium.org>>
> >> --- Changes in v8: - Define __HAVE_ARCH_GENERIC_BOARD in ARM's
> >> config.mk
> > <http://config.mk>
> >>
> >> Changes in v7: None Changes in v6: None Changes in v5: None
> >> Changes in v4: None Changes in v3: None Changes in v2: None
> >>
> >> arch/arm/config.mk <http://config.mk>            | 3 +++
> >> arch/arm/include/asm/u-boot.h | 9 +++++++++ arch/arm/lib/Makefile
> >> | 3 +++ 3 files changed, 15 insertions(+)
> >>
> >> diff --git a/arch/arm/config.mk <http://config.mk>
> > b/arch/arm/config.mk <http://config.mk>
> >> index 24b9d7c..a0c89b7 100644 --- a/arch/arm/config.mk
> >> <http://config.mk> +++ b/arch/arm/config.mk <http://config.mk> @@
> >> -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 endif
> >> endif
> >>
> >> +# Support generic board on ARM +__HAVE_ARCH_GENERIC_BOARD := y
> >> + PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
> >>
> >> # Choose between ARM/Thumb instruction sets diff --git
> >> a/arch/arm/include/asm/u-boot.h
> > b/arch/arm/include/asm/u-boot.h
> >> index 2ba98bc..8e7e27b 100644 ---
> >> a/arch/arm/include/asm/u-boot.h +++
> >> b/arch/arm/include/asm/u-boot.h @@ -36,6 +36,12 @@ #ifndef
> >> _U_BOOT_H_ #define _U_BOOT_H_     1
> >>
> >> +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which
> >> requires a unified bd_info */ +#include <asm-generic/u-boot.h>
> >> +#else + +#ifndef __ASSEMBLY__ typedef struct bd_info { unsigned
> >> int    bi_baudrate;    /* serial console baudrate */ ulong
> >> bi_arch_number; /* unique id for this board */ @@ -49,6 +55,9 @@
> >> typedef struct bd_info { ulong size; }
> >> bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#endif + +#endif /*
> >> nCONFIG_SYS_GENERIC_BOARD */
> >
> > Typo?
> >
> >
> > The 'n' is intended to mean 'not'. Perhaps I should use ! instead?
>
> !CONFIG is the style of the rest of the codebase.  Thanks.
>

OK, I will resend the affected patch(es).

Regards,
Simon

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-03-11 16:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-08 23:45 [U-Boot] [PATCH v8 07/31] __HAVE_ARCH_GENERIC_BOARD controls availabilty of generic board Simon Glass
2013-03-08 23:45 ` [U-Boot] [PATCH v8 13/31] arm: Enable generic board support Simon Glass
2013-03-09 12:31   ` Otavio Salvador
2013-03-09 18:30     ` Simon Glass
2013-03-09 19:06       ` Otavio Salvador
2013-03-10 13:27       ` Tom Rini
2013-03-11 16:17         ` Simon Glass
2013-03-08 23:45 ` [U-Boot] [PATCH v8 17/31] ppc: " Simon Glass
2013-03-08 23:45 ` [U-Boot] [PATCH v8 21/31] x86: " Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox