Commit edd8188d authored by Manish Pandey's avatar Manish Pandey Committed by TrustedFirmware Code Review
Browse files

Merge changes Ib9c82b85,Ib348e097,I4dc315e4,I58a8ce44,Iebc03361, ... into integration

* changes:
  plat: marvell: armada: a8k: add OP-TEE OS MMU tables
  drivers: marvell: add support for mapping the entire LLC to SRAM
  plat: marvell: armada: add LLC SRAM CCU setup for AP806/AP807 platforms
  plat: marvell: armada: reduce memory size reserved for FIP image
  plat: marvell: armada: platform definitions cleanup
  plat: marvell: armada: a8k: check CCU window state before loading MSS BL2
  drivers: marvell: add CCU driver API for window state checking
  drivers: marvell: align and extend llc macros
  plat: marvell: a8k: move address config of cp1/2 to BL2
  plat: marvell: armada: re-enable BL32_BASE definition
  plat: marvell: a8k: extend includes to take advantage of the phy_porting_layer
  marvell: comphy: initialize common phy selector for AP mode
  marvell: comphy: update rx_training procedure
  plat: marvell: armada: configure amb for all CPs
  plat: marvell: armada: modify PLAT_FAMILY name for 37xx SoCs
parents b8247e11 47d1773f
...@@ -81,11 +81,11 @@ ...@@ -81,11 +81,11 @@
#define PLAT_MARVELL_CLUSTER_CORE_COUNT U(2) #define PLAT_MARVELL_CLUSTER_CORE_COUNT U(2)
/* DRAM[2MB..66MB] is used as Trusted ROM */ /* DRAM[2MB..66MB] is used as Trusted ROM */
#define PLAT_MARVELL_TRUSTED_ROM_BASE PLAT_MARVELL_ATF_LOAD_ADDR #define PLAT_MARVELL_TRUSTED_ROM_BASE PLAT_MARVELL_ATF_LOAD_ADDR
/* 64 MB TODO: reduce this to minimum needed according to fip image size*/ /* 4 MB for FIP image */
#define PLAT_MARVELL_TRUSTED_ROM_SIZE 0x04000000 #define PLAT_MARVELL_TRUSTED_ROM_SIZE 0x00400000
/* Reserve 16M for SCP (Secure PayLoad) Trusted DRAM */ /* Reserve 16M for SCP (Secure PayLoad) Trusted DRAM */
#define PLAT_MARVELL_TRUSTED_DRAM_BASE 0x04400000 #define PLAT_MARVELL_TRUSTED_RAM_BASE 0x04400000
#define PLAT_MARVELL_TRUSTED_DRAM_SIZE 0x01000000 /* 16 MB */ #define PLAT_MARVELL_TRUSTED_RAM_SIZE 0x01000000 /* 16 MB */
/* /*
* PLAT_ARM_MAX_BL1_RW_SIZE is calculated using the current BL1 RW debug size * PLAT_ARM_MAX_BL1_RW_SIZE is calculated using the current BL1 RW debug size
...@@ -169,8 +169,7 @@ ...@@ -169,8 +169,7 @@
#define PLAT_MARVELL_NSTIMER_FRAME_ID 1 #define PLAT_MARVELL_NSTIMER_FRAME_ID 1
/* Mailbox base address */ /* Mailbox base address */
#define PLAT_MARVELL_MAILBOX_BASE \ #define PLAT_MARVELL_MAILBOX_BASE (MARVELL_SHARED_RAM_BASE + 0x400)
(MARVELL_TRUSTED_SRAM_BASE + 0x400)
#define PLAT_MARVELL_MAILBOX_SIZE 0x100 #define PLAT_MARVELL_MAILBOX_SIZE 0x100
#define PLAT_MARVELL_MAILBOX_MAGIC_NUM 0x6D72766C /* mrvl */ #define PLAT_MARVELL_MAILBOX_MAGIC_NUM 0x6D72766C /* mrvl */
...@@ -221,12 +220,4 @@ ...@@ -221,12 +220,4 @@
/* Securities */ /* Securities */
#define IRQ_SEC_OS_TICK_INT MARVELL_IRQ_SEC_PHY_TIMER #define IRQ_SEC_OS_TICK_INT MARVELL_IRQ_SEC_PHY_TIMER
#define TRUSTED_DRAM_BASE PLAT_MARVELL_TRUSTED_DRAM_BASE
#define TRUSTED_DRAM_SIZE PLAT_MARVELL_TRUSTED_DRAM_SIZE
#ifdef BL32
#define BL32_BASE TRUSTED_DRAM_BASE
#define BL32_LIMIT TRUSTED_DRAM_SIZE
#endif
#endif /* PLATFORM_DEF_H */ #endif /* PLATFORM_DEF_H */
...@@ -102,6 +102,9 @@ struct addr_map_win ccu_memory_map[] = { /* IO window */ ...@@ -102,6 +102,9 @@ struct addr_map_win ccu_memory_map[] = { /* IO window */
#ifdef IMAGE_BLE #ifdef IMAGE_BLE
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */ {0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
#else #else
#if LLC_SRAM
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, SRAM_TID},
#endif
{0x00000000f2000000, 0xe000000, IO_0_TID}, {0x00000000f2000000, 0xe000000, IO_0_TID},
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */ {0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
{0x0000000800000000, 0x100000000, IO_0_TID}, /* IO window */ {0x0000000800000000, 0x100000000, IO_0_TID}, /* IO window */
......
...@@ -93,6 +93,9 @@ struct addr_map_win ccu_memory_map[] = { ...@@ -93,6 +93,9 @@ struct addr_map_win ccu_memory_map[] = {
#ifdef IMAGE_BLE #ifdef IMAGE_BLE
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */ {0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
#else #else
#if LLC_SRAM
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, SRAM_TID},
#endif
{0x00000000f2000000, 0xe000000, IO_0_TID}, {0x00000000f2000000, 0xe000000, IO_0_TID},
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */ {0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
{0x0000000800000000, 0x200000000, IO_0_TID}, /* IO window */ {0x0000000800000000, 0x200000000, IO_0_TID}, /* IO window */
......
...@@ -131,6 +131,9 @@ struct addr_map_win ccu_memory_map[] = { ...@@ -131,6 +131,9 @@ struct addr_map_win ccu_memory_map[] = {
#ifdef IMAGE_BLE #ifdef IMAGE_BLE
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */ {0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
#else #else
#if LLC_SRAM
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, SRAM_TID},
#endif
{0x00000000f2000000, 0xe000000, IO_0_TID}, /* IO window */ {0x00000000f2000000, 0xe000000, IO_0_TID}, /* IO window */
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */ {0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
{0x0000000800000000, 0x100000000, IO_0_TID}, /* IO window */ {0x0000000800000000, 0x100000000, IO_0_TID}, /* IO window */
......
...@@ -165,6 +165,9 @@ struct addr_map_win ccu_memory_map[] = { ...@@ -165,6 +165,9 @@ struct addr_map_win ccu_memory_map[] = {
#ifdef IMAGE_BLE #ifdef IMAGE_BLE
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */ {0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
#else #else
#if LLC_SRAM
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, SRAM_TID},
#endif
{0x00000000f2000000, 0xe000000, IO_0_TID}, /* IO window */ {0x00000000f2000000, 0xe000000, IO_0_TID}, /* IO window */
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */ {0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
{0x0000000800000000, 0x100000000, IO_0_TID}, /* IO window */ {0x0000000800000000, 0x100000000, IO_0_TID}, /* IO window */
......
...@@ -52,6 +52,7 @@ MARVELL_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \ ...@@ -52,6 +52,7 @@ MARVELL_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \
plat/common/plat_gicv2.c plat/common/plat_gicv2.c
PLAT_INCLUDES := -I$(BOARD_DIR) \ PLAT_INCLUDES := -I$(BOARD_DIR) \
-I$(BOARD_DIR)/board \
-I$(PLAT_COMMON_BASE)/include \ -I$(PLAT_COMMON_BASE)/include \
-I$(PLAT_INCLUDE_BASE)/common -I$(PLAT_INCLUDE_BASE)/common
......
...@@ -18,22 +18,27 @@ ...@@ -18,22 +18,27 @@
*/ */
#if IMAGE_BL1 #if IMAGE_BL1
const mmap_region_t plat_marvell_mmap[] = { const mmap_region_t plat_marvell_mmap[] = {
MARVELL_MAP_SHARED_RAM, MARVELL_MAP_SECURE_RAM,
MAP_DEVICE0, MAP_DEVICE0,
{0} {0}
}; };
#endif #endif
#if IMAGE_BL2 #if IMAGE_BL2
const mmap_region_t plat_marvell_mmap[] = { const mmap_region_t plat_marvell_mmap[] = {
MARVELL_MAP_SHARED_RAM, MARVELL_MAP_SECURE_RAM,
MAP_DEVICE0, MAP_DEVICE0,
MARVELL_MAP_DRAM, MARVELL_MAP_DRAM,
#ifdef SPD_opteed
MARVELL_MAP_OPTEE_CORE_MEM,
MARVELL_OPTEE_PAGEABLE_LOAD_MEM,
#endif
{0} {0}
}; };
#endif #endif
#if IMAGE_BL2U #if IMAGE_BL2U
const mmap_region_t plat_marvell_mmap[] = { const mmap_region_t plat_marvell_mmap[] = {
MARVELL_MAP_SECURE_RAM,
MAP_DEVICE0, MAP_DEVICE0,
{0} {0}
}; };
...@@ -48,7 +53,7 @@ const mmap_region_t plat_marvell_mmap[] = { ...@@ -48,7 +53,7 @@ const mmap_region_t plat_marvell_mmap[] = {
#if IMAGE_BL31 #if IMAGE_BL31
const mmap_region_t plat_marvell_mmap[] = { const mmap_region_t plat_marvell_mmap[] = {
MARVELL_MAP_SHARED_RAM, MARVELL_MAP_SECURE_RAM,
MAP_DEVICE0, MAP_DEVICE0,
MARVELL_MAP_DRAM, MARVELL_MAP_DRAM,
{0} {0}
...@@ -56,6 +61,7 @@ const mmap_region_t plat_marvell_mmap[] = { ...@@ -56,6 +61,7 @@ const mmap_region_t plat_marvell_mmap[] = {
#endif #endif
#if IMAGE_BL32 #if IMAGE_BL32
const mmap_region_t plat_marvell_mmap[] = { const mmap_region_t plat_marvell_mmap[] = {
MARVELL_MAP_SECURE_RAM,
MAP_DEVICE0, MAP_DEVICE0,
{0} {0}
}; };
......
...@@ -92,13 +92,16 @@ ...@@ -92,13 +92,16 @@
#define PLAT_MARVELL_CORE_COUNT (PLAT_MARVELL_CLUSTER_COUNT * \ #define PLAT_MARVELL_CORE_COUNT (PLAT_MARVELL_CLUSTER_COUNT * \
PLAT_MARVELL_CLUSTER_CORE_COUNT) PLAT_MARVELL_CLUSTER_CORE_COUNT)
/* DRAM[2MB..66MB] is used as Trusted ROM */ /* Part of DRAM that is used as Trusted ROM */
#define PLAT_MARVELL_TRUSTED_ROM_BASE PLAT_MARVELL_ATF_LOAD_ADDR #define PLAT_MARVELL_TRUSTED_ROM_BASE PLAT_MARVELL_ATF_LOAD_ADDR
/* 64 MB TODO: reduce this to minimum needed according to fip image size */ /* 4 MB for FIP image */
#define PLAT_MARVELL_TRUSTED_ROM_SIZE 0x04000000 #define PLAT_MARVELL_TRUSTED_ROM_SIZE 0x00400000
/* Reserve 16M for SCP (Secure PayLoad) Trusted DRAM */ /* Reserve 16M for SCP (Secure PayLoad) Trusted RAM */
#define PLAT_MARVELL_TRUSTED_DRAM_BASE 0x04400000 #define PLAT_MARVELL_TRUSTED_RAM_BASE 0x04400000
#define PLAT_MARVELL_TRUSTED_DRAM_SIZE 0x01000000 /* 16 MB */ #define PLAT_MARVELL_TRUSTED_RAM_SIZE 0x01000000 /* 16 MB DRAM */
#define PLAT_MARVELL_LLC_SRAM_BASE PLAT_MARVELL_TRUSTED_RAM_BASE
#define PLAT_MARVELL_LLC_SRAM_SIZE 0x00100000 /* 1 MB SRAM */
/* /*
* PLAT_ARM_MAX_BL1_RW_SIZE is calculated using the current BL1 RW debug size * PLAT_ARM_MAX_BL1_RW_SIZE is calculated using the current BL1 RW debug size
...@@ -182,7 +185,7 @@ ...@@ -182,7 +185,7 @@
/* Mailbox base address (note the lower memory space /* Mailbox base address (note the lower memory space
* is reserved for BLE data) * is reserved for BLE data)
*/ */
#define PLAT_MARVELL_MAILBOX_BASE (MARVELL_TRUSTED_SRAM_BASE \ #define PLAT_MARVELL_MAILBOX_BASE (MARVELL_SHARED_RAM_BASE \
+ 0x400) + 0x400)
#define PLAT_MARVELL_MAILBOX_SIZE 0x100 #define PLAT_MARVELL_MAILBOX_SIZE 0x100
#define PLAT_MARVELL_MAILBOX_MAGIC_NUM 0x6D72766C /* mrvl */ #define PLAT_MARVELL_MAILBOX_MAGIC_NUM 0x6D72766C /* mrvl */
...@@ -190,14 +193,6 @@ ...@@ -190,14 +193,6 @@
/* Securities */ /* Securities */
#define IRQ_SEC_OS_TICK_INT MARVELL_IRQ_SEC_PHY_TIMER #define IRQ_SEC_OS_TICK_INT MARVELL_IRQ_SEC_PHY_TIMER
#define TRUSTED_DRAM_BASE PLAT_MARVELL_TRUSTED_DRAM_BASE
#define TRUSTED_DRAM_SIZE PLAT_MARVELL_TRUSTED_DRAM_SIZE
#ifdef BL32
#define BL32_BASE TRUSTED_DRAM_BASE
#define BL32_LIMIT TRUSTED_DRAM_SIZE
#endif
#define MVEBU_PMU_IRQ_WA #define MVEBU_PMU_IRQ_WA
#endif /* PLATFORM_DEF_H */ #endif /* PLATFORM_DEF_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