Commit 1f9ad445 authored by Alexey Brodkin's avatar Alexey Brodkin
Browse files

arc: add selection of endianess in Kconfig



This change allows to keep board description clean and minimalistic.
This is especially helpful if one board may house different CPUs with
different features.

It is applicable to both FPGA-based boards or those that have CPUs
mounted on interchnagable daughter-boards.
Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
parent 205e7a7b
......@@ -47,6 +47,12 @@ config ARC_MMU_V3
endchoice
config CPU_BIG_ENDIAN
bool "Enable Big Endian Mode"
default n
help
Build kernel for Big Endian Mode of ARC CPU
config SYS_ICACHE_OFF
bool "Do not use Instruction Cache"
default n
......@@ -75,9 +81,6 @@ config TARGET_TB100
config TARGET_ARCANGEL4
bool "Support arcangel4"
config TARGET_ARCANGEL4_BE
bool "Support arcangel4-be"
config TARGET_AXS101
bool "Support axs101"
......
......@@ -4,8 +4,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
ifndef CONFIG_SYS_BIG_ENDIAN
ifndef CONFIG_CPU_BIG_ENDIAN
CONFIG_SYS_LITTLE_ENDIAN = 1
else
CONFIG_SYS_BIG_ENDIAN = 1
endif
ifdef CONFIG_SYS_LITTLE_ENDIAN
......
......@@ -7,13 +7,3 @@ config SYS_CONFIG_NAME
default "arcangel4"
endif
if TARGET_ARCANGEL4_BE
config SYS_VENDOR
default "synopsys"
config SYS_CONFIG_NAME
default "arcangel4-be"
endif
......@@ -3,5 +3,4 @@ M: Alexey Brodkin <abrodkin@synopsys.com>
S: Maintained
F: include/configs/arcangel4.h
F: configs/arcangel4_defconfig
F: include/configs/arcangel4-be.h
F: configs/arcangel4-be_defconfig
CONFIG_ARC=y
CONFIG_TARGET_ARCANGEL4_BE=y
CONFIG_TARGET_ARCANGEL4=y
CONFIG_SYS_CLK_FREQ=70000000
CONFIG_CPU_BIG_ENDIAN=y
/*
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef _CONFIG_ARCANGEL4_H_
#define _CONFIG_ARCANGEL4_H_
/*
* CPU configuration
*/
#define CONFIG_SYS_BIG_ENDIAN
#define CONFIG_SYS_TIMER_RATE CONFIG_SYS_CLK_FREQ
/*
* Board configuration
*/
#define CONFIG_SYS_GENERIC_BOARD
#define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is in RAM already */
#define CONFIG_ARCH_EARLY_INIT_R
/*
* Memory configuration
*/
#define CONFIG_SYS_TEXT_BASE 0x81000000
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
#define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000
#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
#define CONFIG_SYS_SDRAM_SIZE 0x10000000 /* 256 Mb */
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
#define CONFIG_SYS_MALLOC_LEN 0x200000 /* 2 MB */
#define CONFIG_SYS_BOOTM_LEN 0x2000000 /* 32 MB */
#define CONFIG_SYS_LOAD_ADDR 0x82000000
#define CONFIG_SYS_NO_FLASH
/*
* UART configuration
*
*/
#define CONFIG_ARC_SERIAL
#define CONFIG_ARC_UART_BASE 0xC0FC1000
#define CONFIG_BAUDRATE 115200
/*
* Command line configuration
*/
#include <config_cmd_default.h>
#define CONFIG_CMD_ELF
#define CONFIG_OF_LIBFDT
#define CONFIG_AUTO_COMPLETE
#define CONFIG_SYS_MAXARGS 16
/*
* Environment settings
*/
#define CONFIG_ENV_IS_NOWHERE
#define CONFIG_ENV_SIZE 0x00200 /* 512 bytes */
#define CONFIG_ENV_OFFSET 0
/*
* Environment configuration
*/
#define CONFIG_BOOTDELAY 3
#define CONFIG_BOOTFILE "uImage"
#define CONFIG_BOOTARGS "console=ttyARC0,115200n8"
#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR
/*
* Console configuration
*/
#define CONFIG_SYS_LONGHELP
#define CONFIG_SYS_PROMPT "arcangel4# "
#define CONFIG_SYS_CBSIZE 256
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
sizeof(CONFIG_SYS_PROMPT) + 16)
#endif /* _CONFIG_ARCANGEL4_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment