[U-Boot] [PATCH 1/5] board/BuR: drop ETH-support in SPL-Stage

During very early prototype-phase we did boot the AM335x boards initially from CPSW-EMAC.
Now we don't need this feature anymore.
So we drop it to save MLO-space and having therefore a more quickly boot.
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at ---
board/BuR/common/common.c | 9 ++------- include/configs/bur_am335x_common.h | 4 ---- 2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index 441465c..ce4acc1 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -12,7 +12,6 @@ #include <version.h> #include <common.h> #include <errno.h> -#include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> #include <asm/arch/omap.h> @@ -640,8 +639,7 @@ static struct cpsw_platform_data cpsw_data = { }; #endif /* CONFIG_DRIVER_TI_CPSW, ... */
-#if defined(CONFIG_DRIVER_TI_CPSW) - +#if defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD) int board_eth_init(bd_t *bis) { int rv = 0; @@ -658,8 +656,6 @@ int board_eth_init(bd_t *bis) mac_addr[4] = mac_lo & 0xFF; mac_addr[5] = (mac_lo & 0xFF00) >> 8;
-#if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \ - (defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD)) if (!getenv("ethaddr")) { #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_USE_FDT) printf("<ethaddr> not set. trying DTB ... "); @@ -685,10 +681,9 @@ int board_eth_init(bd_t *bis) printf("Error %d registering CPSW switch\n", rv); return 0; } -#endif /* CONFIG_DRIVER_TI_CPSW, ... */ return rv; } -#endif /* CONFIG_DRIVER_TI_CPSW */ +#endif /* defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD) */ #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD) int board_mmc_init(bd_t *bis) { diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h index ffc6811..e666933 100644 --- a/include/configs/bur_am335x_common.h +++ b/include/configs/bur_am335x_common.h @@ -62,12 +62,8 @@ #define CONFIG_CMD_PING #define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ #define CONFIG_MII /* Required in net/eth.c */ -#define CONFIG_SPL_ETH_SUPPORT #define CONFIG_PHYLIB #define CONFIG_PHY_NATSEMI -#define CONFIG_SPL_NET_SUPPORT -#define CONFIG_SPL_ENV_SUPPORT /* used for a fetching MAC-Address */ -#define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL" /* Network console */ #define CONFIG_NETCONSOLE 1 #define CONFIG_BOOTP_MAY_FAIL /* if we don't have DHCP environment */

There is no need to have some specific prompt, so we drop this within defconfigs.
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at ---
configs/kwb_defconfig | 1 - configs/tseries_mmc_defconfig | 1 - configs/tseries_nand_defconfig | 1 - configs/tseries_spi_defconfig | 1 - 4 files changed, 4 deletions(-)
diff --git a/configs/kwb_defconfig b/configs/kwb_defconfig index 10d39eb..7bdc6b6 100644 --- a/configs/kwb_defconfig +++ b/configs/kwb_defconfig @@ -2,7 +2,6 @@ CONFIG_ARM=y CONFIG_TARGET_KWB=y CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1" -CONFIG_SYS_PROMPT="U-Boot (BuR V2.0)# " # CONFIG_CMD_BOOTD is not set # CONFIG_CMD_BOOTM is not set # CONFIG_CMD_GO is not set diff --git a/configs/tseries_mmc_defconfig b/configs/tseries_mmc_defconfig index 7518774..15cfab4 100644 --- a/configs/tseries_mmc_defconfig +++ b/configs/tseries_mmc_defconfig @@ -2,7 +2,6 @@ CONFIG_ARM=y CONFIG_TARGET_TSERIES=y CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,EMMC_BOOT" -CONFIG_SYS_PROMPT="U-Boot (BuR V2.0)# " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set # CONFIG_CMD_XIMG is not set diff --git a/configs/tseries_nand_defconfig b/configs/tseries_nand_defconfig index 65d514a..b75efd6 100644 --- a/configs/tseries_nand_defconfig +++ b/configs/tseries_nand_defconfig @@ -2,7 +2,6 @@ CONFIG_ARM=y CONFIG_TARGET_TSERIES=y CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND" -CONFIG_SYS_PROMPT="U-Boot (BuR V2.0)# " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set # CONFIG_CMD_XIMG is not set diff --git a/configs/tseries_spi_defconfig b/configs/tseries_spi_defconfig index 11e4e6b..0390691 100644 --- a/configs/tseries_spi_defconfig +++ b/configs/tseries_spi_defconfig @@ -2,7 +2,6 @@ CONFIG_ARM=y CONFIG_TARGET_TSERIES=y CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,SPI_BOOT,EMMC_BOOT" -CONFIG_SYS_PROMPT="U-Boot (BuR V2.0)# " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set # CONFIG_CMD_XIMG is not set

On Fri, Feb 19, 2016 at 12:09:43PM +0100, Hannes Schmelzer wrote:
There is no need to have some specific prompt, so we drop this within defconfigs.
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at
Reviewed-by: Tom Rini trini@konsulko.com

On Fri, Feb 19, 2016 at 12:09:43PM +0100, Hannes Schmelzer wrote:
There is no need to have some specific prompt, so we drop this within defconfigs.
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

We drop everything possible things from board headerfiles and replace this functionality with responsible settings in Kconfig (_defconfig).
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at ---
configs/kwb_defconfig | 10 ++++++++++ configs/tseries_mmc_defconfig | 10 ++++++++++ configs/tseries_nand_defconfig | 11 +++++++++++ configs/tseries_spi_defconfig | 13 +++++++++++++ include/configs/bur_am335x_common.h | 6 ------ include/configs/kwb.h | 7 ------- include/configs/tseries.h | 9 --------- 7 files changed, 44 insertions(+), 22 deletions(-)
diff --git a/configs/kwb_defconfig b/configs/kwb_defconfig index 7bdc6b6..4d2aa6c 100644 --- a/configs/kwb_defconfig +++ b/configs/kwb_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_TARGET_KWB=y CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1" +CONFIG_HUSH_PARSER=y # CONFIG_CMD_BOOTD is not set # CONFIG_CMD_BOOTM is not set # CONFIG_CMD_GO is not set @@ -13,9 +14,18 @@ CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1" # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set # CONFIG_CMD_FLASH is not set +CONFIG_CMD_I2C=y +CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set CONFIG_CMD_GPIO=y # CONFIG_CMD_ITEST is not set # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y # CONFIG_CMD_NFS is not set +CONFIG_CMD_PING=y +CONFIG_CMD_TIME=y +CONFIG_NETCONSOLE=y CONFIG_SYS_NS16550=y +CONFIG_USB=y +CONFIG_USB_MUSB_HOST=y +CONFIG_USB_STORAGE=y diff --git a/configs/tseries_mmc_defconfig b/configs/tseries_mmc_defconfig index 15cfab4..168e379 100644 --- a/configs/tseries_mmc_defconfig +++ b/configs/tseries_mmc_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_TARGET_TSERIES=y CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,EMMC_BOOT" +CONFIG_HUSH_PARSER=y # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set # CONFIG_CMD_XIMG is not set @@ -10,9 +11,18 @@ CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,EMMC_BOOT" # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set # CONFIG_CMD_FLASH is not set +CONFIG_CMD_I2C=y +CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set CONFIG_CMD_GPIO=y # CONFIG_CMD_ITEST is not set # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y # CONFIG_CMD_NFS is not set +CONFIG_CMD_PING=y +CONFIG_CMD_TIME=y +CONFIG_NETCONSOLE=y CONFIG_SYS_NS16550=y +CONFIG_USB=y +CONFIG_USB_MUSB_HOST=y +CONFIG_USB_STORAGE=y diff --git a/configs/tseries_nand_defconfig b/configs/tseries_nand_defconfig index b75efd6..8151caf 100644 --- a/configs/tseries_nand_defconfig +++ b/configs/tseries_nand_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_TARGET_TSERIES=y CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND" +CONFIG_HUSH_PARSER=y # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set # CONFIG_CMD_XIMG is not set @@ -10,9 +11,19 @@ CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND" # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set # CONFIG_CMD_FLASH is not set +CONFIG_CMD_NAND=y +CONFIG_CMD_I2C=y +CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set CONFIG_CMD_GPIO=y # CONFIG_CMD_ITEST is not set # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y # CONFIG_CMD_NFS is not set +CONFIG_CMD_PING=y +CONFIG_CMD_TIME=y +CONFIG_NETCONSOLE=y CONFIG_SYS_NS16550=y +CONFIG_USB=y +CONFIG_USB_MUSB_HOST=y +CONFIG_USB_STORAGE=y diff --git a/configs/tseries_spi_defconfig b/configs/tseries_spi_defconfig index 0390691..901c55e 100644 --- a/configs/tseries_spi_defconfig +++ b/configs/tseries_spi_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_TARGET_TSERIES=y CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,SPI_BOOT,EMMC_BOOT" +CONFIG_HUSH_PARSER=y # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set # CONFIG_CMD_XIMG is not set @@ -10,11 +11,23 @@ CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,SPI_BOOT,EMMC_BOOT" # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set # CONFIG_CMD_FLASH is not set +CONFIG_CMD_SF=y +CONFIG_CMD_SPI=y +CONFIG_CMD_I2C=y +CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set CONFIG_CMD_GPIO=y # CONFIG_CMD_ITEST is not set # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y # CONFIG_CMD_NFS is not set +CONFIG_CMD_PING=y +CONFIG_CMD_TIME=y +CONFIG_NETCONSOLE=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y +# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_SYS_NS16550=y +CONFIG_USB=y +CONFIG_USB_MUSB_HOST=y +CONFIG_USB_STORAGE=y diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h index e666933..8429cf5 100644 --- a/include/configs/bur_am335x_common.h +++ b/include/configs/bur_am335x_common.h @@ -24,7 +24,6 @@ "setenv stdout nc;setenv stdin nc;setenv stderr nc\0"
#define CONFIG_PREBOOT "run brdefaultip" -#define CONFIG_CMD_TIME
#define CONFIG_AM33XX @@ -53,19 +52,16 @@ #define CONFIG_BAUDRATE 115200
/* Network defines */ -#define CONFIG_CMD_DHCP #define CONFIG_BOOTP_DNS /* Configurable parts of CMD_DHCP */ #define CONFIG_BOOTP_SEND_HOSTNAME #define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_SUBNETMASK #define CONFIG_NET_RETRY_COUNT 2 -#define CONFIG_CMD_PING #define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ #define CONFIG_MII /* Required in net/eth.c */ #define CONFIG_PHYLIB #define CONFIG_PHY_NATSEMI /* Network console */ -#define CONFIG_NETCONSOLE 1 #define CONFIG_BOOTP_MAY_FAIL /* if we don't have DHCP environment */ /* * SPL related defines. The Public RAM memory map the ROM defines the @@ -105,7 +101,6 @@ #define CONFIG_SYS_OMAP24_I2C_SPEED 100000 #define CONFIG_SYS_OMAP24_I2C_SLAVE 1 #define CONFIG_SYS_I2C_OMAP24XX -#define CONFIG_CMD_I2C /* GPIO */ #define CONFIG_OMAP_GPIO /* @@ -119,7 +114,6 @@ * console baudrate of 115200 and use the default baud rate table. */ #define CONFIG_SYS_MALLOC_LEN (5120 << 10) -#define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_ENV_OVERWRITE /* Overwrite ethaddr / serial# */ #define CONFIG_SYS_CONSOLE_IS_IN_ENV diff --git a/include/configs/kwb.h b/include/configs/kwb.h index 45253b8..e570c71 100644 --- a/include/configs/kwb.h +++ b/include/configs/kwb.h @@ -106,7 +106,6 @@ BUR_COMMON_ENV \ #undef CONFIG_BOOTM_NETBSD #undef CONFIG_BOOTM_PLAN9 #undef CONFIG_BOOTM_RTEMS -#undef CONFIG_CMD_CRC32
/* Support both device trees and ATAGs. */ #define CONFIG_OF_LIBFDT @@ -122,17 +121,11 @@ BUR_COMMON_ENV \ #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT /* attention! not only for gadget, enables also highspeed in hostmode */ #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_MUSB_HOST #define CONFIG_AM335X_USB0 #define CONFIG_AM335X_USB0_MODE MUSB_HOST #define CONFIG_AM335X_USB1 #define CONFIG_AM335X_USB1_MODE MUSB_HOST
-#ifdef CONFIG_USB_MUSB_HOST -#define CONFIG_CMD_USB -#define CONFIG_USB_STORAGE -#endif /* CONFIG_USB_MUSB_HOST */ - #undef CONFIG_ENV_IS_NOWHERE #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 diff --git a/include/configs/tseries.h b/include/configs/tseries.h index 93e3454..2d352ed 100644 --- a/include/configs/tseries.h +++ b/include/configs/tseries.h @@ -204,7 +204,6 @@ MMCARGS #define CONFIG_SYS_MAX_NAND_DEVICE 1 #define CONFIG_SYS_NAND_BASE 0x8000000 #define CONFIG_NAND_OMAP_GPMC -#define CONFIG_CMD_NAND /* don't change OMAP_ELM, ECCSCHEME. ROM code only supports this */ #define CONFIG_NAND_OMAP_ELM #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW @@ -249,23 +248,15 @@ MMCARGS #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT /* attention! not only for gadget, enables also highspeed in hostmode */ #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_MUSB_HOST #define CONFIG_AM335X_USB0 #define CONFIG_AM335X_USB0_MODE MUSB_HOST #define CONFIG_AM335X_USB1 #define CONFIG_AM335X_USB1_MODE MUSB_HOST
-#ifdef CONFIG_USB_MUSB_HOST -#define CONFIG_CMD_USB -#define CONFIG_USB_STORAGE -#endif /* CONFIG_USB_MUSB_HOST */ - #if defined(CONFIG_SPI_BOOT) /* McSPI IP block */ #define CONFIG_SPI #define CONFIG_OMAP3_SPI -#define CONFIG_CMD_SPI -#define CONFIG_CMD_SF #define CONFIG_SF_DEFAULT_SPEED 24000000
#define CONFIG_SPL_SPI_SUPPORT

On Fri, Feb 19, 2016 at 12:09:44PM +0100, Hannes Schmelzer wrote:
We drop everything possible things from board headerfiles and replace this functionality with responsible settings in Kconfig (_defconfig).
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at
Reviewed-by: Tom Rini trini@konsulko.com

On Fri, Feb 19, 2016 at 12:09:44PM +0100, Hannes Schmelzer wrote:
We drop everything possible things from board headerfiles and replace this functionality with responsible settings in Kconfig (_defconfig).
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

bur_am335x_common.h today holds all common configuration which is shared over all B&R boards.
In future we want to bring up boards which are not based on AM335x only but we still want to have common configuration over all B&R boards independent from their architecture.
To prepare this we introduce a new file "bur_cfg_common.h", where we move all common things, which are not architecture specific, from bur_am335x_common.h.
On B&R am335x boards we include from now:
#include <configs/bur_cfg_common.h> #include <configs/bur_am335x_common.h>
On other B&R boards, we include only #include <configs/bur_cfg_common.h>
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at ---
include/configs/bur_am335x_common.h | 57 ++------------------------------- include/configs/bur_cfg_common.h | 64 +++++++++++++++++++++++++++++++++++++ include/configs/kwb.h | 4 +++ include/configs/tseries.h | 5 +++ 4 files changed, 75 insertions(+), 55 deletions(-) create mode 100644 include/configs/bur_cfg_common.h
diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h index 8429cf5..a94b1e2 100644 --- a/include/configs/bur_am335x_common.h +++ b/include/configs/bur_am335x_common.h @@ -3,7 +3,7 @@ * * common parts used by B&R AM335x based boards * - * Copyright (C) 2013 Hannes Schmelzer oe5hpm@oevsv.at - + * Copyright (C) 2016 Hannes Schmelzer oe5hpm@oevsv.at - * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com * * SPDX-License-Identifier: GPL-2.0+ @@ -12,24 +12,9 @@ #ifndef __BUR_AM335X_COMMON_H__ #define __BUR_AM335X_COMMON_H__ /* ------------------------------------------------------------------------- */ -#define BUR_COMMON_ENV \ -"usbscript=usb start && fatload usb 0 0x80000000 usbscript.img && source\0" \ -"brdefaultip=if test -r ${ipaddr}; then; else" \ -" setenv ipaddr 192.168.60.1; setenv serverip 192.168.60.254;" \ -" setenv gatewayip 192.168.60.254; setenv netmask 255.255.255.0; fi;\0" \ -"netconsole=echo switching to network console ...; " \ -"if dhcp; then; else run brdefaultip; fi; setenv ncip ${serverip}; " \ -"setcurs 1 9; lcdputs myip; setcurs 10 9; lcdputs ${ipaddr};" \ -"setcurs 1 10;lcdputs serverip; setcurs 10 10; lcdputs ${serverip};" \ -"setenv stdout nc;setenv stdin nc;setenv stderr nc\0" - -#define CONFIG_PREBOOT "run brdefaultip" - - #define CONFIG_AM33XX #define CONFIG_OMAP #define CONFIG_OMAP_COMMON -#define CONFIG_BOARD_LATE_INIT #define CONFIG_SYS_CACHELINE_SIZE 64 #define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1GB */
@@ -52,17 +37,11 @@ #define CONFIG_BAUDRATE 115200
/* Network defines */ -#define CONFIG_BOOTP_DNS /* Configurable parts of CMD_DHCP */ -#define CONFIG_BOOTP_SEND_HOSTNAME -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_NET_RETRY_COUNT 2 #define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ #define CONFIG_MII /* Required in net/eth.c */ #define CONFIG_PHYLIB #define CONFIG_PHY_NATSEMI -/* Network console */ -#define CONFIG_BOOTP_MAY_FAIL /* if we don't have DHCP environment */ + /* * SPL related defines. The Public RAM memory map the ROM defines the * area between 0x402F0400 and 0x4030B800 as a download area and @@ -103,38 +82,6 @@ #define CONFIG_SYS_I2C_OMAP24XX /* GPIO */ #define CONFIG_OMAP_GPIO -/* - * ---------------------------------------------------------------------------- - * The following are general good-enough settings for U-Boot. We set a - * large malloc pool as we generally have a lot of DDR, and we opt for - * function over binary size in the main portion of U-Boot as this is - * generally easily constrained later if needed. We enable the config - * options that give us information in the environment about what board - * we are on so we do not need to rely on the command prompt. We set a - * console baudrate of 115200 and use the default baud rate table. - */ -#define CONFIG_SYS_MALLOC_LEN (5120 << 10) -#define CONFIG_SYS_CONSOLE_INFO_QUIET -#define CONFIG_ENV_OVERWRITE /* Overwrite ethaddr / serial# */ -#define CONFIG_SYS_CONSOLE_IS_IN_ENV -#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE - -/* As stated above, the following choices are optional. */ -#define CONFIG_SYS_LONGHELP -#define CONFIG_AUTO_COMPLETE -#define CONFIG_CMDLINE_EDITING -#define CONFIG_VERSION_VARIABLE - -/* We set the max number of command args high to avoid HUSH bugs. */ -#define CONFIG_SYS_MAXARGS 64 - -/* Console I/O Buffer Size */ -#define CONFIG_SYS_CBSIZE 512 -/* Print Buffer Size */ -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE +\ - sizeof(CONFIG_SYS_PROMPT) + 16) -/* Boot Argument Buffer Size */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
/* * Our platforms make use of SPL to initalize the hardware (primarily diff --git a/include/configs/bur_cfg_common.h b/include/configs/bur_cfg_common.h new file mode 100644 index 0000000..f183775 --- /dev/null +++ b/include/configs/bur_cfg_common.h @@ -0,0 +1,64 @@ +/* + * bur_cfg_common.h + * + * common parts used over all B&R boards + * + * Copyright (C) 2016 Hannes Schmelzer oe5hpm@oevsv.at - + * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __BUR_CFG_COMMON_H__ +#define __BUR_CFG_COMMON_H__ +/* ------------------------------------------------------------------------- */ +#define BUR_COMMON_ENV \ +"usbscript=usb start && fatload usb 0 ${scradr} usbscript.img &&" \ +" source ${scradr}\0" \ +"brdefaultip=if test -r ${ipaddr}; then; else" \ +" setenv ipaddr 192.168.60.1; setenv serverip 192.168.60.254;" \ +" setenv gatewayip 192.168.60.254; setenv netmask 255.255.255.0; fi;\0" \ +"netconsole=echo switching to network console ...; " \ +"if dhcp; then; else run brdefaultip; fi; setenv ncip ${serverip}; " \ +"setcurs 1 9; lcdputs myip; setcurs 10 9; lcdputs ${ipaddr};" \ +"setcurs 1 10;lcdputs serverip; setcurs 10 10; lcdputs ${serverip};" \ +"setenv stdout nc;setenv stdin nc;setenv stderr nc\0" + +#define CONFIG_PREBOOT "run cfgscr; run brdefaultip" + +#define CONFIG_BOARD_LATE_INIT + +/* Network defines */ +#define CONFIG_BOOTP_DNS /* Configurable parts of CMD_DHCP */ +#define CONFIG_BOOTP_SEND_HOSTNAME +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_SUBNETMASK +#define CONFIG_NET_RETRY_COUNT 2 + +/* Network console */ +#define CONFIG_NETCONSOLE 1 +#define CONFIG_BOOTP_MAY_FAIL /* if we don't have DHCP environment */ + +#define CONFIG_SYS_CONSOLE_INFO_QUIET +#define CONFIG_ENV_OVERWRITE /* Overwrite ethaddr / serial# */ +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE + +/* As stated above, the following choices are optional. */ +#define CONFIG_SYS_LONGHELP +#define CONFIG_AUTO_COMPLETE +#define CONFIG_CMDLINE_EDITING +#define CONFIG_VERSION_VARIABLE + +/* We set the max number of command args high to avoid HUSH bugs. */ +#define CONFIG_SYS_MAXARGS 64 + +/* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 512 +/* Print Buffer Size */ +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE +\ + sizeof(CONFIG_SYS_PROMPT) + 16) +/* Boot Argument Buffer Size */ +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE + +#endif /* __BUR_CFG_COMMON_H__ */ diff --git a/include/configs/kwb.h b/include/configs/kwb.h index e570c71..b39bcfa 100644 --- a/include/configs/kwb.h +++ b/include/configs/kwb.h @@ -12,6 +12,7 @@ #ifndef __CONFIG_KWB_H__ #define __CONFIG_KWB_H__
+#include <configs/bur_cfg_common.h> #include <configs/bur_am335x_common.h> /* ------------------------------------------------------------------------- */ #define CONFIG_AM335X_LCD @@ -27,6 +28,9 @@ #define CONFIG_BMP_24BMP #define CONFIG_BMP_32BPP
+/* memory */ +#define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024) + /* Clock Defines */ #define V_OSCK 26000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK) diff --git a/include/configs/tseries.h b/include/configs/tseries.h index 2d352ed..43cf965 100644 --- a/include/configs/tseries.h +++ b/include/configs/tseries.h @@ -12,6 +12,7 @@ #ifndef __CONFIG_TSERIES_H__ #define __CONFIG_TSERIES_H__
+#include <configs/bur_cfg_common.h> #include <configs/bur_am335x_common.h> /* ------------------------------------------------------------------------- */ #define CONFIG_AM335X_LCD @@ -30,6 +31,10 @@ #define CONFIG_SYS_BOOTCOUNT_ADDR 0x44E3E000 #define CONFIG_BOOTCOUNT_LIMIT #define CONFIG_BOOTCOUNT_AM33XX + +/* memory */ +#define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024) + /* Clock Defines */ #define V_OSCK 26000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK)

On Fri, Feb 19, 2016 at 12:09:45PM +0100, Hannes Schmelzer wrote:
bur_am335x_common.h today holds all common configuration which is shared over all B&R boards.
In future we want to bring up boards which are not based on AM335x only but we still want to have common configuration over all B&R boards independent from their architecture.
To prepare this we introduce a new file "bur_cfg_common.h", where we move all common things, which are not architecture specific, from bur_am335x_common.h.
On B&R am335x boards we include from now:
#include <configs/bur_cfg_common.h> #include <configs/bur_am335x_common.h>
On other B&R boards, we include only #include <configs/bur_cfg_common.h>
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at
Reviewed-by: Tom Rini trini@konsulko.com

On Fri, Feb 19, 2016 at 12:09:45PM +0100, Hannes Schmelzer wrote:
bur_am335x_common.h today holds all common configuration which is shared over all B&R boards.
In future we want to bring up boards which are not based on AM335x only but we still want to have common configuration over all B&R boards independent from their architecture.
To prepare this we introduce a new file "bur_cfg_common.h", where we move all common things, which are not architecture specific, from bur_am335x_common.h.
On B&R am335x boards we include from now:
#include <configs/bur_cfg_common.h> #include <configs/bur_am335x_common.h>
On other B&R boards, we include only #include <configs/bur_cfg_common.h>
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

- fixup typo - fixup identation
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at
---
include/configs/kwb.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/configs/kwb.h b/include/configs/kwb.h index b39bcfa..60e6496 100644 --- a/include/configs/kwb.h +++ b/include/configs/kwb.h @@ -107,9 +107,9 @@ BUR_COMMON_ENV \ #define CONFIG_BOOTDELAY 0
/* undefine command which we not need here */ -#undef CONFIG_BOOTM_NETBSD -#undef CONFIG_BOOTM_PLAN9 -#undef CONFIG_BOOTM_RTEMS +#undef CONFIG_BOOTM_NETBSD +#undef CONFIG_BOOTM_PLAN9 +#undef CONFIG_BOOTM_RTEMS
/* Support both device trees and ATAGs. */ #define CONFIG_OF_LIBFDT @@ -148,4 +148,4 @@ BUR_COMMON_ENV \ #define CONFIG_CMD_FS_GENERIC #endif /* CONFIG_MMC, ... */
-#endif /* ! __CONFIG_TSERIES_H__ */ +#endif /* __CONFIG_KWB_H__ */

On Fri, Feb 19, 2016 at 12:09:46PM +0100, Hannes Schmelzer wrote:
- fixup typo
- fixup identation
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at
Reviewed-by: Tom Rini trini@konsulko.com

On Fri, Feb 19, 2016 at 12:09:46PM +0100, Hannes Schmelzer wrote:
- fixup typo
- fixup identation
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

On Fri, Feb 19, 2016 at 12:09:42PM +0100, Hannes Schmelzer wrote:
During very early prototype-phase we did boot the AM335x boards initially from CPSW-EMAC.
Now we don't need this feature anymore.
So we drop it to save MLO-space and having therefore a more quickly boot.
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at
Reviewed-by: Tom Rini trini@konsulko.com

On Fri, Feb 19, 2016 at 12:09:42PM +0100, Hannes Schmelzer wrote:
During very early prototype-phase we did boot the AM335x boards initially from CPSW-EMAC.
Now we don't need this feature anymore.
So we drop it to save MLO-space and having therefore a more quickly boot.
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!
participants (2)
-
Hannes Schmelzer
-
Tom Rini