[rtems commit] bsps/zynq: Add BSP_ARM_A9MPCORE_UARTCLK to set the UART clock rate.
Chris Johns
chrisj at rtems.org
Thu May 22 06:45:42 UTC 2014
Module: rtems
Branch: master
Commit: 18bd35bcb3439aa4f53c22295d4c62533472fd24
Changeset: http://git.rtems.org/rtems/commit/?id=18bd35bcb3439aa4f53c22295d4c62533472fd24
Author: Chris Johns <chrisj at rtems.org>
Date: Thu May 22 16:15:34 2014 +1000
bsps/zynq: Add BSP_ARM_A9MPCORE_UARTCLK to set the UART clock rate.
This value can be found the xparameters.h file generated by the
Xilinx tools.
---
c/src/lib/libbsp/arm/xilinx-zynq/configure.ac | 5 +++++
.../lib/libbsp/arm/xilinx-zynq/console/zynq-uart.c | 4 +++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac b/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac
index bdc179d..ae1ef1c 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac
@@ -29,6 +29,11 @@ RTEMS_BSPOPTS_SET([BSP_ARM_A9MPCORE_PERIPHCLK],[xilinx_zynq_zedboard*],[66666666
RTEMS_BSPOPTS_SET([BSP_ARM_A9MPCORE_PERIPHCLK],[*],[100000000U])
RTEMS_BSPOPTS_HELP([BSP_ARM_A9MPCORE_PERIPHCLK],[ARM Cortex-A9 MPCore PERIPHCLK clock frequency in Hz])
+RTEMS_BSPOPTS_SET([BSP_ARM_A9MPCORE_UARTCLK],[xilinx_zynq_zc702*],[50000000UL])
+RTEMS_BSPOPTS_SET([BSP_ARM_A9MPCORE_UARTCLK],[xilinx_zynq_zedboard*],[50000000UL])
+RTEMS_BSPOPTS_SET([BSP_ARM_A9MPCORE_UARTCLK],[*],[50000000UL])
+RTEMS_BSPOPTS_HELP([BSP_ARM_A9MPCORE_UARTCLK],[ARM Cortex-A9 MPCore UART 0 clock frequency in Hz])
+
USE_FAST_IDLE=0
AS_IF([test "x${RTEMS_BSP}" == xxilinx_zynq_a9_qemu], [USE_FAST_IDLE=1])
diff --git a/c/src/lib/libbsp/arm/xilinx-zynq/console/zynq-uart.c b/c/src/lib/libbsp/arm/xilinx-zynq/console/zynq-uart.c
index 2a67961..92c9b21 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/console/zynq-uart.c
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/console/zynq-uart.c
@@ -15,6 +15,8 @@
#include <bsp/zynq-uart.h>
#include <bsp/zynq-uart-regs.h>
+#include <bspopts.h>
+
#include <libchip/sersupp.h>
static volatile zynq_uart *zynq_uart_get_regs(int minor)
@@ -32,7 +34,7 @@ uint32_t zynq_uart_input_clock(void) __attribute__ ((weak));
uint32_t zynq_uart_input_clock(void)
{
- return 100000000UL;
+ return BSP_ARM_A9MPCORE_UARTCLK;
}
static int zynq_cal_baud_rate(uint32_t baudrate,
More information about the vc
mailing list