ARM: OMAP3: am3517_evm: Move header to ti_omap3_common.h
PATCH v2 1/2 ARM: OMAP3: am3517_evm: Move header to ti_omap3_common.h
Much of the AM3517 functions are copies of the standard definitions used in ti_omap3_common.h. Moving to include a common file reduces the amount of duplicative code and clutter. A few AM3517 specific functions (like EMIF4) are explictly defined and a few items are undefined or redefined, but overall the number of lines of code shink.
Tested-by Derald D. Woods <[email protected]>
Signed-off-by Adam Ford <[email protected]>
---
V2: Resync with 2017.09-RC4
include/configs/am3517_evm.h | 50 ++++++-------------------------------------- 1 file changed, 6 insertions(+), 44 deletions(-)
include/configs/am3517_evm.h +6 -44
@@ -14,7 +14,6 @@#define __CONFIG_H#define CONFIG_NR_DRAM_BANKS 2/* CS1 may or may not be populated */ -#define CONFIG_EMIF4 /* The chip has EMIF4 controller */ /*
@@ -27,39 +26,26 @@#define CONFIG_SYS_SPL_MALLOC_START 0x80208000#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 -#include <asm/arch/cpu.h> /* get chip and board defs */ -#include <asm/arch/omap.h> +#include <configs/ti_omap3_common.h> +#undef CONFIG_SDRC/* Disable SDRC since we have EMIF4 */ #define CONFIG_MISC_INIT_R -#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_INITRD_TAG #define CONFIG_REVISION_TAG -/* Clock Defines */ -#define V_OSCK 26000000/* Clock output from T2 */ -#define V_SCLK (V_OSCK >> 1) - -/* Size of malloc() pool */ -#define CONFIG_SYS_MALLOC_LEN (16 << 20) -/* Hardware drivers */ /* NS16550 Configuration */ -#define V_NS16550_CLK 48000000/* 48MHz (APLL96/2) */ #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE (-4) -#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK/* select serial console configuration */ #define CONFIG_CONS_INDEX 3#define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3#define CONFIG_SERIAL3 3/* UART3 on AM3517 EVM */ +/* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE -#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ - 115200}/* * USB configuration
@@ -103,15 +89,10 @@/* Board NAND Info. */ #ifdef CONFIG_NAND -#define CONFIG_NAND_OMAP_GPMC #define CONFIG_NAND_OMAP_GPMC_PREFETCH #define CONFIG_SYS_NAND_ADDR NAND_BASE/* physical address */ /* to access nand */ -#define CONFIG_SYS_NAND_BASE NAND_BASE/* physical address */ -/* to access */ -/* nand@CS0 */ -#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of */ -/* NAND devices */ +#define CONFIG_SYS_NAND_BUSWIDTH_16BIT #define CONFIG_SYS_NAND_5_ADDR_CYCLE #define CONFIG_SYS_NAND_PAGE_COUNT 64
@@ -231,35 +212,15 @@/* 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 -/* memtest works on */ #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ 0x01F00000)/* 31MB */ -#define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0)/* default load */ -/* address */ - -/* -* AM3517 has 12 GP timers, they can be driven by the system clock -* (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK). -* This rate is divided by a local divisor. -*/ -#define CONFIG_SYS_TIMERBASE OMAP34XX_GPT2 -#define CONFIG_SYS_PTV 2/* Divisor: 2^(PTV+1) => 8 */ -/* Physical Memory Map */ -#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 -#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1#define CONFIG_SYS_CS0_SIZE (256 * 1024 * 1024) -#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800#define CONFIG_SYS_INIT_RAM_SIZE 0x800 -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ - CONFIG_SYS_INIT_RAM_SIZE - \ - GENERATED_GBL_DATA_SIZE)/* FLASH and environment organization */
@@ -284,11 +245,12 @@/* Defines for SPL */ #define CONFIG_SPL_FRAMEWORK -#define CONFIG_SPL_NAND_SIMPLE +#undef CONFIG_SPL_TEXT_BASE#define CONFIG_SPL_TEXT_BASE 0x40200000#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ CONFIG_SPL_TEXT_BASE) +#undef CONFIG_SPL_BSS_START_ADDR#define CONFIG_SPL_BSS_START_ADDR 0x80000000#define CONFIG_SPL_BSS_MAX_SIZE 0x80000/* 512 KB */
Signature · 1 line
2.7.4
PATCH v2 2/2 omap3: am3517_evm: Enable TI_COMMON_CMD_OPTION
Enable TI_COMMON_CMD_OPTIONS and remove similar options from the defconfig. Updated with savedefconfig.
Tested-by Derald D. Woods <[email protected]>
Signed-off-by Adam Ford <[email protected]>
---
V2: Resync with 2017.09-RC4
board/logicpd/am3517evm/Kconfig | 2 ++ configs/am3517_evm_defconfig | 20 ++++++-------------- 2 files changed, 8 insertions(+), 14 deletions(-)
board/logicpd/am3517evm/Kconfig +2 -0
@@ -9,4 +9,6 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "am3517_evm" +source "board/ti/common/Kconfig" + endif
configs/am3517_evm_defconfig +6 -14
@@ -2,6 +2,7 @@ CONFIG_ARM=y # CONFIG_SYS_THUMB_BUILD is not set CONFIG_ARCH_OMAP2PLUS=y CONFIG_SYS_TEXT_BASE=0x80100000 +CONFIG_TI_COMMON_CMD_OPTIONS=y # CONFIG_SPL_GPIO_SUPPORT is not set CONFIG_TARGET_AM3517_EVM=y CONFIG_BOOTDELAY=10
@@ -11,27 +12,18 @@ CONFIG_SPL=y CONFIG_SPL_MTD_SUPPORT=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="AM3517_EVM # " -CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set -CONFIG_CMD_ASKENV=y +# CONFIG_CMD_EEPROM is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set -CONFIG_CMD_GPIO=y -CONFIG_CMD_I2C=y -CONFIG_CMD_MMC=y +# CONFIG_CMD_GPT is not set CONFIG_CMD_NAND=y -CONFIG_CMD_PART=y -CONFIG_CMD_USB=y +# CONFIG_CMD_SPI is not set # CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y +# CONFIG_CMD_MII is not set CONFIG_CMD_CACHE=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y -CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y +# CONFIG_CMD_TIME is not set CONFIG_CMD_UBI=y CONFIG_SPL_PARTITION_UUIDS=y CONFIG_ENV_IS_IN_NAND=y
Signature · 1 line
2.7.4