diff mbox

[U-Boot,RFC,v0,3/4] vexpress_aemv8a.h: Clean up the config

Message ID 1399303581-29975-4-git-send-email-trini@ti.com
State RFC
Headers show

Commit Message

Tom Rini May 5, 2014, 3:26 p.m. UTC
- Drop DEBUG
- Drop defines we can use the default of.
- Drop CONFIG_GICV3 and related defines, we aren't using interrupts and
  do not need to configure the interrupt controller.
- Provide a larger malloc pool.
- Correct default locations for kernel / initrd / device tree

Signed-off-by: Tom Rini <trini@ti.com>
---
 include/configs/vexpress_aemv8a.h |   26 +++++---------------------
 1 file changed, 5 insertions(+), 21 deletions(-)

Comments

Rob Herring May 14, 2014, 1:44 a.m. UTC | #1
On Mon, May 5, 2014 at 10:26 AM, Tom Rini <trini@ti.com> wrote:
> - Drop DEBUG
> - Drop defines we can use the default of.
> - Drop CONFIG_GICV3 and related defines, we aren't using interrupts and
>   do not need to configure the interrupt controller.
> - Provide a larger malloc pool.
> - Correct default locations for kernel / initrd / device tree
>
> Signed-off-by: Tom Rini <trini@ti.com>
> ---

[...]

> -#define CONFIG_GICV3
> -
>  /*#define CONFIG_ARMV8_SWITCH_TO_EL1*/
>
>  /*#define CONFIG_SYS_GENERIC_BOARD*/
> @@ -94,20 +90,11 @@
>  /* Generic Timer Definitions */
>  #define COUNTER_FREQUENCY              (0x1800000)     /* 24MHz */
>
> -/* Generic Interrupt Controller Definitions */
> -#ifdef CONFIG_GICV3
> -#define GICD_BASE                      (0x2f000000)
> -#define GICR_BASE                      (0x2f100000)
> -#else
> -#define GICD_BASE                      (0x2C001000)
> -#define GICC_BASE                      (0x2C002000)
> -#endif

IIRC, these should be needed if secure to non-secure switching is done.

>  #define CONFIG_SYS_MEMTEST_START       V2M_BASE
>  #define CONFIG_SYS_MEMTEST_END         (V2M_BASE + 0x80000000)
>
>  /* Size of malloc() pool */
> -#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128 * 1024)
> +#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (8 << 20))

This seems like another candidate for some sane default value.

>  /* SMSC91C111 Ethernet Configuration */
>  #define CONFIG_SMC91111                        1
> @@ -121,7 +108,6 @@
>  #define CONFIG_CONS_INDEX              0
>
>  #define CONFIG_BAUDRATE                        115200
> -#define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
>  #define CONFIG_SYS_SERIAL0             V2M_UART0
>  #define CONFIG_SYS_SERIAL1             V2M_UART1
>
> @@ -166,10 +152,9 @@
>
>  /* Initial environment variables */
>  #define CONFIG_EXTRA_ENV_SETTINGS      \
> -                                       "kernel_addr=0x200000\0"        \
> -                                       "initrd_addr=0xa00000\0"        \
> -                                       "initrd_size=0x2000000\0"       \
> -                                       "fdt_addr=0x100000\0"           \
> +                                       "kernel_addr=0x80080000\0"      \
> +                                       "initrd_addr=0x90000000\0"      \
> +                                       "fdt_addr=0x88000000\0"         \

Don't we want the _r variants here?

Rob
Tom Rini May 14, 2014, 4:35 p.m. UTC | #2
On Tue, May 13, 2014 at 08:44:01PM -0500, Rob Herring wrote:
> On Mon, May 5, 2014 at 10:26 AM, Tom Rini <trini@ti.com> wrote:
> > - Drop DEBUG
> > - Drop defines we can use the default of.
> > - Drop CONFIG_GICV3 and related defines, we aren't using interrupts and
> >   do not need to configure the interrupt controller.
> > - Provide a larger malloc pool.
> > - Correct default locations for kernel / initrd / device tree
> >
> > Signed-off-by: Tom Rini <trini@ti.com>
> > ---
> 
> [...]
> 
> > -#define CONFIG_GICV3
> > -
> >  /*#define CONFIG_ARMV8_SWITCH_TO_EL1*/
> >
> >  /*#define CONFIG_SYS_GENERIC_BOARD*/
> > @@ -94,20 +90,11 @@
> >  /* Generic Timer Definitions */
> >  #define COUNTER_FREQUENCY              (0x1800000)     /* 24MHz */
> >
> > -/* Generic Interrupt Controller Definitions */
> > -#ifdef CONFIG_GICV3
> > -#define GICD_BASE                      (0x2f000000)
> > -#define GICR_BASE                      (0x2f100000)
> > -#else
> > -#define GICD_BASE                      (0x2C001000)
> > -#define GICC_BASE                      (0x2C002000)
> > -#endif
> 
> IIRC, these should be needed if secure to non-secure switching is done.

Not something I can test so OK, I'll put that back next go-round.

> >  #define CONFIG_SYS_MEMTEST_START       V2M_BASE
> >  #define CONFIG_SYS_MEMTEST_END         (V2M_BASE + 0x80000000)
> >
> >  /* Size of malloc() pool */
> > -#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128 * 1024)
> > +#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (8 << 20))
> 
> This seems like another candidate for some sane default value.

Well, the previous value was relatively sane.  It only needs bumping up
beyond env + a bit of room if you:
- Have UBI/UBIFS
- Expect to use a decompressor.

The latter isn't that common, but if we start doing Image.gz more often
might be.  But it'll also be worth some quick benchmarking to see if
it's any sort of time win or not.

> >  /* SMSC91C111 Ethernet Configuration */
> >  #define CONFIG_SMC91111                        1
> > @@ -121,7 +108,6 @@
> >  #define CONFIG_CONS_INDEX              0
> >
> >  #define CONFIG_BAUDRATE                        115200
> > -#define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
> >  #define CONFIG_SYS_SERIAL0             V2M_UART0
> >  #define CONFIG_SYS_SERIAL1             V2M_UART1
> >
> > @@ -166,10 +152,9 @@
> >
> >  /* Initial environment variables */
> >  #define CONFIG_EXTRA_ENV_SETTINGS      \
> > -                                       "kernel_addr=0x200000\0"        \
> > -                                       "initrd_addr=0xa00000\0"        \
> > -                                       "initrd_size=0x2000000\0"       \
> > -                                       "fdt_addr=0x100000\0"           \
> > +                                       "kernel_addr=0x80080000\0"      \
> > +                                       "initrd_addr=0x90000000\0"      \
> > +                                       "fdt_addr=0x88000000\0"         \
> 
> Don't we want the _r variants here?

Good point, need to sanitize that wrt doc/README.pxe and such.
diff mbox

Patch

diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
index dff6adc..ae0ee1b 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -8,12 +8,8 @@ 
 #ifndef __VEXPRESS_AEMV8A_H
 #define __VEXPRESS_AEMV8A_H
 
-#define DEBUG
-
 #define CONFIG_REMAKE_ELF
 
-#define CONFIG_GICV3
-
 /*#define CONFIG_ARMV8_SWITCH_TO_EL1*/
 
 /*#define CONFIG_SYS_GENERIC_BOARD*/
@@ -94,20 +90,11 @@ 
 /* Generic Timer Definitions */
 #define COUNTER_FREQUENCY		(0x1800000)	/* 24MHz */
 
-/* Generic Interrupt Controller Definitions */
-#ifdef CONFIG_GICV3
-#define GICD_BASE			(0x2f000000)
-#define GICR_BASE			(0x2f100000)
-#else
-#define GICD_BASE			(0x2C001000)
-#define GICC_BASE			(0x2C002000)
-#endif
-
 #define CONFIG_SYS_MEMTEST_START	V2M_BASE
 #define CONFIG_SYS_MEMTEST_END		(V2M_BASE + 0x80000000)
 
 /* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128 * 1024)
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (8 << 20))
 
 /* SMSC91C111 Ethernet Configuration */
 #define CONFIG_SMC91111			1
@@ -121,7 +108,6 @@ 
 #define CONFIG_CONS_INDEX		0
 
 #define CONFIG_BAUDRATE			115200
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
 #define CONFIG_SYS_SERIAL0		V2M_UART0
 #define CONFIG_SYS_SERIAL1		V2M_UART1
 
@@ -166,10 +152,9 @@ 
 
 /* Initial environment variables */
 #define CONFIG_EXTRA_ENV_SETTINGS	\
-					"kernel_addr=0x200000\0"	\
-					"initrd_addr=0xa00000\0"	\
-					"initrd_size=0x2000000\0"	\
-					"fdt_addr=0x100000\0"		\
+					"kernel_addr=0x80080000\0"	\
+					"initrd_addr=0x90000000\0"	\
+					"fdt_addr=0x88000000\0"		\
 					"fdt_high=0xa0000000\0"
 
 #define CONFIG_BOOTARGS			"console=ttyAMA0 root=/dev/ram0"
@@ -187,10 +172,9 @@ 
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_HUSH_PARSER
-#define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 #define CONFIG_SYS_LONGHELP
-#define CONFIG_CMDLINE_EDITING		1
+#define CONFIG_CMDLINE_EDITING
 #define CONFIG_SYS_MAXARGS		64	/* max command args */
 
 #endif /* __VEXPRESS_AEMV8A_H */