aboutsummaryrefslogtreecommitdiff
path: root/drivers/renesas/rcar
diff options
context:
space:
mode:
authorBiju Das <biju.das.jz@bp.renesas.com>2020-12-16 10:46:36 +0000
committerBiju Das <biju.das.jz@bp.renesas.com>2021-01-13 13:03:48 +0000
commitcdcf1f1492dd05b8f9038e1bbdd091e93c153a3c (patch)
treefa242ea0c4ce8695dfd499157eae556cb1feb3ef /drivers/renesas/rcar
parent865e34741b02b3a9ddf9f652f2649407f33debb0 (diff)
downloadtrusted-firmware-a-cdcf1f1492dd05b8f9038e1bbdd091e93c153a3c.tar.gz
drivers: renesas: delay: Move to common
Move delay driver code to common directory, so that the same code can be re-used by both R-Car Gen3 and RZ/G2 platforms. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Change-Id: I5e806bd0e0a0a4b436048513b7089db90ff9805f
Diffstat (limited to 'drivers/renesas/rcar')
-rw-r--r--drivers/renesas/rcar/delay/micro_delay.c31
-rw-r--r--drivers/renesas/rcar/delay/micro_delay.h15
2 files changed, 0 insertions, 46 deletions
diff --git a/drivers/renesas/rcar/delay/micro_delay.c b/drivers/renesas/rcar/delay/micro_delay.c
deleted file mode 100644
index a5e2a69285..0000000000
--- a/drivers/renesas/rcar/delay/micro_delay.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2018-2020, Renesas Electronics Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <arch.h>
-#include <arch_helpers.h>
-
-#include "micro_delay.h"
-
-#define RCAR_CONV_MICROSEC 1000000U
-
-void
-#if IMAGE_BL31
- __attribute__ ((section(".system_ram")))
-#endif
- rcar_micro_delay(uint64_t micro_sec)
-{
- uint64_t freq;
- uint64_t base_count;
- uint64_t get_count;
- uint64_t wait_time = 0U;
-
- freq = read_cntfrq_el0();
- base_count = read_cntpct_el0();
- while (micro_sec > wait_time) {
- get_count = read_cntpct_el0();
- wait_time = ((get_count - base_count) * RCAR_CONV_MICROSEC) / freq;
- }
-}
diff --git a/drivers/renesas/rcar/delay/micro_delay.h b/drivers/renesas/rcar/delay/micro_delay.h
deleted file mode 100644
index 37b71f80a6..0000000000
--- a/drivers/renesas/rcar/delay/micro_delay.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef MICRO_DELAY_H
-#define MICRO_DELAY_H
-
-#ifndef __ASSEMBLER__
-#include <stdint.h>
-void rcar_micro_delay(uint64_t micro_sec);
-#endif
-
-#endif /* MICRO_DELAY_H */