[PATCH v3 03/10] bsps: Break out AArch32 portions of GPT driver
Kinsey Moore
kinsey.moore at oarcorp.com
Sun Oct 4 04:18:47 UTC 2020
This breaks AArch32-specific portions of the ARM GPT driver into their
own file so that the generic code can be moved for reuse by other
architectures.
---
bsps/arm/imx/headers.am | 4 +
bsps/arm/imx/include/bsp.h | 2 -
bsps/arm/imx/start/bspstart.c | 3 +-
.../shared/clock/arm-generic-timer-aarch32.c | 76 +++++++++++++++++++
bsps/arm/xen/headers.am | 4 +
bsps/arm/xen/include/bsp.h | 2 -
bsps/arm/xen/start/bspstart.c | 3 +-
bsps/arm/xilinx-zynqmp/headers.am | 4 +
bsps/arm/xilinx-zynqmp/include/bsp.h | 2 -
bsps/arm/xilinx-zynqmp/start/bspstart.c | 3 +-
bsps/include/dev/clock/arm-generic-timer.h | 76 +++++++++++++++++++
.../dev/clock/arm-generic-timer.c} | 65 ++++------------
c/src/lib/libbsp/arm/imx/Makefile.am | 3 +-
c/src/lib/libbsp/arm/xen/Makefile.am | 3 +-
.../lib/libbsp/arm/xilinx-zynqmp/Makefile.am | 3 +-
spec/build/bsps/arm/imx/bspimx.yml | 6 +-
spec/build/bsps/arm/xen/bspxen.yml | 6 +-
.../arm/xilinx-zynqmp/bspxilinxzynqmp.yml | 6 +-
18 files changed, 205 insertions(+), 66 deletions(-)
create mode 100644 bsps/arm/shared/clock/arm-generic-timer-aarch32.c
create mode 100644 bsps/include/dev/clock/arm-generic-timer.h
rename bsps/{arm/shared/clock/clock-generic-timer.c => shared/dev/clock/arm-generic-timer.c} (71%)
diff --git a/bsps/arm/imx/headers.am b/bsps/arm/imx/headers.am
index 3a093b1698..9863f34300 100644
--- a/bsps/arm/imx/headers.am
+++ b/bsps/arm/imx/headers.am
@@ -21,3 +21,7 @@ include_bspdir = $(includedir)/bsp
include_bsp_HEADERS =
include_bsp_HEADERS += ../../../../../../bsps/arm/imx/include/bsp/imx-gpio.h
include_bsp_HEADERS += ../../../../../../bsps/arm/imx/include/bsp/irq.h
+
+include_dev_clockdir = $(includedir)/dev/clock
+include_dev_clock_HEADERS =
+include_dev_clock_HEADERS += ../../../../../../bsps/include/dev/clock/arm-generic-timer.h
diff --git a/bsps/arm/imx/include/bsp.h b/bsps/arm/imx/include/bsp.h
index 134b3fd858..99b7a0d1d7 100644
--- a/bsps/arm/imx/include/bsp.h
+++ b/bsps/arm/imx/include/bsp.h
@@ -57,8 +57,6 @@ extern uintptr_t imx_gic_dist_base;
#define BSP_ARM_A9MPCORE_SCU_BASE 0
-void arm_generic_timer_get_config(uint32_t *frequency, uint32_t *irq);
-
void *imx_get_reg_of_node(const void *fdt, int node);
int imx_iomux_configure_pins(const void *fdt, uint32_t phandle);
diff --git a/bsps/arm/imx/start/bspstart.c b/bsps/arm/imx/start/bspstart.c
index 5fb07bf60a..ff4b204790 100644
--- a/bsps/arm/imx/start/bspstart.c
+++ b/bsps/arm/imx/start/bspstart.c
@@ -18,6 +18,7 @@
#include <bsp/fdt.h>
#include <bsp/irq-generic.h>
#include <bsp/linker-symbols.h>
+#include <dev/clock/arm-generic-timer.h>
#include <libfdt.h>
@@ -58,7 +59,7 @@ uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells)
return intr[1] + MAGIC_IRQ_OFFSET;
}
-void arm_generic_timer_get_config(
+void aarch_generic_timer_get_config(
uint32_t *frequency,
uint32_t *irq
)
diff --git a/bsps/arm/shared/clock/arm-generic-timer-aarch32.c b/bsps/arm/shared/clock/arm-generic-timer-aarch32.c
new file mode 100644
index 0000000000..8ce65ee5ad
--- /dev/null
+++ b/bsps/arm/shared/clock/arm-generic-timer-aarch32.c
@@ -0,0 +1,76 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSBSPsARMShared
+ *
+ * @brief ARM-specific clock driver functions.
+ */
+
+/*
+ * Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
+ * Written by Kinsey Moore <kinsey.moore at oarcorp.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <libcpu/arm-cp15.h>
+#include <dev/clock/arm-generic-timer.h>
+
+uint64_t aarch_gt_clock_get_compare_value(void)
+{
+#ifdef ARM_GENERIC_TIMER_USE_VIRTUAL
+ return arm_cp15_get_counter_pl1_virtual_compare_value();
+#else
+ return arm_cp15_get_counter_pl1_physical_compare_value();
+#endif
+}
+
+void aarch_gt_clock_set_compare_value(uint64_t cval)
+{
+#ifdef ARM_GENERIC_TIMER_USE_VIRTUAL
+ arm_cp15_set_counter_pl1_virtual_compare_value(cval);
+#else
+ arm_cp15_set_counter_pl1_physical_compare_value(cval);
+#endif
+}
+
+uint64_t aarch_gt_clock_get_count(void)
+{
+#ifdef ARM_GENERIC_TIMER_USE_VIRTUAL
+ return arm_cp15_get_counter_virtual_count();
+#else
+ return arm_cp15_get_counter_physical_count();
+#endif
+}
+
+void aarch_gt_clock_set_control(uint32_t ctl)
+{
+#ifdef ARM_GENERIC_TIMER_USE_VIRTUAL
+ arm_cp15_set_counter_pl1_virtual_timer_control(ctl);
+#else
+ arm_cp15_set_counter_pl1_physical_timer_control(ctl);
+#endif
+}
+
+
diff --git a/bsps/arm/xen/headers.am b/bsps/arm/xen/headers.am
index 952fa37670..562247447d 100644
--- a/bsps/arm/xen/headers.am
+++ b/bsps/arm/xen/headers.am
@@ -8,3 +8,7 @@ include_HEADERS += ../../../../../../bsps/arm/xen/include/tm27.h
include_bspdir = $(includedir)/bsp
include_bsp_HEADERS =
include_bsp_HEADERS += ../../../../../../bsps/arm/xen/include/bsp/irq.h
+
+include_dev_clockdir = $(includedir)/dev/clock
+include_dev_clock_HEADERS =
+include_dev_clock_HEADERS += ../../../../../../bsps/include/dev/clock/arm-generic-timer.h
diff --git a/bsps/arm/xen/include/bsp.h b/bsps/arm/xen/include/bsp.h
index e5b23a902e..ae03d81c1e 100644
--- a/bsps/arm/xen/include/bsp.h
+++ b/bsps/arm/xen/include/bsp.h
@@ -71,8 +71,6 @@ extern "C" {
#define BSP_XEN_VPL011_BASE 0x22000000
#define BSP_XEN_VPL011_LENGTH 0x1000
-void arm_generic_timer_get_config(uint32_t *frequency, uint32_t *irq);
-
BSP_START_TEXT_SECTION void bsp_xen_setup_mmu_and_cache(void);
#ifdef __cplusplus
diff --git a/bsps/arm/xen/start/bspstart.c b/bsps/arm/xen/start/bspstart.c
index 6b826fc917..b3166ca264 100644
--- a/bsps/arm/xen/start/bspstart.c
+++ b/bsps/arm/xen/start/bspstart.c
@@ -30,10 +30,11 @@
#include <bsp/bootcard.h>
#include <bsp/irq-generic.h>
#include <bsp/linker-symbols.h>
+#include <dev/clock/arm-generic-timer.h>
#include <libcpu/arm-cp15.h>
-void arm_generic_timer_get_config( uint32_t *frequency, uint32_t *irq )
+void aarch_generic_timer_get_config( uint32_t *frequency, uint32_t *irq )
{
*frequency = arm_cp15_get_counter_frequency();
diff --git a/bsps/arm/xilinx-zynqmp/headers.am b/bsps/arm/xilinx-zynqmp/headers.am
index 6cb3a00a52..f30e94a095 100644
--- a/bsps/arm/xilinx-zynqmp/headers.am
+++ b/bsps/arm/xilinx-zynqmp/headers.am
@@ -8,3 +8,7 @@ include_HEADERS += ../../../../../../bsps/arm/xilinx-zynqmp/include/tm27.h
include_bspdir = $(includedir)/bsp
include_bsp_HEADERS =
include_bsp_HEADERS += ../../../../../../bsps/arm/xilinx-zynqmp/include/bsp/irq.h
+
+include_dev_clockdir = $(includedir)/dev/clock
+include_dev_clock_HEADERS =
+include_dev_clock_HEADERS += ../../../../../../bsps/include/dev/clock/arm-generic-timer.h
diff --git a/bsps/arm/xilinx-zynqmp/include/bsp.h b/bsps/arm/xilinx-zynqmp/include/bsp.h
index 92f4d04421..9d33cf6134 100644
--- a/bsps/arm/xilinx-zynqmp/include/bsp.h
+++ b/bsps/arm/xilinx-zynqmp/include/bsp.h
@@ -79,8 +79,6 @@ extern "C" {
*/
BSP_START_TEXT_SECTION void zynqmp_setup_mmu_and_cache(void);
-void arm_generic_timer_get_config(uint32_t *frequency, uint32_t *irq);
-
void zynqmp_debug_console_flush(void);
#ifdef __cplusplus
diff --git a/bsps/arm/xilinx-zynqmp/start/bspstart.c b/bsps/arm/xilinx-zynqmp/start/bspstart.c
index ff79d78fed..eaa2b7d423 100644
--- a/bsps/arm/xilinx-zynqmp/start/bspstart.c
+++ b/bsps/arm/xilinx-zynqmp/start/bspstart.c
@@ -34,10 +34,11 @@
#include <bsp/bootcard.h>
#include <bsp/irq-generic.h>
#include <bsp/linker-symbols.h>
+#include <dev/clock/arm-generic-timer.h>
#include <libcpu/arm-cp15.h>
-void arm_generic_timer_get_config(uint32_t *frequency, uint32_t *irq)
+void aarch_generic_timer_get_config(uint32_t *frequency, uint32_t *irq)
{
#ifdef ARM_GENERIC_TIMER_FREQ
*frequency = ARM_GENERIC_TIMER_FREQ;
diff --git a/bsps/include/dev/clock/arm-generic-timer.h b/bsps/include/dev/clock/arm-generic-timer.h
new file mode 100644
index 0000000000..100c736c06
--- /dev/null
+++ b/bsps/include/dev/clock/arm-generic-timer.h
@@ -0,0 +1,76 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSBSPsShared
+ *
+ * @brief Header defining architecture-specific clock functions.
+ */
+
+/*
+ * Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
+ * Written by Kinsey Moore <kinsey.moore at oarcorp.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <rtems/score/basedefs.h>
+
+/**
+ * This function returns the current compare value for the ARM General Purpose
+ * Timer.
+ *
+ * @return The current compare value.
+ */
+uint64_t aarch_gt_clock_get_compare_value(void);
+
+/**
+ * This function sets the current compare value for the ARM General Purpose
+ * Timer.
+ *
+ * @param[in] cval The value to set as the compare value
+ */
+void aarch_gt_clock_set_compare_value(uint64_t cval);
+
+/**
+ * This function returns the count for the ARM General Purpose Timer.
+ *
+ * @return The current count.
+ */
+uint64_t aarch_gt_clock_get_count(void);
+
+/**
+ * This function sets the control register for the ARM General Purpose Timer.
+ *
+ * @param[in] ctl The value to set to the control register
+ */
+void aarch_gt_clock_set_control(uint32_t ctl);
+
+/**
+ * This function gets the frequency and IRQ number used by the ARM General
+ * Purpose Timer.
+ *
+ * @param[out] frequency The frequency at which the timer will fire.
+ * @param[out] irq The number of the IRQ on which the timer will fire.
+ */
+void aarch_generic_timer_get_config(uint32_t *frequency, uint32_t *irq);
diff --git a/bsps/arm/shared/clock/clock-generic-timer.c b/bsps/shared/dev/clock/arm-generic-timer.c
similarity index 71%
rename from bsps/arm/shared/clock/clock-generic-timer.c
rename to bsps/shared/dev/clock/arm-generic-timer.c
index 072583473e..6a5607c063 100644
--- a/bsps/arm/shared/clock/clock-generic-timer.c
+++ b/bsps/shared/dev/clock/arm-generic-timer.c
@@ -16,19 +16,18 @@
#include <bsp/fatal.h>
#include <bsp/irq.h>
#include <bsp/irq-generic.h>
+#include <dev/clock/arm-generic-timer.h>
#include <rtems/counter.h>
#include <rtems/sysinit.h>
#include <rtems/timecounter.h>
#include <rtems/score/smpimpl.h>
-#include <libcpu/arm-cp15.h>
-
/*
- * Clock driver using the ARMv7-AR Generic Timer. The BSP must provide the
- * following function via <bsp.h>:
+ * Clock driver using the ARMv7-AR/AArch64 Generic Timer. The BSP must provide the
+ * following function:
*
- * void arm_generic_timer_get_config(uint32_t *frequency, uint32_t *irq);
+ * void aarch_generic_timer_get_config(uint32_t *frequency, uint32_t *irq);
*
* The BSP may optionally define ARM_GENERIC_TIMER_USE_VIRTUAL in <bsp.h> to
* use the virtual timer instead of the physical timer.
@@ -45,53 +44,17 @@ static arm_gt_clock_context arm_gt_clock_instance;
/* This is defined in dev/clock/clockimpl.h */
void Clock_isr(rtems_irq_hdl_param arg);
-static inline uint64_t arm_gt_clock_get_compare_value(void)
-{
-#ifdef ARM_GENERIC_TIMER_USE_VIRTUAL
- return arm_cp15_get_counter_pl1_virtual_compare_value();
-#else
- return arm_cp15_get_counter_pl1_physical_compare_value();
-#endif
-}
-
-static inline void arm_gt_clock_set_compare_value(uint64_t cval)
-{
-#ifdef ARM_GENERIC_TIMER_USE_VIRTUAL
- arm_cp15_set_counter_pl1_virtual_compare_value(cval);
-#else
- arm_cp15_set_counter_pl1_physical_compare_value(cval);
-#endif
-}
-
-static inline uint64_t arm_gt_clock_get_count(void)
-{
-#ifdef ARM_GENERIC_TIMER_USE_VIRTUAL
- return arm_cp15_get_counter_virtual_count();
-#else
- return arm_cp15_get_counter_physical_count();
-#endif
-}
-
-static inline void arm_gt_clock_set_control(uint32_t ctl)
-{
-#ifdef ARM_GENERIC_TIMER_USE_VIRTUAL
- arm_cp15_set_counter_pl1_virtual_timer_control(ctl);
-#else
- arm_cp15_set_counter_pl1_physical_timer_control(ctl);
-#endif
-}
-
static void arm_gt_clock_at_tick(void)
{
uint64_t cval;
uint32_t interval;
interval = arm_gt_clock_instance.interval;
- cval = arm_gt_clock_get_compare_value();
+ cval = aarch_gt_clock_get_compare_value();
cval += interval;
- arm_gt_clock_set_compare_value(cval);
+ aarch_gt_clock_set_compare_value(cval);
#ifdef ARM_GENERIC_TIMER_UNMASK_AT_TICK
- arm_gt_clock_set_control(0x1);
+ aarch_gt_clock_set_control(0x1);
#endif /* ARM_GENERIC_TIMER_UNMASK_AT_TICK */
}
@@ -113,13 +76,13 @@ static void arm_gt_clock_handler_install(void)
static uint32_t arm_gt_clock_get_timecount(struct timecounter *tc)
{
- return (uint32_t) arm_gt_clock_get_count();
+ return (uint32_t) aarch_gt_clock_get_count();
}
static void arm_gt_clock_gt_init(uint64_t cval)
{
- arm_gt_clock_set_compare_value(cval);
- arm_gt_clock_set_control(0x1);
+ aarch_gt_clock_set_compare_value(cval);
+ aarch_gt_clock_set_control(0x1);
}
#if defined(RTEMS_SMP) && !defined(CLOCK_DRIVER_USE_ONLY_BOOT_PROCESSOR)
@@ -152,7 +115,7 @@ static void arm_gt_clock_initialize(void)
frequency = tc->tc_frequency;
us_per_tick = rtems_configuration_get_microseconds_per_tick();
interval = (uint32_t) ((frequency * us_per_tick) / 1000000);
- cval = arm_gt_clock_get_count();
+ cval = aarch_gt_clock_get_count();
cval += interval;
arm_gt_clock_instance.interval = interval;
@@ -172,15 +135,15 @@ uint32_t _CPU_Counter_frequency(void)
CPU_Counter_ticks _CPU_Counter_read(void)
{
- return (uint32_t) arm_gt_clock_get_count();
+ return (uint32_t) aarch_gt_clock_get_count();
}
static void arm_gt_clock_early_init(void)
{
uint32_t frequency;
- arm_gt_clock_set_control(0x3);
+ aarch_gt_clock_set_control(0x3);
- arm_generic_timer_get_config(
+ aarch_generic_timer_get_config(
&frequency,
&arm_gt_clock_instance.irq
);
diff --git a/c/src/lib/libbsp/arm/imx/Makefile.am b/c/src/lib/libbsp/arm/imx/Makefile.am
index f71508a077..ad221f7576 100644
--- a/c/src/lib/libbsp/arm/imx/Makefile.am
+++ b/c/src/lib/libbsp/arm/imx/Makefile.am
@@ -58,7 +58,8 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/console-termio
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/imx/console/console-config.c
# Clock
-librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/clock/clock-generic-timer.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/clock/arm-generic-timer.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/clock/arm-generic-timer-aarch32.c
# Cache
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cache/cache-cp15.c
diff --git a/c/src/lib/libbsp/arm/xen/Makefile.am b/c/src/lib/libbsp/arm/xen/Makefile.am
index 18cce5ec29..c8f7eb4f20 100644
--- a/c/src/lib/libbsp/arm/xen/Makefile.am
+++ b/c/src/lib/libbsp/arm/xen/Makefile.am
@@ -29,7 +29,8 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/start/bsp-start-memcp
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
# clock
-librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/clock/clock-generic-timer.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/clock/arm-generic-timer.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/clock/arm-generic-timer-aarch32.c
# cache
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cache/cache-cp15.c
# irq
diff --git a/c/src/lib/libbsp/arm/xilinx-zynqmp/Makefile.am b/c/src/lib/libbsp/arm/xilinx-zynqmp/Makefile.am
index 0b49990ce7..ac67c60e93 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynqmp/Makefile.am
+++ b/c/src/lib/libbsp/arm/xilinx-zynqmp/Makefile.am
@@ -64,7 +64,8 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/serial/zynq-uart.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/serial/zynq-uart-polled.c
# Clock
-librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/clock/clock-generic-timer.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/clock/arm-generic-timer.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/clock/arm-generic-timer-aarch32.c
# Cache
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cache/cache-cp15.c
diff --git a/spec/build/bsps/arm/imx/bspimx.yml b/spec/build/bsps/arm/imx/bspimx.yml
index 0d32669a4a..48d41890c7 100644
--- a/spec/build/bsps/arm/imx/bspimx.yml
+++ b/spec/build/bsps/arm/imx/bspimx.yml
@@ -29,6 +29,9 @@ install:
source:
- bsps/arm/imx/include/bsp/imx-gpio.h
- bsps/arm/imx/include/bsp/irq.h
+- destination: ${BSP_INCLUDEDIR}/dev/clock
+ source:
+ - bsps/include/dev/clock/arm-generic-timer.h
- destination: ${BSP_LIBDIR}
source:
- bsps/arm/imx/start/linkcmds
@@ -88,7 +91,8 @@ source:
- bsps/arm/imx/start/imx_iomux.c
- bsps/arm/shared/cache/cache-cp15.c
- bsps/arm/shared/cache/cache-v7ar-disable-data.S
-- bsps/arm/shared/clock/clock-generic-timer.c
+- bsps/shared/dev/clock/arm-generic-timer.c
+- bsps/arm/shared/clock/arm-generic-timer-aarch32.c
- bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
- bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
- bsps/arm/shared/irq/irq-gic.c
diff --git a/spec/build/bsps/arm/xen/bspxen.yml b/spec/build/bsps/arm/xen/bspxen.yml
index df14fcce66..59d3f8581e 100644
--- a/spec/build/bsps/arm/xen/bspxen.yml
+++ b/spec/build/bsps/arm/xen/bspxen.yml
@@ -17,6 +17,9 @@ install:
- destination: ${BSP_INCLUDEDIR}/bsp
source:
- bsps/arm/xen/include/bsp/irq.h
+- destination: ${BSP_INCLUDEDIR}/dev/clock
+ source:
+ - bsps/include/dev/clock/arm-generic-timer.h
links:
- role: build-dependency
uid: ../grp
@@ -56,7 +59,8 @@ links:
uid: ../../bspopts
source:
- bsps/arm/shared/cache/cache-cp15.c
-- bsps/arm/shared/clock/clock-generic-timer.c
+- bsps/shared/dev/clock/arm-generic-timer.c
+- bsps/arm/shared/clock/arm-generic-timer-aarch32.c
- bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
- bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
- bsps/arm/shared/irq/irq-gic.c
diff --git a/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml b/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml
index fe56228c38..ea3895ab99 100644
--- a/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml
+++ b/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml
@@ -17,6 +17,9 @@ install:
- destination: ${BSP_INCLUDEDIR}/bsp
source:
- bsps/arm/xilinx-zynqmp/include/bsp/irq.h
+- destination: ${BSP_INCLUDEDIR}/dev/clock
+ source:
+ - bsps/include/dev/clock/arm-generic-timer.h
links:
- role: build-dependency
uid: ../grp
@@ -72,7 +75,8 @@ links:
uid: ../../bspopts
source:
- bsps/arm/shared/cache/cache-cp15.c
-- bsps/arm/shared/clock/clock-generic-timer.c
+- bsps/shared/dev/clock/arm-generic-timer.c
+- bsps/arm/shared/clock/arm-generic-timer-aarch32.c
- bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
- bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
- bsps/arm/shared/irq/irq-gic.c
--
2.20.1
More information about the devel
mailing list