aboutsummaryrefslogtreecommitdiff
path: root/drivers/renesas
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-12-14 00:18:21 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2019-01-04 10:43:17 +0000
commit09d40e0e08283a249e7dce0e106c07c5141f9b7e (patch)
tree46e7af7b5be2738948b359b2a07078e4cf1bbec1 /drivers/renesas
parentf5478dedf9e096d9539362b38ceb096b940ba3e2 (diff)
downloadtrusted-firmware-a-09d40e0e08283a249e7dce0e106c07c5141f9b7e.tar.gz
Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths. The following folders inside include/lib have been left unchanged: - include/lib/cpus/${ARCH} - include/lib/el3_runtime/${ARCH} The reason for this change is that having a global namespace for includes isn't a good idea. It defeats one of the advantages of having folders and it introduces problems that are sometimes subtle (because you may not know the header you are actually including if there are two of them). For example, this patch had to be created because two headers were called the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platform to avoid collision."). More recently, this patch has had similar problems: 46f9b2c3a282 ("drivers: add tzc380 support"). This problem was introduced in commit 4ecca33988b9 ("Move include and source files to logical locations"). At that time, there weren't too many headers so it wasn't a real issue. However, time has shown that this creates problems. Platforms that want to preserve the way they include headers may add the removed paths to PLAT_INCLUDES, but this is discouraged. Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'drivers/renesas')
-rw-r--r--drivers/renesas/rcar/auth/auth_mod.c12
-rw-r--r--drivers/renesas/rcar/avs/avs_driver.c7
-rw-r--r--drivers/renesas/rcar/board/board.c5
-rw-r--r--drivers/renesas/rcar/common.c3
-rw-r--r--drivers/renesas/rcar/console/rcar_printf.c16
-rw-r--r--drivers/renesas/rcar/cpld/ulcb_cpld.c2
-rw-r--r--drivers/renesas/rcar/delay/micro_delay.h2
-rw-r--r--drivers/renesas/rcar/dma/dma_driver.c8
-rw-r--r--drivers/renesas/rcar/emmc/emmc_cmd.c3
-rw-r--r--drivers/renesas/rcar/emmc/emmc_init.c4
-rw-r--r--drivers/renesas/rcar/emmc/emmc_interrupt.c6
-rw-r--r--drivers/renesas/rcar/emmc/emmc_mount.c5
-rw-r--r--drivers/renesas/rcar/emmc/emmc_read.c2
-rw-r--r--drivers/renesas/rcar/emmc/emmc_utility.c3
-rw-r--r--drivers/renesas/rcar/iic_dvfs/iic_dvfs.c5
-rw-r--r--drivers/renesas/rcar/io/io_emmcdrv.c7
-rw-r--r--drivers/renesas/rcar/io/io_memdrv.c7
-rw-r--r--drivers/renesas/rcar/io/io_rcar.c24
-rw-r--r--drivers/renesas/rcar/pwrc/pwrc.c14
-rw-r--r--drivers/renesas/rcar/rom/rom_api.c4
-rw-r--r--drivers/renesas/rcar/rpc/rpc_driver.c6
-rw-r--r--drivers/renesas/rcar/watchdog/swdt.c7
22 files changed, 92 insertions, 60 deletions
diff --git a/drivers/renesas/rcar/auth/auth_mod.c b/drivers/renesas/rcar/auth/auth_mod.c
index 04ed279287..d9446d95e0 100644
--- a/drivers/renesas/rcar/auth/auth_mod.c
+++ b/drivers/renesas/rcar/auth/auth_mod.c
@@ -5,13 +5,15 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
-#include <debug.h>
-#include <mmio.h>
-#include <platform.h>
-#include <platform_def.h>
#include <stddef.h>
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
#include "rom_api.h"
typedef int32_t(*secure_boot_api_f) (uint32_t a, uint32_t b, void *c);
diff --git a/drivers/renesas/rcar/avs/avs_driver.c b/drivers/renesas/rcar/avs/avs_driver.c
index 80a7c91909..647869ede4 100644
--- a/drivers/renesas/rcar/avs/avs_driver.c
+++ b/drivers/renesas/rcar/avs/avs_driver.c
@@ -4,9 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
-#include <debug.h>
-#include <utils_def.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+#include <lib/utils_def.h>
+
#include "cpg_registers.h"
#include "avs_driver.h"
#include "rcar_def.h"
diff --git a/drivers/renesas/rcar/board/board.c b/drivers/renesas/rcar/board/board.c
index 147a0b0c38..f15e06bc08 100644
--- a/drivers/renesas/rcar/board/board.c
+++ b/drivers/renesas/rcar/board/board.c
@@ -6,9 +6,12 @@
*/
#include <stdint.h>
+
+#include <lib/utils_def.h>
+
#include <iic_dvfs.h>
+
#include "board.h"
-#include "utils_def.h"
#ifndef BOARD_DEFAULT
#if (RCAR_LSI == RCAR_E3)
diff --git a/drivers/renesas/rcar/common.c b/drivers/renesas/rcar/common.c
index e82e8b5214..42bdce5797 100644
--- a/drivers/renesas/rcar/common.c
+++ b/drivers/renesas/rcar/common.c
@@ -4,7 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
+#include <lib/mmio.h>
+
#include "rcar_private.h"
void
diff --git a/drivers/renesas/rcar/console/rcar_printf.c b/drivers/renesas/rcar/console/rcar_printf.c
index 9321b584ad..2a6e2c0032 100644
--- a/drivers/renesas/rcar/console/rcar_printf.c
+++ b/drivers/renesas/rcar/console/rcar_printf.c
@@ -4,16 +4,18 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
#include <stdarg.h>
#include <stdint.h>
-#include <arch_helpers.h>
-#include <platform_def.h>
-#include <bakery_lock.h>
-#include "rcar_def.h"
-#include "rcar_private.h"
-#include "rcar_printf.h"
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <lib/bakery_lock.h>
+
+#include "rcar_def.h"
+#include "rcar_private.h"
+#include "rcar_printf.h"
#define INDEX_TIMER_COUNT (4U)
diff --git a/drivers/renesas/rcar/cpld/ulcb_cpld.c b/drivers/renesas/rcar/cpld/ulcb_cpld.c
index 92e438a4f1..d7192f48d9 100644
--- a/drivers/renesas/rcar/cpld/ulcb_cpld.c
+++ b/drivers/renesas/rcar/cpld/ulcb_cpld.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
+#include <lib/mmio.h>
#define SCLK 8 /* GP_6_8 */
#define SSTBZ 3 /* GP_2_3 */
diff --git a/drivers/renesas/rcar/delay/micro_delay.h b/drivers/renesas/rcar/delay/micro_delay.h
index 458959fd8d..4e4b28babc 100644
--- a/drivers/renesas/rcar/delay/micro_delay.h
+++ b/drivers/renesas/rcar/delay/micro_delay.h
@@ -10,7 +10,7 @@
#define TMU3_MEASUREMENT (0)
#ifndef __ASSEMBLY__
-#include "stdint.h"
+#include <stdint.h>
void rcar_micro_delay(uint32_t count_us);
#if (TMU3_MEASUREMENT == 1)
diff --git a/drivers/renesas/rcar/dma/dma_driver.c b/drivers/renesas/rcar/dma/dma_driver.c
index d4fa65d263..fef55c477a 100644
--- a/drivers/renesas/rcar/dma/dma_driver.c
+++ b/drivers/renesas/rcar/dma/dma_driver.c
@@ -5,12 +5,14 @@
*/
#include <stdint.h>
-#include <arch_helpers.h>
#include <string.h>
-#include <mmio.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "rcar_def.h"
#include "cpg_registers.h"
-#include "debug.h"
#include "rcar_private.h"
/* DMA CHANNEL setting (0/16/32) */
diff --git a/drivers/renesas/rcar/emmc/emmc_cmd.c b/drivers/renesas/rcar/emmc/emmc_cmd.c
index 0f393490cc..a2e25e3394 100644
--- a/drivers/renesas/rcar/emmc/emmc_cmd.c
+++ b/drivers/renesas/rcar/emmc/emmc_cmd.c
@@ -4,7 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
+#include <common/debug.h>
+
#include "emmc_config.h"
#include "emmc_hal.h"
#include "emmc_std.h"
diff --git a/drivers/renesas/rcar/emmc/emmc_init.c b/drivers/renesas/rcar/emmc/emmc_init.c
index 386fb1e4ec..b27e165862 100644
--- a/drivers/renesas/rcar/emmc/emmc_init.c
+++ b/drivers/renesas/rcar/emmc/emmc_init.c
@@ -5,7 +5,9 @@
*/
#include <stddef.h>
-#include <mmio.h>
+
+#include <lib/mmio.h>
+
#include "emmc_config.h"
#include "emmc_hal.h"
#include "emmc_std.h"
diff --git a/drivers/renesas/rcar/emmc/emmc_interrupt.c b/drivers/renesas/rcar/emmc/emmc_interrupt.c
index 3077db4c03..37a3cf9d43 100644
--- a/drivers/renesas/rcar/emmc/emmc_interrupt.c
+++ b/drivers/renesas/rcar/emmc/emmc_interrupt.c
@@ -5,6 +5,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <stddef.h>
+
+#include <lib/mmio.h>
#include "emmc_config.h"
#include "emmc_def.h"
@@ -13,9 +16,6 @@
#include "emmc_std.h"
#include "rcar_def.h"
-#include <mmio.h>
-#include <stddef.h>
-
static EMMC_ERROR_CODE emmc_trans_sector(uint32_t *buff_address_virtual);
uint32_t emmc_interrupt(void)
diff --git a/drivers/renesas/rcar/emmc/emmc_mount.c b/drivers/renesas/rcar/emmc/emmc_mount.c
index 9a7d2cad63..dd57b0c249 100644
--- a/drivers/renesas/rcar/emmc/emmc_mount.c
+++ b/drivers/renesas/rcar/emmc/emmc_mount.c
@@ -4,8 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "emmc_config.h"
#include "emmc_hal.h"
#include "emmc_std.h"
diff --git a/drivers/renesas/rcar/emmc/emmc_read.c b/drivers/renesas/rcar/emmc/emmc_read.c
index b11c2c43ef..390d0caac1 100644
--- a/drivers/renesas/rcar/emmc/emmc_read.c
+++ b/drivers/renesas/rcar/emmc/emmc_read.c
@@ -3,7 +3,9 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
#include <arch_helpers.h>
+
#include "emmc_config.h"
#include "emmc_hal.h"
#include "emmc_std.h"
diff --git a/drivers/renesas/rcar/emmc/emmc_utility.c b/drivers/renesas/rcar/emmc/emmc_utility.c
index e64947ddc7..39d9ede5ac 100644
--- a/drivers/renesas/rcar/emmc/emmc_utility.c
+++ b/drivers/renesas/rcar/emmc/emmc_utility.c
@@ -4,7 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
+#include <common/debug.h>
+
#include "emmc_config.h"
#include "emmc_hal.h"
#include "emmc_std.h"
diff --git a/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c b/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c
index 11d52bf76d..39b9bb4e3c 100644
--- a/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c
+++ b/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c
@@ -4,8 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
-#include <debug.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "rcar_def.h"
#include "cpg_registers.h"
#include "iic_dvfs.h"
diff --git a/drivers/renesas/rcar/io/io_emmcdrv.c b/drivers/renesas/rcar/io/io_emmcdrv.c
index f74bd5f4ea..4b464fb3e4 100644
--- a/drivers/renesas/rcar/io/io_emmcdrv.c
+++ b/drivers/renesas/rcar/io/io_emmcdrv.c
@@ -4,11 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <io_driver.h>
-#include <io_storage.h>
#include <string.h>
+#include <common/debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_storage.h>
+
#include "io_common.h"
#include "io_emmcdrv.h"
#include "io_private.h"
diff --git a/drivers/renesas/rcar/io/io_memdrv.c b/drivers/renesas/rcar/io/io_memdrv.c
index e55fd64665..3f6b4c71b1 100644
--- a/drivers/renesas/rcar/io/io_memdrv.c
+++ b/drivers/renesas/rcar/io/io_memdrv.c
@@ -4,11 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <io_driver.h>
-#include <io_storage.h>
#include <string.h>
+#include <common/debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_storage.h>
+
#include "io_common.h"
#include "io_private.h"
#include "io_memdrv.h"
diff --git a/drivers/renesas/rcar/io/io_rcar.c b/drivers/renesas/rcar/io/io_rcar.c
index 4293c51c58..650931bb45 100644
--- a/drivers/renesas/rcar/io/io_rcar.c
+++ b/drivers/renesas/rcar/io/io_rcar.c
@@ -4,23 +4,27 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <auth_mod.h>
-#include <bl_common.h>
-#include <debug.h>
#include <errno.h>
-#include <firmware_image_package.h>
-#include <io_driver.h>
-#include <io_storage.h>
-#include <platform.h>
-#include <platform_def.h>
#include <stdint.h>
#include <string.h>
-#include <uuid.h>
-#include <mmio.h>
+
+#include <platform_def.h>
+
#include <arch_helpers.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/auth/auth_mod.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_storage.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+#include <tools_share/firmware_image_package.h>
+#include <tools_share/uuid.h>
+
#include "io_rcar.h"
#include "io_common.h"
#include "io_private.h"
+
extern int32_t plat_get_drv_source(uint32_t id, uintptr_t *dev,
uintptr_t *image_spec);
diff --git a/drivers/renesas/rcar/pwrc/pwrc.c b/drivers/renesas/rcar/pwrc/pwrc.c
index 6dfc0b69f4..8cdfe75e54 100644
--- a/drivers/renesas/rcar/pwrc/pwrc.c
+++ b/drivers/renesas/rcar/pwrc/pwrc.c
@@ -4,14 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch.h>
-#include <arch_helpers.h>
#include <assert.h>
-#include <bakery_lock.h>
-#include <debug.h>
-#include <mmio.h>
#include <string.h>
-#include <xlat_tables_v2.h>
+
+#include <arch.h>
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+#include <lib/xlat_tables/xlat_tables_v2.h>
+
#include "iic_dvfs.h"
#include "rcar_def.h"
#include "rcar_private.h"
diff --git a/drivers/renesas/rcar/rom/rom_api.c b/drivers/renesas/rcar/rom/rom_api.c
index c14de55b6a..be38fbff3f 100644
--- a/drivers/renesas/rcar/rom/rom_api.c
+++ b/drivers/renesas/rcar/rom/rom_api.c
@@ -4,8 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
#include <stdint.h>
+
+#include <lib/mmio.h>
+
#include "rcar_def.h"
#include "rom_api.h"
diff --git a/drivers/renesas/rcar/rpc/rpc_driver.c b/drivers/renesas/rcar/rpc/rpc_driver.c
index bc7424ac61..bea2752101 100644
--- a/drivers/renesas/rcar/rpc/rpc_driver.c
+++ b/drivers/renesas/rcar/rpc/rpc_driver.c
@@ -4,12 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
#include <stdint.h>
#include <string.h>
+
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "cpg_registers.h"
#include "rpc_registers.h"
-#include "debug.h"
#include "rcar_private.h"
#define MSTPSR9_RPC_BIT (0x00020000U)
diff --git a/drivers/renesas/rcar/watchdog/swdt.c b/drivers/renesas/rcar/watchdog/swdt.c
index f9dbf86fe4..42f8653495 100644
--- a/drivers/renesas/rcar/watchdog/swdt.c
+++ b/drivers/renesas/rcar/watchdog/swdt.c
@@ -5,9 +5,10 @@
*/
#include <arch_helpers.h>
-#include <debug.h>
-#include <gicv2.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/arm/gicv2.h>
+#include <lib/mmio.h>
+
#include "rcar_def.h"
extern void gicd_set_icenabler(uintptr_t base, unsigned int id);