Commit 234bc7f8 authored by Antonio Nino Diaz's avatar Antonio Nino Diaz
Browse files

plat/arm: Fix header dependencies



From now on, platform_def.h must include any header with definitions that
are platform-specific (like arm_def.h) and the included headers mustn't
include back platform_def.h, and shouldn't be used by other files. Only
platform_def.h should be included in other files. This will ensure that all
needed definitions are present, rather than needing to include all the
headers in all the definitions' headers just in case.

This also prevents problems like cyclic dependencies.

Change-Id: I9d3cf4d1de4b956fa035c79545222697acdaf5ca
Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
parent fe77b53e
......@@ -7,10 +7,10 @@
#include <common/debug.h>
#include <drivers/arm/nic_400.h>
#include <lib/mmio.h>
#include <platform_def.h>
#include <plat_arm.h>
#include <soc_css.h>
#include "juno_def.h"
#include "juno_tzmp1_def.h"
#ifdef JUNO_TZMP1
......
......@@ -7,9 +7,9 @@
#include <arch_helpers.h>
#include <common/debug.h>
#include <lib/utils.h>
#include <platform_def.h>
#include "juno_decl.h"
#include "juno_def.h"
u_register_t plat_get_stack_protector_canary(void)
{
......
......@@ -5,11 +5,10 @@
*/
#include <plat/common/platform.h>
#include <platform_def.h>
#include <arm_def.h>
#include <css_pm.h>
#include <plat_arm.h>
#include "juno_def.h"
#include "../../css/drivers/scmi/scmi.h"
#include "../../css/drivers/mhu/css_mhu_doorbell.h"
......
......@@ -9,9 +9,9 @@
#include <lib/mmio.h>
#include <lib/utils_def.h>
#include <platform_def.h>
#include "juno_decl.h"
#include "juno_def.h"
#define NSAMPLE_CLOCKS 1 /* min 1 cycle, max 231 cycles */
#define NRETRIES 5
......
......@@ -7,8 +7,6 @@
#ifndef JUNO_TZMP1_DEF_H
#define JUNO_TZMP1_DEF_H
#include <plat_arm.h>
/*
* Public memory regions for both protected and non-protected mode
*
......
......@@ -9,6 +9,7 @@
#include <arm_def.h>
#include <css_def.h>
#include <v2m_def.h>
/* UART related constants */
#define PLAT_ARM_BOOT_UART_BASE 0x2A400000
......
......@@ -10,7 +10,6 @@
#include <common/debug.h>
#include <plat/common/platform.h>
#include <arm_def.h>
#include <plat_arm.h>
/*
......
......@@ -16,7 +16,6 @@
#include <lib/xlat_tables/xlat_tables_compat.h>
#include <plat/common/platform.h>
#include <arm_def.h>
#include <plat_arm.h>
#include "../../../bl1/bl1_private.h"
......
......@@ -8,8 +8,8 @@
#include <drivers/generic_delay_timer.h>
#include <plat/common/platform.h>
#include <platform_def.h>
#include <arm_def.h>
#include <plat_arm.h>
#pragma weak bl2_el3_early_platform_setup
......
......@@ -20,7 +20,6 @@
#include <lib/utils.h>
#include <plat/common/platform.h>
#include <arm_def.h>
#include <plat_arm.h>
/* Data structure which holds the extents of the trusted SRAM for BL2 */
......
......@@ -14,7 +14,6 @@
#include <drivers/generic_delay_timer.h>
#include <plat/common/platform.h>
#include <arm_def.h>
#include <plat_arm.h>
/* Weak definitions may be overridden in specific ARM standard platform */
......
......@@ -16,8 +16,8 @@
#include <lib/utils.h>
#include <lib/xlat_tables/xlat_tables_compat.h>
#include <plat/common/platform.h>
#include <platform_def.h>
#include <arm_def.h>
#include <plat_arm.h>
/*
......
......@@ -11,7 +11,6 @@
#include <lib/utils.h>
#include <plat/common/platform.h>
#include <arm_def.h>
#include <plat_arm.h>
/******************************************************************************
......
......@@ -8,7 +8,6 @@
#include <common/desc_image_load.h>
#include <plat/common/platform.h>
#include <arm_def.h>
#include <plat_arm.h>
#pragma weak plat_flush_next_bl_params
......
......@@ -13,7 +13,6 @@
#include <lib/psci/psci.h>
#include <plat/common/platform.h>
#include <arm_def.h>
#include <plat_arm.h>
/* Allow ARM Standard platforms to override these functions */
......
......@@ -9,8 +9,6 @@
#include <common/debug.h>
#include <drivers/arm/tzc400.h>
#include <arm_def.h>
#include <arm_spm_def.h>
#include <plat_arm.h>
/* Weak definitions may be overridden in specific ARM standard platform */
......
......@@ -11,7 +11,6 @@
#include <common/debug.h>
#include <drivers/arm/tzc_dmc500.h>
#include <arm_def.h>
#include <plat_arm.h>
/*******************************************************************************
......
......@@ -14,7 +14,6 @@
#include <drivers/arm/pl011.h>
#include <drivers/console.h>
#include <arm_def.h>
#include <plat_arm.h>
#define BL32_END (unsigned long)(&__BL32_END__)
......
......@@ -3,10 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch.h>
#include <asm_macros.S>
#include <cpu_macros.S>
#include <css_def.h>
#include <platform_def.h>
.weak plat_secondary_cold_boot_setup
.weak plat_get_my_entrypoint
......
......@@ -3,10 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch.h>
#include <asm_macros.S>
#include <cpu_macros.S>
#include <css_def.h>
#include <platform_def.h>
.weak plat_secondary_cold_boot_setup
.weak plat_get_my_entrypoint
......
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