summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/shared/include
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-12-19 14:49:11 +1100
committerChris Johns <chrisj@rtems.org>2013-12-19 14:49:11 +1100
commitf466e567a1f2d24df9642c1859c9788836de31ab (patch)
tree0849370e54c3796211538919530f2003552aab2d /c/src/lib/libbsp/arm/shared/include
parentarm/zynq: Add support for application supplied MMU tables. (diff)
downloadrtems-f466e567a1f2d24df9642c1859c9788836de31ab.tar.bz2
arm/a9mpcore: Add support to get the clock via a weak linkage function.
This allows an application to provide a localised clock freq with needing to go down the BSP opts path. This is important with the Zynq where the Xilinx tools generate the frequency.
Diffstat (limited to 'c/src/lib/libbsp/arm/shared/include')
-rw-r--r--c/src/lib/libbsp/arm/shared/include/arm-a9mpcore-clock.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/shared/include/arm-a9mpcore-clock.h b/c/src/lib/libbsp/arm/shared/include/arm-a9mpcore-clock.h
new file mode 100644
index 0000000000..3440b2b8bf
--- /dev/null
+++ b/c/src/lib/libbsp/arm/shared/include/arm-a9mpcore-clock.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2013 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifndef LIBBSP_ARM_SHARED_ARM_A9MPCORE_CLOCK_H
+#define LIBBSP_ARM_SHARED_ARM_A9MPCORE_CLOCK_H
+
+#include <bsp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*
+ * Return the peripheral clock. For systems such as the zynq this
+ * is controlled by the PL logic generation and can vary. Provide this
+ * function in your application to override the BSP default.
+ */
+uint32_t a9mpcore_clock_periphclk(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* LIBBSP_ARM_SHARED_ARM_A9MPCORE_CLOCK_H */