[PATCH v1] spec: Move zynq-uart into its own object
Kinsey Moore
kinsey.moore at oarcorp.com
Thu Dec 3 19:47:30 UTC 2020
Currently, zynq-uart code is always built and has some requirements for
BSPs that use it. Instead of making all BSPs satisfy that requirement or
working around it by setting defaults, this moves the zynq-uart code
into its own spec build object so it can be included if needed.
---
bsps/include/dev/serial/zynq-uart.h | 4 ----
spec/build/bsps/aarch64/xilinx-zynqmp/grp.yml | 2 ++
spec/build/bsps/arm/xilinx-zynq/grp.yml | 2 ++
.../arm/xilinx-zynqmp/bspxilinxzynqmp.yml | 2 ++
spec/build/bsps/obj.yml | 4 ----
spec/build/bsps/objdevserialzynq.yml | 19 +++++++++++++++++++
6 files changed, 25 insertions(+), 8 deletions(-)
create mode 100644 spec/build/bsps/objdevserialzynq.yml
diff --git a/bsps/include/dev/serial/zynq-uart.h b/bsps/include/dev/serial/zynq-uart.h
index 0eb1dd5f29..220d9b7717 100644
--- a/bsps/include/dev/serial/zynq-uart.h
+++ b/bsps/include/dev/serial/zynq-uart.h
@@ -60,10 +60,6 @@ extern const rtems_termios_device_handler zynq_uart_handler;
#define ZYNQ_UART_DEFAULT_BAUD 115200
-#ifndef ZYNQ_CLOCK_UART
-#define ZYNQ_CLOCK_UART 100000000
-#endif
-
void zynq_uart_initialize(rtems_termios_device_context *base);
int zynq_uart_read_polled(rtems_termios_device_context *base);
diff --git a/spec/build/bsps/aarch64/xilinx-zynqmp/grp.yml b/spec/build/bsps/aarch64/xilinx-zynqmp/grp.yml
index 499947eddf..552723c61c 100644
--- a/spec/build/bsps/aarch64/xilinx-zynqmp/grp.yml
+++ b/spec/build/bsps/aarch64/xilinx-zynqmp/grp.yml
@@ -31,6 +31,8 @@ links:
uid: ../../obj
- role: build-dependency
uid: ../../objirq
+- role: build-dependency
+ uid: ../../objdevserialzynq
- role: build-dependency
uid: ../../optcachedata
- role: build-dependency
diff --git a/spec/build/bsps/arm/xilinx-zynq/grp.yml b/spec/build/bsps/arm/xilinx-zynq/grp.yml
index 47f38ebcfd..a0580619f0 100644
--- a/spec/build/bsps/arm/xilinx-zynq/grp.yml
+++ b/spec/build/bsps/arm/xilinx-zynq/grp.yml
@@ -55,6 +55,8 @@ links:
uid: ../../obj
- role: build-dependency
uid: ../../objirq
+- role: build-dependency
+ uid: ../../objdevserialzynq
- role: build-dependency
uid: linkcmds
- role: build-dependency
diff --git a/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml b/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml
index 0704c691b2..95cbc51436 100644
--- a/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml
+++ b/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml
@@ -67,6 +67,8 @@ links:
uid: ../../obj
- role: build-dependency
uid: ../../objirq
+- role: build-dependency
+ uid: ../../objdevserialzynq
- role: build-dependency
uid: ../../opto2
- role: build-dependency
diff --git a/spec/build/bsps/obj.yml b/spec/build/bsps/obj.yml
index 7ea560b47d..a454783d51 100644
--- a/spec/build/bsps/obj.yml
+++ b/spec/build/bsps/obj.yml
@@ -52,8 +52,6 @@ install:
source:
- bsps/include/dev/serial/arm-pl011-regs.h
- bsps/include/dev/serial/arm-pl011.h
- - bsps/include/dev/serial/zynq-uart-regs.h
- - bsps/include/dev/serial/zynq-uart.h
- destination: ${BSP_INCLUDEDIR}/rtems/zilog
source:
- bsps/include/rtems/zilog/z8036.h
@@ -96,8 +94,6 @@ source:
- bsps/shared/dev/serial/ns16550.c
- bsps/shared/dev/serial/ns16550-context.c
- bsps/shared/dev/serial/serprobe.c
-- bsps/shared/dev/serial/zynq-uart.c
-- bsps/shared/dev/serial/zynq-uart-polled.c
- bsps/shared/start/bootcard.c
- bsps/shared/rtems-version.c
type: build
diff --git a/spec/build/bsps/objdevserialzynq.yml b/spec/build/bsps/objdevserialzynq.yml
new file mode 100644
index 0000000000..e890ebc459
--- /dev/null
+++ b/spec/build/bsps/objdevserialzynq.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+build-type: objects
+cflags: []
+copyrights:
+- Copyright (C) 2020 On-Line Applications Research (OAR)
+cppflags: []
+cxxflags: []
+enabled-by: true
+includes: []
+install:
+- destination: ${BSP_INCLUDEDIR}/dev/serial
+ source:
+ - bsps/include/dev/serial/zynq-uart-regs.h
+ - bsps/include/dev/serial/zynq-uart.h
+links: []
+source:
+- bsps/shared/dev/serial/zynq-uart.c
+- bsps/shared/dev/serial/zynq-uart-polled.c
+type: build
--
2.20.1
More information about the devel
mailing list