2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2015-02-12 00:39:40 +00:00
|
|
|
/*
|
|
|
|
* Sysam AMCORE board configuration
|
|
|
|
*
|
2016-09-20 15:40:03 +00:00
|
|
|
* (C) Copyright 2016 Angelo Dureghello <angelo@sysam.it>
|
2015-02-12 00:39:40 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __AMCORE_CONFIG_H
|
|
|
|
#define __AMCORE_CONFIG_H
|
|
|
|
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_UART_PORT 0
|
2015-02-12 00:39:40 +00:00
|
|
|
|
2022-12-04 15:03:50 +00:00
|
|
|
#define CFG_EXTRA_ENV_SETTINGS \
|
2016-09-20 15:40:03 +00:00
|
|
|
"upgrade_uboot=loady; " \
|
|
|
|
"protect off 0xffc00000 0xffc1ffff; " \
|
|
|
|
"erase 0xffc00000 0xffc1ffff; " \
|
|
|
|
"cp.b 0x20000 0xffc00000 ${filesize}\0" \
|
|
|
|
"upgrade_kernel=loady; " \
|
|
|
|
"erase 0xffc20000 0xffefffff; " \
|
|
|
|
"cp.b 0x20000 0xffc20000 ${filesize}\0" \
|
|
|
|
"upgrade_jffs2=loady; " \
|
|
|
|
"erase 0xfff00000 0xffffffff; " \
|
|
|
|
"cp.b 0x20000 0xfff00000 ${filesize}\0"
|
2015-02-12 00:39:40 +00:00
|
|
|
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_CLK 45000000
|
|
|
|
#define CFG_SYS_CPU_CLK (CFG_SYS_CLK * 2)
|
2015-02-12 00:39:40 +00:00
|
|
|
/* Register Base Addrs */
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_MBAR 0x10000000
|
2015-02-12 00:39:40 +00:00
|
|
|
/* Definitions for initial stack pointer and data area (in DPRAM) */
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_INIT_RAM_ADDR 0x20000000
|
2015-02-12 00:39:40 +00:00
|
|
|
/* size of internal SRAM */
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_INIT_RAM_SIZE 0x1000
|
2015-02-12 00:39:40 +00:00
|
|
|
|
2022-11-16 18:10:37 +00:00
|
|
|
#define CFG_SYS_SDRAM_BASE 0x00000000
|
|
|
|
#define CFG_SYS_SDRAM_SIZE 0x1000000
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_FLASH_BASE 0xffc00000
|
2015-02-12 00:39:40 +00:00
|
|
|
|
|
|
|
/* amcore design has flash data bytes wired swapped */
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_WRITE_SWAPPED_DATA
|
2015-02-12 00:39:40 +00:00
|
|
|
/* reserve 128-4KB */
|
|
|
|
|
2015-03-29 20:54:16 +00:00
|
|
|
#define LDS_BOARD_TEXT \
|
2017-08-03 18:21:49 +00:00
|
|
|
. = DEFINED(env_offset) ? env_offset : .; \
|
|
|
|
env/embedded.o(.text*);
|
2015-03-29 20:54:16 +00:00
|
|
|
|
2015-02-12 00:39:40 +00:00
|
|
|
/* memory map space for linux boot data */
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_BOOTMAPSZ (8 << 20)
|
2015-02-12 00:39:40 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Cache Configuration
|
|
|
|
*
|
|
|
|
* Special 8K version 3 core cache.
|
|
|
|
* This is a single unified instruction/data cache.
|
|
|
|
* sdram - single region - no masks
|
|
|
|
*/
|
|
|
|
|
2022-11-16 18:10:41 +00:00
|
|
|
#define ICACHE_STATUS (CFG_SYS_INIT_RAM_ADDR + \
|
|
|
|
CFG_SYS_INIT_RAM_SIZE - 8)
|
|
|
|
#define DCACHE_STATUS (CFG_SYS_INIT_RAM_ADDR + \
|
|
|
|
CFG_SYS_INIT_RAM_SIZE - 4)
|
|
|
|
#define CFG_SYS_ICACHE_INV (CF_CACR_CINVA)
|
|
|
|
#define CFG_SYS_CACHE_ACR0 (CF_ACR_CM_WT | CF_ACR_SM_ALL | \
|
2015-02-12 00:39:40 +00:00
|
|
|
CF_ACR_EN)
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_CACHE_ICACR (CF_CACR_DCM_P | CF_CACR_ESB | \
|
2015-02-12 00:39:40 +00:00
|
|
|
CF_CACR_EC)
|
|
|
|
|
|
|
|
/* CS0 - AMD Flash, address 0xffc00000 */
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_CS0_BASE (CFG_SYS_FLASH_BASE>>16)
|
2015-02-12 00:39:40 +00:00
|
|
|
/* 4MB, AA=0,V=1 C/I BIT for errata */
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_CS0_MASK 0x003f0001
|
2015-02-12 00:39:40 +00:00
|
|
|
/* WS=10, AA=1, PS=16bit (10) */
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_CS0_CTRL 0x1980
|
2015-02-12 00:39:40 +00:00
|
|
|
/* CS1 - DM9000 Ethernet Controller, address 0x30000000 */
|
2022-11-16 18:10:41 +00:00
|
|
|
#define CFG_SYS_CS1_BASE 0x3000
|
|
|
|
#define CFG_SYS_CS1_MASK 0x00070001
|
|
|
|
#define CFG_SYS_CS1_CTRL 0x0100
|
2015-02-12 00:39:40 +00:00
|
|
|
|
|
|
|
#endif /* __AMCORE_CONFIG_H */
|