From 4cb2b07402a111cf38fa8f6ade5e68d270aee0d8 Mon Sep 17 00:00:00 2001 From: Christian Mauderer Date: Fri, 31 Mar 2023 16:56:51 +0200 Subject: bsps/imxrt: (Re-)Apply RTEMS patches to new lib Reapply patches used in the old version of the NXP library and apply patches necessary for the new version of the library. --- bsps/arm/imxrt/mcux-sdk/drivers/qtmr_1/fsl_qtmr.h | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'bsps/arm/imxrt/mcux-sdk/drivers/qtmr_1/fsl_qtmr.h') diff --git a/bsps/arm/imxrt/mcux-sdk/drivers/qtmr_1/fsl_qtmr.h b/bsps/arm/imxrt/mcux-sdk/drivers/qtmr_1/fsl_qtmr.h index ec5d727e08..0b45dace35 100644 --- a/bsps/arm/imxrt/mcux-sdk/drivers/qtmr_1/fsl_qtmr.h +++ b/bsps/arm/imxrt/mcux-sdk/drivers/qtmr_1/fsl_qtmr.h @@ -8,6 +8,9 @@ #define _FSL_QTMR_H_ #include "fsl_common.h" +#ifdef __rtems__ +#include +#endif /* __rtems__ */ /*! * @addtogroup qtmr @@ -191,6 +194,37 @@ extern "C" { * @name Initialization and deinitialization * @{ */ +#ifdef __rtems__ +/*! + * @brief Return the timer base based on a FDT node. + * + * @param fdt Pointer to the fdt + * @param node The FDT node + * + * @return Pointer to the timer. NULL on error (for example if node isn't + * compatible). + */ +TMR_Type *QTMR_get_regs_from_fdt(const void *fdt, int node); + +/*! + * @brief Return the timer IRQ vector based on a FDT node. + * + * @param fdt Pointer to the fdt + * @param node The FDT node + * + * @return IRQ vector number. BSP_INTERRUPT_VECTOR_INVALID on error. + */ +rtems_vector_number QTMR_get_IRQ_from_fdt(const void *fdt, int node); + +/*! + * @brief Return the clock source frequency of the quad timer. + * + * @param base Quad Timer peripheral base address. + * + * @return Clock frequency value in hertz. + */ +uint32_t QTMR_get_src_clk(TMR_Type *base); +#endif /* __rtems__ */ /*! * @brief Ungates the Quad Timer clock and configures the peripheral for basic operation. -- cgit v1.2.3