mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-04 10:30:32 +00:00
067716bac5
This series moves the CONFIG_SYS_CACHELINE_SIZE. First, in nearly all cases we are mirroring the values used by the Linux Kernel here. Also, so long as (and in this case, it is true) we implement flushes in hunks that are no larger than the smallest implementation (and given that we mirror the Linux Kernel, again we are fine) it is OK to align higher. The biggest changes here are that we always use 64 bytes for CPU_V7 even if for example the underlying core is only 32 bytes (this mirrors Linux). Second, we say ARM64 uses 64 bytes not 128 (as found in the Linux Kernel) as we do not need multi-platform support (to this degree) and only the Cavium ThunderX 88xx series has a use for such large alignment. Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Prafulla Wadaskar <prafulla@marvell.com> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Stefan Roese <sr@denx.de> Cc: Nagendra T S <nagendra@mistralsolutions.com> Cc: Vaibhav Hiremath <hvaibhav@ti.com> Acked-by: Lokesh Vutla <lokeshvutla@ti.com> Cc: Steve Rae <steve.rae@raedomain.com> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Nikita Kiryanov <nikita@compulab.co.il> Cc: Stefan Agner <stefan.agner@toradex.com> Acked-by: Heiko Schocher <hs@denx.de> Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Cc: Peter Griffin <peter.griffin@linaro.org> Acked-by: Paul Kocialkowski <contact@paulk.fr> Cc: Anatolij Gustschin <agust@denx.de> Acked-by: "Pali Rohár" <pali.rohar@gmail.com> Cc: Adam Ford <aford173@gmail.com> Cc: Steve Sakoman <sakoman@gmail.com> Cc: Grazvydas Ignotas <notasas@gmail.com> Cc: Nishanth Menon <nm@ti.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Robert Baldyga <r.baldyga@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Thomas Weber <weber@corscience.de> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: David Feng <fenghua@phytium.com.cn> Cc: Alison Wang <b18965@freescale.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Simon Glass <sjg@chromium.org> Cc: York Sun <york.sun@nxp.com> Cc: Shengzhou Liu <Shengzhou.Liu@nxp.com> Cc: Mingkai Hu <mingkai.hu@nxp.com> Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Cc: Aneesh Bansal <aneesh.bansal@freescale.com> Cc: Saksham Jain <saksham.jain@nxp.com> Cc: Qianyu Gong <qianyu.gong@nxp.com> Cc: Wang Dongsheng <dongsheng.wang@nxp.com> Cc: Alex Porosanu <alexandru.porosanu@freescale.com> Cc: Hongbo Zhang <hongbo.zhang@nxp.com> Cc: tang yuantian <Yuantian.Tang@freescale.com> Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com> Cc: Josh Wu <josh.wu@atmel.com> Cc: Bo Shen <voice.shen@atmel.com> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Hannes Schmelzer <oe5hpm@oevsv.at> Cc: Thomas Chou <thomas@wytron.com.tw> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Sam Protsenko <semen.protsenko@linaro.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Christophe Ricard <christophe-h.ricard@st.com> Cc: Anand Moon <linux.amoon@gmail.com> Cc: Beniamino Galvani <b.galvani@gmail.com> Cc: Carlo Caione <carlo@endlessm.com> Cc: huang lin <hl@rock-chips.com> Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Cc: Xu Ziyuan <xzy.xu@rock-chips.com> Cc: "jk.kernel@gmail.com" <jk.kernel@gmail.com> Cc: "Ariel D'Alessandro" <ariel@vanguardiasur.com.ar> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Samuel Egli <samuel.egli@siemens.com> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Siarhei Siamashka <siarhei.siamashka@gmail.com> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Andre Przywara <andre.przywara@arm.com> Cc: Bernhard Nortmann <bernhard.nortmann@web.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Ben Whitten <ben.whitten@gmail.com> Cc: Tom Warren <twarren@nvidia.com> Cc: Alexander Graf <agraf@suse.de> Cc: Sekhar Nori <nsekhar@ti.com> Cc: Vitaly Andrianov <vitalya@ti.com> Cc: "Andrew F. Davis" <afd@ti.com> Cc: Murali Karicheri <m-karicheri2@ti.com> Cc: Carlos Hernandez <ceh@ti.com> Cc: Ladislav Michl <ladis@linux-mips.org> Cc: Ash Charles <ashcharles@gmail.com> Cc: Mugunthan V N <mugunthanvnm@ti.com> Cc: Daniel Allred <d-allred@ti.com> Cc: Gong Qianyu <Qianyu.Gong@freescale.com> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Chin Liang See <clsee@altera.com> Tested-by: Stephen Warren <swarren@nvidia.com> Acked-by: Paul Kocialkowski <contact@paulk.fr>
242 lines
7.2 KiB
C
242 lines
7.2 KiB
C
/*
|
|
* Copyright 2015, Freescale Semiconductor
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_
|
|
#define _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_
|
|
|
|
#include <fsl_ddrc_version.h>
|
|
|
|
#ifdef CONFIG_SYS_FSL_DDR4
|
|
#define CONFIG_SYS_FSL_DDRC_GEN4
|
|
#else
|
|
#define CONFIG_SYS_FSL_DDRC_ARM_GEN3 /* Enable Freescale ARM DDR3 driver */
|
|
#endif
|
|
|
|
#ifndef CONFIG_LS1012A
|
|
#define CONFIG_SYS_FSL_DDR /* Freescale DDR driver */
|
|
#define CONFIG_SYS_FSL_DDR_VER FSL_DDR_VER_5_0
|
|
#endif
|
|
|
|
/*
|
|
* Reserve secure memory
|
|
* To be aligned with MMU block size
|
|
*/
|
|
#define CONFIG_SYS_MEM_RESERVE_SECURE (2048 * 1024) /* 2MB */
|
|
|
|
#ifdef CONFIG_LS2080A
|
|
#define CONFIG_MAX_CPUS 16
|
|
#define CONFIG_SYS_FSL_IFC_BANK_COUNT 8
|
|
#define CONFIG_NUM_DDR_CONTROLLERS 3
|
|
#define CONFIG_SYS_FSL_HAS_DP_DDR /* Runtime check to confirm */
|
|
#define CONFIG_SYS_FSL_CLUSTER_CLOCKS { 1, 1, 4, 4 }
|
|
#define SRDS_MAX_LANES 8
|
|
#define CONFIG_SYS_FSL_SRDS_1
|
|
#define CONFIG_SYS_FSL_SRDS_2
|
|
#define CONFIG_SYS_PAGE_SIZE 0x10000
|
|
#ifndef L1_CACHE_BYTES
|
|
#define L1_CACHE_SHIFT 6
|
|
#define L1_CACHE_BYTES BIT(L1_CACHE_SHIFT)
|
|
#endif
|
|
|
|
#define CONFIG_SYS_FSL_OCRAM_BASE 0x18000000 /* initial RAM */
|
|
#define CONFIG_SYS_FSL_OCRAM_SIZE 0x00200000 /* 2M */
|
|
|
|
/* DDR */
|
|
#define CONFIG_SYS_FSL_DDR_LE
|
|
#define CONFIG_SYS_LS2_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
|
|
#define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_LS2_DDR_BLOCK1_SIZE
|
|
|
|
#define CONFIG_SYS_FSL_CCSR_GUR_LE
|
|
#define CONFIG_SYS_FSL_CCSR_SCFG_LE
|
|
#define CONFIG_SYS_FSL_ESDHC_LE
|
|
#define CONFIG_SYS_FSL_IFC_LE
|
|
#define CONFIG_SYS_FSL_PEX_LUT_LE
|
|
|
|
#define CONFIG_SYS_MEMAC_LITTLE_ENDIAN
|
|
|
|
/* Generic Interrupt Controller Definitions */
|
|
#define GICD_BASE 0x06000000
|
|
#define GICR_BASE 0x06100000
|
|
|
|
/* SMMU Defintions */
|
|
#define SMMU_BASE 0x05000000 /* GR0 Base */
|
|
|
|
/* SFP */
|
|
#define CONFIG_SYS_FSL_SFP_VER_3_4
|
|
#define CONFIG_SYS_FSL_SFP_LE
|
|
#define CONFIG_SYS_FSL_SRK_LE
|
|
|
|
/* SEC */
|
|
#define CONFIG_SYS_FSL_SEC_LE
|
|
#define CONFIG_SYS_FSL_SEC_COMPAT 5
|
|
|
|
/* Security Monitor */
|
|
#define CONFIG_SYS_FSL_SEC_MON_LE
|
|
|
|
/* Secure Boot */
|
|
#define CONFIG_ESBC_HDR_LS
|
|
|
|
/* DCFG - GUR */
|
|
#define CONFIG_SYS_FSL_CCSR_GUR_LE
|
|
|
|
/* Cache Coherent Interconnect */
|
|
#define CCI_MN_BASE 0x04000000
|
|
#define CCI_MN_RNF_NODEID_LIST 0x180
|
|
#define CCI_MN_DVM_DOMAIN_CTL 0x200
|
|
#define CCI_MN_DVM_DOMAIN_CTL_SET 0x210
|
|
|
|
#define CCI_HN_F_0_BASE (CCI_MN_BASE + 0x200000)
|
|
#define CCI_HN_F_1_BASE (CCI_MN_BASE + 0x210000)
|
|
#define CCN_HN_F_SAM_CTL 0x8 /* offset on base HN_F base */
|
|
#define CCN_HN_F_SAM_NODEID_MASK 0x7f
|
|
#define CCN_HN_F_SAM_NODEID_DDR0 0x4
|
|
#define CCN_HN_F_SAM_NODEID_DDR1 0xe
|
|
|
|
#define CCI_RN_I_0_BASE (CCI_MN_BASE + 0x800000)
|
|
#define CCI_RN_I_2_BASE (CCI_MN_BASE + 0x820000)
|
|
#define CCI_RN_I_6_BASE (CCI_MN_BASE + 0x860000)
|
|
#define CCI_RN_I_12_BASE (CCI_MN_BASE + 0x8C0000)
|
|
#define CCI_RN_I_16_BASE (CCI_MN_BASE + 0x900000)
|
|
#define CCI_RN_I_20_BASE (CCI_MN_BASE + 0x940000)
|
|
|
|
#define CCI_S0_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x10)
|
|
#define CCI_S1_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x110)
|
|
#define CCI_S2_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x210)
|
|
|
|
#define CCI_AUX_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x0500)
|
|
|
|
/* TZ Protection Controller Definitions */
|
|
#define TZPC_BASE 0x02200000
|
|
#define TZPCR0SIZE_BASE (TZPC_BASE)
|
|
#define TZPCDECPROT_0_STAT_BASE (TZPC_BASE + 0x800)
|
|
#define TZPCDECPROT_0_SET_BASE (TZPC_BASE + 0x804)
|
|
#define TZPCDECPROT_0_CLR_BASE (TZPC_BASE + 0x808)
|
|
#define TZPCDECPROT_1_STAT_BASE (TZPC_BASE + 0x80C)
|
|
#define TZPCDECPROT_1_SET_BASE (TZPC_BASE + 0x810)
|
|
#define TZPCDECPROT_1_CLR_BASE (TZPC_BASE + 0x814)
|
|
#define TZPCDECPROT_2_STAT_BASE (TZPC_BASE + 0x818)
|
|
#define TZPCDECPROT_2_SET_BASE (TZPC_BASE + 0x81C)
|
|
#define TZPCDECPROT_2_CLR_BASE (TZPC_BASE + 0x820)
|
|
|
|
#define DCSR_CGACRE5 0x700070914ULL
|
|
#define EPU_EPCMPR5 0x700060914ULL
|
|
#define EPU_EPCCR5 0x700060814ULL
|
|
#define EPU_EPSMCR5 0x700060228ULL
|
|
#define EPU_EPECR5 0x700060314ULL
|
|
#define EPU_EPCTR5 0x700060a14ULL
|
|
#define EPU_EPGCR 0x700060000ULL
|
|
|
|
#define CONFIG_SYS_FSL_ERRATUM_A008336
|
|
#define CONFIG_SYS_FSL_ERRATUM_A008511
|
|
#define CONFIG_SYS_FSL_ERRATUM_A008514
|
|
#define CONFIG_SYS_FSL_ERRATUM_A008585
|
|
#define CONFIG_SYS_FSL_ERRATUM_A008751
|
|
#define CONFIG_SYS_FSL_ERRATUM_A009635
|
|
#define CONFIG_SYS_FSL_ERRATUM_A009663
|
|
#define CONFIG_SYS_FSL_ERRATUM_A009801
|
|
#define CONFIG_SYS_FSL_ERRATUM_A009803
|
|
#define CONFIG_SYS_FSL_ERRATUM_A009942
|
|
#define CONFIG_SYS_FSL_ERRATUM_A010165
|
|
|
|
/* ARM A57 CORE ERRATA */
|
|
#define CONFIG_ARM_ERRATA_826974
|
|
#define CONFIG_ARM_ERRATA_828024
|
|
#define CONFIG_ARM_ERRATA_829520
|
|
#define CONFIG_ARM_ERRATA_833471
|
|
|
|
#define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
|
|
#elif defined(CONFIG_FSL_LSCH2)
|
|
#define CONFIG_NUM_DDR_CONTROLLERS 1
|
|
#define CONFIG_SYS_FSL_SEC_COMPAT 5
|
|
#define CONFIG_SYS_FSL_OCRAM_BASE 0x10000000 /* initial RAM */
|
|
#define CONFIG_SYS_FSL_OCRAM_SIZE 0x00200000 /* 2M */
|
|
#define CONFIG_SYS_CCSRBAR_DEFAULT 0x01000000
|
|
|
|
#define CONFIG_SYS_FSL_CCSR_SCFG_BE
|
|
#define CONFIG_SYS_FSL_ESDHC_BE
|
|
#define CONFIG_SYS_FSL_WDOG_BE
|
|
#define CONFIG_SYS_FSL_DSPI_BE
|
|
#define CONFIG_SYS_FSL_QSPI_BE
|
|
#define CONFIG_SYS_FSL_CCSR_GUR_BE
|
|
#define CONFIG_SYS_FSL_PEX_LUT_BE
|
|
#define CONFIG_SYS_FSL_SEC_BE
|
|
|
|
#define CONFIG_SYS_FSL_SRDS_1
|
|
/* SoC related */
|
|
#ifdef CONFIG_LS1043A
|
|
#define CONFIG_MAX_CPUS 4
|
|
#define CONFIG_SYS_FMAN_V3
|
|
#define CONFIG_SYS_NUM_FMAN 1
|
|
#define CONFIG_SYS_NUM_FM1_DTSEC 7
|
|
#define CONFIG_SYS_NUM_FM1_10GEC 1
|
|
#define CONFIG_SYS_FSL_IFC_BANK_COUNT 4
|
|
#define CONFIG_SYS_FSL_DDR_BE
|
|
#define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
|
|
#define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
|
|
|
|
#define QE_MURAM_SIZE 0x6000UL
|
|
#define MAX_QE_RISC 1
|
|
#define QE_NUM_OF_SNUM 28
|
|
|
|
#define CONFIG_SYS_FSL_IFC_BE
|
|
#define CONFIG_SYS_FSL_SFP_VER_3_2
|
|
#define CONFIG_SYS_FSL_SEC_MON_BE
|
|
#define CONFIG_SYS_FSL_SFP_BE
|
|
#define CONFIG_SYS_FSL_SRK_LE
|
|
#define CONFIG_KEY_REVOCATION
|
|
|
|
/* SMMU Defintions */
|
|
#define SMMU_BASE 0x09000000
|
|
|
|
/* Generic Interrupt Controller Definitions */
|
|
#define GICD_BASE 0x01401000
|
|
#define GICC_BASE 0x01402000
|
|
|
|
#define CONFIG_SYS_FSL_ERRATUM_A008850
|
|
#define CONFIG_SYS_FSL_ERRATUM_A009663
|
|
#define CONFIG_SYS_FSL_ERRATUM_A009929
|
|
#define CONFIG_SYS_FSL_ERRATUM_A009942
|
|
#define CONFIG_SYS_FSL_ERRATUM_A009660
|
|
#define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
|
|
#elif defined(CONFIG_LS1012A)
|
|
#define CONFIG_MAX_CPUS 1
|
|
#undef CONFIG_SYS_FSL_DDRC_ARM_GEN3
|
|
|
|
#define GICD_BASE 0x01401000
|
|
#define GICC_BASE 0x01402000
|
|
#elif defined(CONFIG_LS1046A)
|
|
#define CONFIG_MAX_CPUS 4
|
|
#define CONFIG_SYS_FMAN_V3
|
|
#define CONFIG_SYS_NUM_FMAN 1
|
|
#define CONFIG_SYS_NUM_FM1_DTSEC 8
|
|
#define CONFIG_SYS_NUM_FM1_10GEC 2
|
|
#define CONFIG_SYS_FSL_IFC_BANK_COUNT 4
|
|
#define CONFIG_SYS_FSL_DDR_BE
|
|
#define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
|
|
#define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
|
|
|
|
#define CONFIG_SYS_FSL_SRDS_2
|
|
#define CONFIG_SYS_FSL_IFC_BE
|
|
#define CONFIG_SYS_FSL_SFP_VER_3_2
|
|
#define CONFIG_SYS_FSL_SNVS_LE
|
|
#define CONFIG_SYS_FSL_SFP_BE
|
|
#define CONFIG_SYS_FSL_SRK_LE
|
|
#define CONFIG_KEY_REVOCATION
|
|
|
|
/* SMMU Defintions */
|
|
#define SMMU_BASE 0x09000000
|
|
|
|
/* Generic Interrupt Controller Definitions */
|
|
#define GICD_BASE 0x01410000
|
|
#define GICC_BASE 0x01420000
|
|
|
|
#define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
|
|
#else
|
|
#error SoC not defined
|
|
#endif
|
|
#endif
|
|
|
|
#endif /* _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_ */
|