Merge tag 'arc-fixes-for-2019.04-rc1' of git://git.denx.de/u-boot-arc

A couple of trivial fixes and improvements for ARC

Most notable are:
 * Move of ENV_SIZE/ENV_OFFSET to Kconfig
 * Fix with private structure allocation for arc_uart
 * Definition of CONFIG_SYS_CACHELINE_SIZE useful for building drivers
This commit is contained in:
Tom Rini 2019-01-25 10:41:24 -05:00
commit 87f78478a4
14 changed files with 12 additions and 23 deletions

View File

@ -16,6 +16,9 @@
*/
#define ARCH_DMA_MINALIGN 128
/* CONFIG_SYS_CACHELINE_SIZE is used a lot in drivers */
#define CONFIG_SYS_CACHELINE_SIZE ARCH_DMA_MINALIGN
#if defined(ARC_MMU_ABSENT)
#define CONFIG_ARC_MMU_VER 0
#elif defined(CONFIG_ARC_MMU_V2)

View File

@ -87,7 +87,7 @@ const char *arc_em_version(int arcver, char *name, int name_len)
bool xymem = ARC_FEATURE_EXISTS(ARC_AUX_XY_BUILD);
int i;
for (i = 0; i++ < sizeof(em_versions) / sizeof(struct em_template_t);) {
for (i = 0; i < sizeof(em_versions) / sizeof(struct em_template_t); i++) {
if (em_versions[i].cache == cache &&
em_versions[i].dsp == dsp &&
em_versions[i].xymem == xymem) {
@ -147,7 +147,7 @@ const char *arc_hs_version(int arcver, char *name, int name_len)
bool dual_issue = arcver == 0x54 ? true : false;
int i;
for (i = 0; i++ < sizeof(hs_versions) / sizeof(struct hs_template_t);) {
for (i = 0; i < sizeof(hs_versions) / sizeof(struct hs_template_t); i++) {
if (hs_versions[i].cache == cache &&
hs_versions[i].mmu == mmu &&
hs_versions[i].dual_issue == dual_issue &&

View File

@ -3,6 +3,7 @@ CONFIG_ISA_ARCV2=y
CONFIG_CPU_ARCEM6=y
CONFIG_TARGET_EMSDP=y
CONFIG_SYS_TEXT_BASE=0x00000000
CONFIG_ENV_SIZE=0x1000
CONFIG_SYS_CLK_FREQ=40000000
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
CONFIG_VERSION_VARIABLE=y

View File

@ -5,6 +5,7 @@ CONFIG_SYS_ICACHE_OFF=y
CONFIG_SYS_DCACHE_OFF=y
CONFIG_TARGET_IOT_DEVKIT=y
CONFIG_SYS_TEXT_BASE=0x00000000
CONFIG_ENV_SIZE=0x1000
CONFIG_SYS_CLK_FREQ=16000000
CONFIG_LOCALVERSION="-iotdk-1.0"
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set

View File

@ -1,6 +1,7 @@
CONFIG_ARC=y
CONFIG_TARGET_TB100=y
CONFIG_SYS_TEXT_BASE=0x84000000
CONFIG_ENV_SIZE=0x800
CONFIG_SYS_CLK_FREQ=500000000
CONFIG_BOOTDELAY=3
CONFIG_USE_BOOTARGS=y

View File

@ -126,6 +126,7 @@ U_BOOT_DRIVER(serial_arc) = {
.id = UCLASS_SERIAL,
.of_match = arc_serial_ids,
.ofdata_to_platdata = arc_serial_ofdata_to_platdata,
.platdata_auto_alloc_size = sizeof(struct arc_serial_platdata),
.probe = arc_serial_probe,
.ops = &arc_serial_ops,
};

4
env/Kconfig vendored
View File

@ -431,7 +431,7 @@ config ENV_EXT4_FILE
It's a string of the EXT4 file name. This file use to store the
environment (explicit path to the file)
if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL
if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL || ARC
config ENV_OFFSET
hex "Environment Offset"
@ -441,6 +441,7 @@ config ENV_OFFSET
default 0x88000 if ARCH_SUNXI
default 0xE0000 if ARCH_ZYNQ
default 0x1E00000 if ARCH_ZYNQMP
default 0 if ARC
help
Offset from the start of the device (or partition)
@ -449,6 +450,7 @@ config ENV_SIZE
default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP
default 0x20000 if ARCH_SUNXI || ARCH_ZYNQ
default 0x8000 if ARCH_ROCKCHIP || ARCH_ZYNQMP || ARCH_VERSAL
default 0x4000 if ARC
help
Size of the environment storage area

View File

@ -45,7 +45,6 @@
/*
* UART configuration
*/
#define CONFIG_DW_SERIAL
#define CONFIG_SYS_NS16550_SERIAL
#define CONFIG_SYS_NS16550_CLK 33333333
#define CONFIG_SYS_NS16550_MEM32
@ -63,7 +62,6 @@
/*
* Environment settings
*/
#define CONFIG_ENV_SIZE SZ_16K
#define CONFIG_EXTRA_ENV_SETTINGS \
"upgrade=if mmc rescan && " \
"fatload mmc 0:1 ${loadaddr} u-boot-update.img && " \

View File

@ -21,7 +21,6 @@
/*
* Environment
*/
#define CONFIG_ENV_SIZE SZ_4K
#define CONFIG_BOOTFILE "app.bin"
#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR

View File

@ -40,7 +40,6 @@
/*
* UART configuration
*/
#define CONFIG_DW_SERIAL
#define CONFIG_SYS_NS16550_SERIAL
#define CONFIG_SYS_NS16550_CLK 33330000
#define CONFIG_SYS_NS16550_MEM32
@ -58,8 +57,6 @@
/*
* Environment settings
*/
#define CONFIG_ENV_SIZE SZ_16K
#define CONFIG_EXTRA_ENV_SETTINGS \
"upgrade=if mmc rescan && " \
"fatload mmc 0:1 ${loadaddr} u-boot-update.scr && " \

View File

@ -74,7 +74,6 @@
/*
* Environment
*/
#define CONFIG_ENV_SIZE SZ_4K
#define CONFIG_BOOTFILE "app.bin"
#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR

View File

@ -24,12 +24,6 @@
#define CONFIG_SYS_BOOTM_LEN SZ_32M
#define CONFIG_SYS_LOAD_ADDR 0x82000000
/*
* Environment settings
*/
#define CONFIG_ENV_SIZE SZ_512
#define CONFIG_ENV_OFFSET 0
/*
* Environment configuration
*/

View File

@ -52,12 +52,6 @@
* Command line configuration
*/
/*
* Environment settings
*/
#define CONFIG_ENV_SIZE SZ_2K
#define CONFIG_ENV_OFFSET 0
/*
* Environment configuration
*/

View File

@ -426,7 +426,6 @@ CONFIG_DW_ALTDESCRIPTOR
CONFIG_DW_AXI_BURST_LEN
CONFIG_DW_GMAC_DEFAULT_DMA_PBL
CONFIG_DW_MAC_FORCE_THRESHOLD_MODE
CONFIG_DW_SERIAL
CONFIG_DW_UDC
CONFIG_DW_WDT_BASE
CONFIG_DW_WDT_CLOCK_KHZ