summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2020-06-10 13:46:12 -0500
committerJoel Sherrill <joel@rtems.org>2020-10-05 16:11:39 -0500
commit1c036493121b0e2d84a806714030972d022f87ca (patch)
tree6daf55c0536a810133be9d62e7306ccdf604d501
parent83278070ba17f5d4a0c5df863c3a0d2733dff483 (diff)
downloadrtems-1c036493121b0e2d84a806714030972d022f87ca.tar.bz2
Move ARM PL011 UART driver
This UART driver is now needed for BSPs other than ARM.
-rw-r--r--bsps/arm/headers.am2
-rw-r--r--bsps/arm/raspberrypi/console/console-config.c2
-rw-r--r--bsps/arm/realview-pbx-a9/include/bsp/console.h2
-rw-r--r--bsps/arm/xen/console/console.c2
-rw-r--r--bsps/headers.am5
-rw-r--r--bsps/include/dev/serial/arm-pl011-regs.h (renamed from bsps/arm/include/bsp/arm-pl011-regs.h)0
-rw-r--r--bsps/include/dev/serial/arm-pl011.h (renamed from bsps/arm/include/bsp/arm-pl011.h)2
-rw-r--r--bsps/shared/dev/serial/arm-pl011.c (renamed from bsps/arm/shared/serial/arm-pl011.c)2
-rw-r--r--c/src/lib/libbsp/arm/raspberrypi/Makefile.am2
-rw-r--r--c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am2
-rw-r--r--c/src/lib/libbsp/arm/xen/Makefile.am2
-rw-r--r--spec/build/bsps/arm/grp.yml2
-rw-r--r--spec/build/bsps/arm/raspberrypi/obj.yml1
-rw-r--r--spec/build/bsps/arm/realview-pbx-a9/bsprealviewpbxa9.yml1
-rw-r--r--spec/build/bsps/arm/xen/bspxen.yml1
-rw-r--r--spec/build/bsps/obj.yml5
16 files changed, 18 insertions, 15 deletions
diff --git a/bsps/arm/headers.am b/bsps/arm/headers.am
index 3d2b09effa..f0d498c8f4 100644
--- a/bsps/arm/headers.am
+++ b/bsps/arm/headers.am
@@ -21,8 +21,6 @@ include_bsp_HEADERS += ../../../../../bsps/arm/include/bsp/arm-gic-irq.h
include_bsp_HEADERS += ../../../../../bsps/arm/include/bsp/arm-gic-regs.h
include_bsp_HEADERS += ../../../../../bsps/arm/include/bsp/arm-gic-tm27.h
include_bsp_HEADERS += ../../../../../bsps/arm/include/bsp/arm-gic.h
-include_bsp_HEADERS += ../../../../../bsps/arm/include/bsp/arm-pl011-regs.h
-include_bsp_HEADERS += ../../../../../bsps/arm/include/bsp/arm-pl011.h
include_bsp_HEADERS += ../../../../../bsps/arm/include/bsp/arm-pl050-regs.h
include_bsp_HEADERS += ../../../../../bsps/arm/include/bsp/arm-pl050.h
include_bsp_HEADERS += ../../../../../bsps/arm/include/bsp/arm-pl111-fb.h
diff --git a/bsps/arm/raspberrypi/console/console-config.c b/bsps/arm/raspberrypi/console/console-config.c
index bb0b596019..6b8eb80aa4 100644
--- a/bsps/arm/raspberrypi/console/console-config.c
+++ b/bsps/arm/raspberrypi/console/console-config.c
@@ -25,13 +25,13 @@
#include <libchip/serial.h>
#include <libfdt.h>
#include <libchip/ns16550.h>
+#include <dev/serial/arm-pl011.h>
#include <bspopts.h>
#include <bsp/usart.h>
#include <bsp/raspberrypi.h>
#include <bsp/fbcons.h>
#include <bsp.h>
-#include <bsp/arm-pl011.h>
#include <bsp/console-termios.h>
#include <bsp/fdt.h>
#include <bsp/fatal.h>
diff --git a/bsps/arm/realview-pbx-a9/include/bsp/console.h b/bsps/arm/realview-pbx-a9/include/bsp/console.h
index da2e4099e2..2019fc2509 100644
--- a/bsps/arm/realview-pbx-a9/include/bsp/console.h
+++ b/bsps/arm/realview-pbx-a9/include/bsp/console.h
@@ -15,7 +15,7 @@
#ifndef LIBBSP_ARM_REALVIEW_PBX_A9_BSP_CONSOLE_H
#define LIBBSP_ARM_REALVIEW_PBX_A9_BSP_CONSOLE_H
-#include <bsp/arm-pl011.h>
+#include <dev/serial/arm-pl011.h>
#ifdef __cplusplus
extern "C" {
diff --git a/bsps/arm/xen/console/console.c b/bsps/arm/xen/console/console.c
index 786b98f3ba..05eceae438 100644
--- a/bsps/arm/xen/console/console.c
+++ b/bsps/arm/xen/console/console.c
@@ -29,7 +29,7 @@
#include <rtems/bspIo.h>
#include <bsp.h>
-#include <bsp/arm-pl011.h>
+#include <dev/serial/arm-pl011.h>
#include <bsp/console-termios.h>
#include <bsp/irq-generic.h>
diff --git a/bsps/headers.am b/bsps/headers.am
index 5af7e43b4a..aaf13284bd 100644
--- a/bsps/headers.am
+++ b/bsps/headers.am
@@ -21,6 +21,11 @@ include_bsp_HEADERS += ../../bsps/include/bsp/u-boot.h
include_bsp_HEADERS += ../../bsps/include/bsp/uart-output-char.h
include_bsp_HEADERS += ../../bsps/include/bsp/utility.h
+include_dev_serialdir = $(includedir)/dev/serial
+include_dev_serial_HEADERS =
+include_dev_serial_HEADERS += ../../bsps/include/dev/serial/arm-pl011-regs.h
+include_dev_serial_HEADERS += ../../bsps/include/dev/serial/arm-pl011.h
+
include_grlibdir = $(includedir)/grlib
include_grlib_HEADERS =
include_grlib_HEADERS += ../../bsps/include/grlib/ahbstat.h
diff --git a/bsps/arm/include/bsp/arm-pl011-regs.h b/bsps/include/dev/serial/arm-pl011-regs.h
index afe80a6262..afe80a6262 100644
--- a/bsps/arm/include/bsp/arm-pl011-regs.h
+++ b/bsps/include/dev/serial/arm-pl011-regs.h
diff --git a/bsps/arm/include/bsp/arm-pl011.h b/bsps/include/dev/serial/arm-pl011.h
index 49ff413581..c7e65656a3 100644
--- a/bsps/arm/include/bsp/arm-pl011.h
+++ b/bsps/include/dev/serial/arm-pl011.h
@@ -25,7 +25,7 @@
#include <rtems/termiostypes.h>
-#include <bsp/arm-pl011-regs.h>
+#include <dev/serial/arm-pl011-regs.h>
#ifdef __cplusplus
extern "C" {
diff --git a/bsps/arm/shared/serial/arm-pl011.c b/bsps/shared/dev/serial/arm-pl011.c
index 44a409e551..c3cbab6f3e 100644
--- a/bsps/arm/shared/serial/arm-pl011.c
+++ b/bsps/shared/dev/serial/arm-pl011.c
@@ -12,7 +12,7 @@
* http://www.rtems.org/license/LICENSE.
*/
-#include <bsp/arm-pl011.h>
+#include <dev/serial/arm-pl011.h>
static volatile pl011 *pl011_get_regs(rtems_termios_device_context *base)
{
diff --git a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
index 48c346d3a3..01f44a7636 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
+++ b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
@@ -64,7 +64,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/raspberrypi/irq/irq.c
# Console
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/console-termios.c
-librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/serial/arm-pl011.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/arm-pl011.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/raspberrypi/console/console-config.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/raspberrypi/console/fb.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/raspberrypi/console/fbcons.c
diff --git a/c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am b/c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am
index d5549275be..77b7db4cca 100644
--- a/c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am
+++ b/c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am
@@ -62,7 +62,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/irq/irq-gic.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/console-termios-init.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/console-termios.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/getserialmouseps2.c
-librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/serial/arm-pl011.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/arm-pl011.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/serial/arm-pl050.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/realview-pbx-a9/console/console-config.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/realview-pbx-a9/console/console-polled.c
diff --git a/c/src/lib/libbsp/arm/xen/Makefile.am b/c/src/lib/libbsp/arm/xen/Makefile.am
index fecb665af4..18cce5ec29 100644
--- a/c/src/lib/libbsp/arm/xen/Makefile.am
+++ b/c/src/lib/libbsp/arm/xen/Makefile.am
@@ -39,7 +39,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/irq/irq-gic.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/xen/console/console.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/console-termios.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/console-termios-init.c
-librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/serial/arm-pl011.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/arm-pl011.c
# timer
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/btimer/btimer-stub.c
diff --git a/spec/build/bsps/arm/grp.yml b/spec/build/bsps/arm/grp.yml
index 2bf0b82423..b6fcb56a25 100644
--- a/spec/build/bsps/arm/grp.yml
+++ b/spec/build/bsps/arm/grp.yml
@@ -26,8 +26,6 @@ install:
- bsps/arm/include/bsp/arm-gic-regs.h
- bsps/arm/include/bsp/arm-gic-tm27.h
- bsps/arm/include/bsp/arm-gic.h
- - bsps/arm/include/bsp/arm-pl011-regs.h
- - bsps/arm/include/bsp/arm-pl011.h
- bsps/arm/include/bsp/arm-pl050-regs.h
- bsps/arm/include/bsp/arm-pl050.h
- bsps/arm/include/bsp/arm-pl111-fb.h
diff --git a/spec/build/bsps/arm/raspberrypi/obj.yml b/spec/build/bsps/arm/raspberrypi/obj.yml
index 45180cdd5f..a120d8007b 100644
--- a/spec/build/bsps/arm/raspberrypi/obj.yml
+++ b/spec/build/bsps/arm/raspberrypi/obj.yml
@@ -47,7 +47,6 @@ source:
- bsps/arm/shared/cache/cache-v7ar-disable-data.S
- bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
- bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
-- bsps/arm/shared/serial/arm-pl011.c
- bsps/arm/shared/start/bsp-start-memcpy.S
- bsps/shared/dev/cpucounter/cpucounterfrequency.c
- bsps/shared/dev/cpucounter/cpucounterread.c
diff --git a/spec/build/bsps/arm/realview-pbx-a9/bsprealviewpbxa9.yml b/spec/build/bsps/arm/realview-pbx-a9/bsprealviewpbxa9.yml
index 2721152b93..9b24f8eae2 100644
--- a/spec/build/bsps/arm/realview-pbx-a9/bsprealviewpbxa9.yml
+++ b/spec/build/bsps/arm/realview-pbx-a9/bsprealviewpbxa9.yml
@@ -68,7 +68,6 @@ source:
- bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
- bsps/arm/shared/fb/arm-pl111.c
- bsps/arm/shared/irq/irq-gic.c
-- bsps/arm/shared/serial/arm-pl011.c
- bsps/arm/shared/serial/arm-pl050.c
- bsps/arm/shared/start/bsp-start-memcpy.S
- bsps/shared/dev/btimer/btimer-stub.c
diff --git a/spec/build/bsps/arm/xen/bspxen.yml b/spec/build/bsps/arm/xen/bspxen.yml
index e469170e34..df14fcce66 100644
--- a/spec/build/bsps/arm/xen/bspxen.yml
+++ b/spec/build/bsps/arm/xen/bspxen.yml
@@ -60,7 +60,6 @@ source:
- 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
-- bsps/arm/shared/serial/arm-pl011.c
- bsps/arm/shared/start/bsp-start-memcpy.S
- bsps/arm/xen/console/console.c
- bsps/arm/xen/start/bspstart.c
diff --git a/spec/build/bsps/obj.yml b/spec/build/bsps/obj.yml
index 8809238057..29084a70b8 100644
--- a/spec/build/bsps/obj.yml
+++ b/spec/build/bsps/obj.yml
@@ -52,6 +52,10 @@ install:
- bsps/include/libchip/spi-sd-card.h
- bsps/include/libchip/wd80x3.h
- bsps/include/libchip/z85c30.h
+- destination: ${BSP_INCLUDEDIR}/dev/serial
+ source:
+ - bsps/include/dev/serial/arm-pl011-regs.h
+ - bsps/include/dev/serial/arm-pl011.h
- destination: ${BSP_INCLUDEDIR}/rtems/zilog
source:
- bsps/include/rtems/zilog/z8036.h
@@ -91,6 +95,7 @@ source:
- bsps/shared/dev/rtc/mc146818a.c
- bsps/shared/dev/rtc/mc146818a_ioreg.c
- bsps/shared/dev/rtc/rtcprobe.c
+- bsps/shared/dev/serial/arm-pl011.c
- bsps/shared/dev/serial/mc68681_baud.c
- bsps/shared/dev/serial/mc68681.c
- bsps/shared/dev/serial/mc68681_reg2.c