blob: 65e3d32d732a021833db3d09bb1ab55f8e916d60 [file] [log] [blame]
Dan Handley9df48042015-03-19 18:58:55 +00001/*
David Cunado2e36de82017-01-19 10:26:16 +00002 * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
Dan Handley9df48042015-03-19 18:58:55 +00003 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * Redistributions of source code must retain the above copyright notice, this
8 * list of conditions and the following disclaimer.
9 *
10 * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * Neither the name of ARM nor the names of its contributors may be used
15 * to endorse or promote products derived from this software without specific
16 * prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#ifndef __BOARD_CSS_DEF_H__
32#define __BOARD_CSS_DEF_H__
33
34#include <common_def.h>
35#include <soc_css_def.h>
36#include <v2m_def.h>
37
38/*
39 * Definitions common to all ARM CSS-based development platforms
40 */
41
42/* Platform ID address */
43#define BOARD_CSS_PLAT_ID_REG_ADDR 0x7ffe00e0
44
45/* Platform ID related accessors */
46#define BOARD_CSS_PLAT_ID_REG_ID_MASK 0x0f
47#define BOARD_CSS_PLAT_ID_REG_ID_SHIFT 0x0
48#define BOARD_CSS_PLAT_ID_REG_VERSION_MASK 0xf00
49#define BOARD_CSS_PLAT_ID_REG_VERSION_SHIFT 0x8
50#define BOARD_CSS_PLAT_TYPE_RTL 0x00
51#define BOARD_CSS_PLAT_TYPE_FPGA 0x01
52#define BOARD_CSS_PLAT_TYPE_EMULATOR 0x02
53#define BOARD_CSS_PLAT_TYPE_FVP 0x03
54
55#ifndef __ASSEMBLY__
56
57#include <mmio.h>
58
59#define BOARD_CSS_GET_PLAT_TYPE(addr) \
60 ((mmio_read_32(addr) & BOARD_CSS_PLAT_ID_REG_ID_MASK) \
61 >> BOARD_CSS_PLAT_ID_REG_ID_SHIFT)
62
63#endif /* __ASSEMBLY__ */
64
65
66/*
67 * Required platform porting definitions common to all ARM CSS-based
68 * development platforms
69 */
70
David Cunado2e36de82017-01-19 10:26:16 +000071#define PLAT_ARM_DRAM2_SIZE ULL(0x180000000)
Dan Handley9df48042015-03-19 18:58:55 +000072
73/* UART related constants */
74#define PLAT_ARM_BOOT_UART_BASE SOC_CSS_UART0_BASE
75#define PLAT_ARM_BOOT_UART_CLK_IN_HZ SOC_CSS_UART0_CLK_IN_HZ
76
Soby Mathew2fd66be2015-12-09 11:38:43 +000077#define PLAT_ARM_BL31_RUN_UART_BASE SOC_CSS_UART1_BASE
78#define PLAT_ARM_BL31_RUN_UART_CLK_IN_HZ SOC_CSS_UART1_CLK_IN_HZ
79
80#define PLAT_ARM_CRASH_UART_BASE PLAT_ARM_BL31_RUN_UART_BASE
81#define PLAT_ARM_CRASH_UART_CLK_IN_HZ PLAT_ARM_BL31_RUN_UART_CLK_IN_HZ
Dan Handley9df48042015-03-19 18:58:55 +000082
83#define PLAT_ARM_TSP_UART_BASE V2M_IOFPGA_UART0_BASE
84#define PLAT_ARM_TSP_UART_CLK_IN_HZ V2M_IOFPGA_UART0_CLK_IN_HZ
85
86
87#endif /* __BOARD_CSS_DEF_H__ */
88