Re: rtems-libbsd build error

2019-04-10 Thread Christian Mauderer
Am 09.04.19 um 18:12 schrieb Vijay Kumar Banerjee:
> Hi,
> 
> I have imported and ported the the drivers in 2 pairs(import and port)
> of commits 
> for each one. Please have a look at this branch 
> https://github.com/thelunatic/rtems-libbsd/commits/tda19988

One detail: You have a commit named "tda19988.c: import from FreeBSD".
Please remove the ".c".

Maybe it would be a good idea to split of the I2C part and put it in
front of the other two parts. You can develop and test that independent
with a test that just accesses some of the I2C devices on the board via
the FreeBSD API and the translation driver discussed below.

> 
> I have also tried running the media01.exe and have seen it running fine
> without
> throwing any exceptions.
> 
> I have used the fb.c and iicbus.c codes from the freebsd source. From
> what I 
> understand, I think the next big steps would be to write an RTEMS 
> implementation layer for these portions of the code? And then a test in the 
> libbsd, like media01, to write to the /dev/fb0 
> 
> Can you please help me chalk out a rough outline of the next set of
> actions? :)

As far as I can tell, there are two possible I2C buses here:

1. The one between the AM335x and the TDA19988.

2. The one directly on the HDMI connector (called HDMI_DSCL and
HDMI_DSDA). I assume that's an I2C bus too.

For 1. the RTEMS driver should be used. You'll need some code that
translates the FreeBSD API to the one used in RTEMS. Basically that will
just be a FreeBSD-I2C-driver.

For 2: If that even is an independent I2C bus, you can use the driver
provided by FreeBSD. I don't think that it is necessary to translate to
the RTEMS API here.

> 
> Thanks
> 
> On Tue, Apr 9, 2019 at 5:28 AM Chris Johns  > wrote:
> 
> On 8/4/19 12:30 am, Vijay Kumar Banerjee wrote:
> > On Sun, Apr 7, 2019 at 6:24 PM Christian Mauderer
> mailto:l...@c-mauderer.de>
> > >> wrote:
> >     Am 07.04.19 um 14:50 schrieb Vijay Kumar Banerjee:
> >     > On Sun, Apr 7, 2019 at 6:08 PM Christian Mauderer
> mailto:l...@c-mauderer.de>
> >     >
> >     > 
>  >     >     Am 07.04.19 um 14:35 schrieb Vijay Kumar Banerjee:
> >     >     > On Sun, Apr 7, 2019 at 5:37 PM Christian Mauderer
> >     >     mailto:l...@c-mauderer.de>
> >
> >     
> >>
> >     >     > 
> >
> >     
>  wrote:
> >     >     >     Am 07.04.19 um 13:08 schrieb Vijay Kumar Banerjee:
> >
> >     I don't think that there are a lot of docs for how to test.
> Although I'm
> >     sure that there are some scripts to run a number of libbsd
> tests, I'm
> >     not sure where. Maybe in the RTEMS tester but I think that is
> mainly for
> >     the core tests?
> 
> The documentation for testing can be found here ...
> 
>  https://docs.rtems.org/branches/master/user/testing/index.html
> 
> > so far I know, RTEMS Tester is only for core tests.
> 
> The `rtems-test` command checks the for test start and end banners.
> I am not
> sure if libbsd supports the test banners. Maybe it could now with
> Sebastian's
> movement of the test support code into libtest.
> 
> > I'll ask in the devel if there's some way to run libbsd test with
> the tester.
> 
> There is the `rtems-run` command which has similar args to
> `rtems-test`. It does
> suffer from a limitation I have not fixed which is stdin is not
> passed through
> to the console of the target. I also think the command has a timeout
> running,
> but I am not sure about this one.
> 
> Chris
> 

-- 

embedded brains GmbH
Herr Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: christian.maude...@embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v2 0/4] Xilinx Zynq UltraScale+ MPSoC BSP

2019-04-10 Thread Jeff Kubascik
From: Jeff Kubascik 

This set of patches creates a new BSP layer for the Xilinx Zynq UltraScale+
MPSoC.

The first two patches move the zynq-uart driver into a common directory, so that
both the xilinx-zynq and xilinx-zynqmp BSPs can use it.

The third patch copies the xilinx-zynq BSP layer to xilinx-zynqmp, to use as a
starting point.

The fourth patch modifies the xilinx-zynqmp BSP layer as needed to work for the
Ultra96 board, which is based on the MPSoC. Only AArch32 mode is currently
supported.


[PATCH v2]

On 4/8/2019 1:18 AM, Sebastian Huber wrote:> Hello,
> 
> On 06/04/2019 02:53, Jeff Kubascik wrote:
>> diff --git a/bsps/arm/xilinx-zynq/console/debug-console.c 
>> b/bsps/arm/xilinx-zynq/console/debug-console.c
>> index 38c0050e90..bc89a7f152 100644
>> --- a/bsps/arm/xilinx-zynq/console/debug-console.c
>> +++ b/bsps/arm/xilinx-zynq/console/debug-console.c
>> @@ -19,6 +19,8 @@
>>
>>   #include 
>>
>> +extern zynq_uart_context zynq_uart_instances[2];
> 
> please move this declaration to a header file.
> 
> --
> Sebastian Huber, embedded brains GmbH
> 

Declaration has been moved to bsp.h.

On 4/8/2019 1:20 AM, Sebastian Huber wrote:
> 
> The patch set looks good. Should we change the license of the original
> Zynq BSP to BSD-2-Clause before this change? Currently, the new BSP
> under the old RTEMS license.
> 
> --
> Sebastian Huber, embedded brains GmbH
> 

I have rebased the patches to include the BSD-2-Clause license change submitted
by Sebastian.

-Jeff Kubascik

Jeff Kubascik (4):
  bsp/zynq-uart: Remove zynq_uart_instances from header
  bsp/zynq-uart: Move Zynq UART driver to shared directory
  bsp/xilinx-zynqmp: Stub out Xilinx MPSoC BSP
  bsp/xilinx-zynqmp: Implement Ultra96 target

 .../include/bsp/zynq-uart-regs.h  |   0
 .../{xilinx-zynq => }/include/bsp/zynq-uart.h |   4 +-
 .../console => shared/serial}/zynq-uart.c |   0
 bsps/arm/xilinx-zynq/console/debug-console.c  |   2 +
 bsps/arm/xilinx-zynq/headers.am   |   4 +-
 bsps/arm/xilinx-zynq/start/bspreset.c |   2 +
 bsps/arm/xilinx-zynqmp/README |  30 +
 .../xilinx-zynqmp/config/xilinx_zynqmp.inc|  10 ++
 .../config/xilinx_zynqmp_ultra96.cfg  |   1 +
 .../xilinx-zynqmp/console/console-config.c| 116 ++
 bsps/arm/xilinx-zynqmp/headers.am |  12 ++
 bsps/arm/xilinx-zynqmp/include/bsp.h  |  80 
 bsps/arm/xilinx-zynqmp/include/bsp/irq.h  |  67 ++
 bsps/arm/xilinx-zynqmp/include/tm27.h |  40 ++
 bsps/arm/xilinx-zynqmp/start/bsp_specs|   9 ++
 bsps/arm/xilinx-zynqmp/start/bspreset.c   |  30 +
 bsps/arm/xilinx-zynqmp/start/bspsmp.c |  43 +++
 bsps/arm/xilinx-zynqmp/start/bspstart.c   |  49 
 bsps/arm/xilinx-zynqmp/start/bspstarthooks.c  |  73 +++
 bsps/arm/xilinx-zynqmp/start/bspstartmmu.c|  66 ++
 bsps/arm/xilinx-zynqmp/start/linkcmds.in  |  36 ++
 c/src/lib/libbsp/arm/acinclude.m4 |   2 +
 c/src/lib/libbsp/arm/xilinx-zynq/Makefile.am  |   2 +-
 .../lib/libbsp/arm/xilinx-zynqmp/Makefile.am  |  82 +
 .../lib/libbsp/arm/xilinx-zynqmp/configure.ac | 112 +
 25 files changed, 866 insertions(+), 6 deletions(-)
 rename bsps/arm/{xilinx-zynq => }/include/bsp/zynq-uart-regs.h (100%)
 rename bsps/arm/{xilinx-zynq => }/include/bsp/zynq-uart.h (92%)
 rename bsps/arm/{xilinx-zynq/console => shared/serial}/zynq-uart.c (100%)
 create mode 100644 bsps/arm/xilinx-zynqmp/README
 create mode 100644 bsps/arm/xilinx-zynqmp/config/xilinx_zynqmp.inc
 create mode 100644 bsps/arm/xilinx-zynqmp/config/xilinx_zynqmp_ultra96.cfg
 create mode 100644 bsps/arm/xilinx-zynqmp/console/console-config.c
 create mode 100644 bsps/arm/xilinx-zynqmp/headers.am
 create mode 100644 bsps/arm/xilinx-zynqmp/include/bsp.h
 create mode 100644 bsps/arm/xilinx-zynqmp/include/bsp/irq.h
 create mode 100644 bsps/arm/xilinx-zynqmp/include/tm27.h
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bsp_specs
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bspreset.c
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bspsmp.c
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bspstart.c
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bspstarthooks.c
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bspstartmmu.c
 create mode 100644 bsps/arm/xilinx-zynqmp/start/linkcmds.in
 create mode 100644 c/src/lib/libbsp/arm/xilinx-zynqmp/Makefile.am
 create mode 100644 c/src/lib/libbsp/arm/xilinx-zynqmp/configure.ac

-- 
2.17.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 3/4] bsp/xilinx-zynqmp: Stub out Xilinx MPSoC BSP

2019-04-10 Thread Jeff Kubascik
From: Jeff Kubascik 

Source files were copied from xilinx-zynq.
---
 bsps/arm/xilinx-zynqmp/README |  13 ++
 bsps/arm/xilinx-zynqmp/config/xilinx_zynq.inc |  10 ++
 .../xilinx-zynqmp/console/console-config.c|  75 +
 bsps/arm/xilinx-zynqmp/headers.am |  15 ++
 bsps/arm/xilinx-zynqmp/include/bsp.h  |  99 
 bsps/arm/xilinx-zynqmp/include/bsp/irq.h  | 128 
 bsps/arm/xilinx-zynqmp/include/tm27.h |  49 ++
 bsps/arm/xilinx-zynqmp/start/bsp_specs|   9 ++
 bsps/arm/xilinx-zynqmp/start/bspreset.c   |  43 ++
 bsps/arm/xilinx-zynqmp/start/bspsmp.c |  52 +++
 bsps/arm/xilinx-zynqmp/start/bspstart.c   |  45 ++
 bsps/arm/xilinx-zynqmp/start/bspstarthooks.c  |  89 +++
 bsps/arm/xilinx-zynqmp/start/bspstartmmu.c|  75 +
 bsps/arm/xilinx-zynqmp/start/linkcmds.in  |  36 +
 .../lib/libbsp/arm/xilinx-zynqmp/Makefile.am  |  86 +++
 .../lib/libbsp/arm/xilinx-zynqmp/configure.ac | 142 ++
 16 files changed, 966 insertions(+)
 create mode 100644 bsps/arm/xilinx-zynqmp/README
 create mode 100644 bsps/arm/xilinx-zynqmp/config/xilinx_zynq.inc
 create mode 100644 bsps/arm/xilinx-zynqmp/console/console-config.c
 create mode 100644 bsps/arm/xilinx-zynqmp/headers.am
 create mode 100644 bsps/arm/xilinx-zynqmp/include/bsp.h
 create mode 100644 bsps/arm/xilinx-zynqmp/include/bsp/irq.h
 create mode 100644 bsps/arm/xilinx-zynqmp/include/tm27.h
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bsp_specs
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bspreset.c
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bspsmp.c
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bspstart.c
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bspstarthooks.c
 create mode 100644 bsps/arm/xilinx-zynqmp/start/bspstartmmu.c
 create mode 100644 bsps/arm/xilinx-zynqmp/start/linkcmds.in
 create mode 100644 c/src/lib/libbsp/arm/xilinx-zynqmp/Makefile.am
 create mode 100644 c/src/lib/libbsp/arm/xilinx-zynqmp/configure.ac

diff --git a/bsps/arm/xilinx-zynqmp/README b/bsps/arm/xilinx-zynqmp/README
new file mode 100644
index 00..eef9159926
--- /dev/null
+++ b/bsps/arm/xilinx-zynqmp/README
@@ -0,0 +1,13 @@
+Tested only on Qemu.
+
+git clone git://git.qemu.org/qemu.git qemu
+cd qemu
+git checkout 1b0d3845b454eaaac0b2064c78926ca4d739a080
+mkdir build
+cd build
+../configure --prefix=/opt/qemu --interp-prefix=/opt/qemu
+make
+make install
+export PATH="$PATH:/opt/qemu/bin"
+
+qemu-system-arm -no-reboot -serial null -serial mon:stdio -net none -nographic 
-M xilinx-zynq-a9 -m 256M -kernel ticker.exe
diff --git a/bsps/arm/xilinx-zynqmp/config/xilinx_zynq.inc 
b/bsps/arm/xilinx-zynqmp/config/xilinx_zynq.inc
new file mode 100644
index 00..59c18f7c95
--- /dev/null
+++ b/bsps/arm/xilinx-zynqmp/config/xilinx_zynq.inc
@@ -0,0 +1,10 @@
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = arm
+
+CPU_CFLAGS = -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard 
-mtune=cortex-a9
+
+CFLAGS_OPTIMIZE_V ?= -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
diff --git a/bsps/arm/xilinx-zynqmp/console/console-config.c 
b/bsps/arm/xilinx-zynqmp/console/console-config.c
new file mode 100644
index 00..6ab9e1e015
--- /dev/null
+++ b/bsps/arm/xilinx-zynqmp/console/console-config.c
@@ -0,0 +1,75 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2013, 2017 embedded brains GmbH
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+
+zynq_uart_context zynq_uart_instances[2] = {
+  {
+.base = RTEMS_TERMIOS_DEVICE_CON

[PATCH v2 4/4] bsp/xilinx-zynqmp: Implement Ultra96 target

2019-04-10 Thread Jeff Kubascik
From: Jeff Kubascik 

Modifications to get xilinx-zynqmp BSP working on an Ultra96 board.
---
 bsps/arm/xilinx-zynqmp/README |  43 --
 .../{xilinx_zynq.inc => xilinx_zynqmp.inc}|   2 +-
 .../config/xilinx_zynqmp_ultra96.cfg  |   1 +
 .../xilinx-zynqmp/console/console-config.c|  69 -
 bsps/arm/xilinx-zynqmp/headers.am |   9 +-
 bsps/arm/xilinx-zynqmp/include/bsp.h  |  47 +++---
 bsps/arm/xilinx-zynqmp/include/bsp/irq.h  |  89 +++-
 bsps/arm/xilinx-zynqmp/include/tm27.h |  11 +-
 bsps/arm/xilinx-zynqmp/start/bspreset.c   |  15 +-
 bsps/arm/xilinx-zynqmp/start/bspsmp.c |   5 +
 bsps/arm/xilinx-zynqmp/start/bspstart.c   |  22 ++-
 bsps/arm/xilinx-zynqmp/start/bspstarthooks.c  |  20 ++-
 bsps/arm/xilinx-zynqmp/start/bspstartmmu.c|  25 ++--
 bsps/arm/xilinx-zynqmp/start/linkcmds.in  |  10 +-
 c/src/lib/libbsp/arm/acinclude.m4 |   2 +
 .../lib/libbsp/arm/xilinx-zynqmp/Makefile.am  |  26 ++--
 .../lib/libbsp/arm/xilinx-zynqmp/configure.ac | 136 +++---
 17 files changed, 274 insertions(+), 258 deletions(-)
 rename bsps/arm/xilinx-zynqmp/config/{xilinx_zynq.inc => xilinx_zynqmp.inc} 
(93%)
 create mode 100644 bsps/arm/xilinx-zynqmp/config/xilinx_zynqmp_ultra96.cfg

diff --git a/bsps/arm/xilinx-zynqmp/README b/bsps/arm/xilinx-zynqmp/README
index eef9159926..96f6564e47 100644
--- a/bsps/arm/xilinx-zynqmp/README
+++ b/bsps/arm/xilinx-zynqmp/README
@@ -1,13 +1,30 @@
-Tested only on Qemu.
-
-git clone git://git.qemu.org/qemu.git qemu
-cd qemu
-git checkout 1b0d3845b454eaaac0b2064c78926ca4d739a080
-mkdir build
-cd build
-../configure --prefix=/opt/qemu --interp-prefix=/opt/qemu
-make
-make install
-export PATH="$PATH:/opt/qemu/bin"
-
-qemu-system-arm -no-reboot -serial null -serial mon:stdio -net none -nographic 
-M xilinx-zynq-a9 -m 256M -kernel ticker.exe
+Tested on an Ultra96 board with JTAG boot.
+
+Make sure to configure the boot mode switches for JTAG mode.
+
+Using the xsct tool, load and run the application with
+
+connect
+
+targets -set -filter {name =~ "PSU"}
+rst -system
+source psu_init.tcl
+psu_init
+
+targets -set -filter {name =~ "Cortex-A53 #0"}
+rst -processor
+dow ticker.exe
+
+# Set generic timer frequency
+rwr sys 14 cntfrq_el0 1
+
+# Switch to AArch32 Supervisor mode
+rwr cpsr 0x2001d3
+
+# Boot arguments
+rwr r0 0
+rwr r1 0
+rwr r2 0
+rwr r3 0
+
+con
diff --git a/bsps/arm/xilinx-zynqmp/config/xilinx_zynq.inc 
b/bsps/arm/xilinx-zynqmp/config/xilinx_zynqmp.inc
similarity index 93%
rename from bsps/arm/xilinx-zynqmp/config/xilinx_zynq.inc
rename to bsps/arm/xilinx-zynqmp/config/xilinx_zynqmp.inc
index 59c18f7c95..38bd0d1ee3 100644
--- a/bsps/arm/xilinx-zynqmp/config/xilinx_zynq.inc
+++ b/bsps/arm/xilinx-zynqmp/config/xilinx_zynqmp.inc
@@ -2,7 +2,7 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
 
 RTEMS_CPU = arm
 
-CPU_CFLAGS = -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard 
-mtune=cortex-a9
+CPU_CFLAGS = -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard 
-mtune=cortex-a53
 
 CFLAGS_OPTIMIZE_V ?= -O2 -g
 CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
diff --git a/bsps/arm/xilinx-zynqmp/config/xilinx_zynqmp_ultra96.cfg 
b/bsps/arm/xilinx-zynqmp/config/xilinx_zynqmp_ultra96.cfg
new file mode 100644
index 00..42450ad32c
--- /dev/null
+++ b/bsps/arm/xilinx-zynqmp/config/xilinx_zynqmp_ultra96.cfg
@@ -0,0 +1 @@
+include $(RTEMS_ROOT)/make/custom/xilinx_zynqmp.inc
diff --git a/bsps/arm/xilinx-zynqmp/console/console-config.c 
b/bsps/arm/xilinx-zynqmp/console/console-config.c
index 6ab9e1e015..69495ce0f9 100644
--- a/bsps/arm/xilinx-zynqmp/console/console-config.c
+++ b/bsps/arm/xilinx-zynqmp/console/console-config.c
@@ -3,6 +3,11 @@
  *
  * Copyright (C) 2013, 2017 embedded brains GmbH
  *
+ * Copyright (C) 2019 DornerWorks
+ *
+ * Written by Jeff Kubascik 
+ *and Josh Whitehead 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -27,21 +32,22 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 
 #include 
 
-zynq_uart_context zynq_uart_instances[2] = {
+static zynq_uart_context zynqmp_uart_instances[2] = {
   {
 .base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER( "Zynq UART 0" ),
-.regs = (volatile struct zynq_uart *) 0xe000,
-.irq = ZYNQ_IRQ_UART_0
+.regs = (volatile struct zynq_uart *) 0xff00,
+.irq = ZYNQMP_IRQ_UART_0
   }, {
 .base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER( "Zynq UART 1" ),
-.regs = (volatile struct zynq_uart *) 0xe0001000,
-.irq = ZYNQ_IRQ_UART_1
+.regs = (volatile struct zynq_uart *) 0xff01,
+.irq = ZYNQMP_IRQ_UART_1
   }
 };
 
@@ -55,7 +61,7 @@ rtems_status_code console_initialize(
 
   rtems_termios_initialize();
 
-  for (i = 0; i < RTEMS_ARRAY_SIZE(zynq_uart_instances); ++i) {
+  for (i = 0; i < RTEMS_ARRAY_SIZE(zynqmp_uart_instances); ++i) {

[PATCH v2 1/4] bsp/zynq-uart: Remove zynq_uart_instances from header

2019-04-10 Thread Jeff Kubascik
From: Jeff Kubascik 

This variable is BSP specific and should be removed from the driver
header file.
---
 bsps/arm/xilinx-zynq/console/debug-console.c | 1 +
 bsps/arm/xilinx-zynq/include/bsp.h   | 3 +++
 bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h | 4 +---
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/bsps/arm/xilinx-zynq/console/debug-console.c 
b/bsps/arm/xilinx-zynq/console/debug-console.c
index 8930b4fda4..3b1e1e212b 100644
--- a/bsps/arm/xilinx-zynq/console/debug-console.c
+++ b/bsps/arm/xilinx-zynq/console/debug-console.c
@@ -28,6 +28,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 #include 
diff --git a/bsps/arm/xilinx-zynq/include/bsp.h 
b/bsps/arm/xilinx-zynq/include/bsp.h
index 111bacc8ab..6c2759ce50 100644
--- a/bsps/arm/xilinx-zynq/include/bsp.h
+++ b/bsps/arm/xilinx-zynq/include/bsp.h
@@ -54,6 +54,7 @@
 
 #include 
 #include 
+#include 
 
 #ifdef __cplusplus
 extern "C" {
@@ -73,6 +74,8 @@ extern "C" {
 
 #define BSP_ARM_L2C_310_ID 0x41c8
 
+extern zynq_uart_context zynq_uart_instances[2];
+
 /**
  * @brief Zynq specific set up of the MMU.
  *
diff --git a/bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h 
b/bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h
index 3aabdca65d..20c3c9b653 100644
--- a/bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h
+++ b/bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h
@@ -53,9 +53,7 @@ typedef struct {
   rtems_vector_number irq;
 } zynq_uart_context;
 
-const rtems_termios_device_handler zynq_uart_handler;
-
-extern zynq_uart_context zynq_uart_instances[2];
+extern const rtems_termios_device_handler zynq_uart_handler;
 
 #define ZYNQ_UART_DEFAULT_BAUD 115200
 
-- 
2.17.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 2/4] bsp/zynq-uart: Move Zynq UART driver to shared directory

2019-04-10 Thread Jeff Kubascik
From: Jeff Kubascik 

This driver will be shared with the xilinx-zynqmp BSP.
---
 bsps/arm/{xilinx-zynq => }/include/bsp/zynq-uart-regs.h | 0
 bsps/arm/{xilinx-zynq => }/include/bsp/zynq-uart.h  | 0
 bsps/arm/{xilinx-zynq/console => shared/serial}/zynq-uart.c | 0
 bsps/arm/xilinx-zynq/headers.am | 4 ++--
 c/src/lib/libbsp/arm/xilinx-zynq/Makefile.am| 2 +-
 5 files changed, 3 insertions(+), 3 deletions(-)
 rename bsps/arm/{xilinx-zynq => }/include/bsp/zynq-uart-regs.h (100%)
 rename bsps/arm/{xilinx-zynq => }/include/bsp/zynq-uart.h (100%)
 rename bsps/arm/{xilinx-zynq/console => shared/serial}/zynq-uart.c (100%)

diff --git a/bsps/arm/xilinx-zynq/include/bsp/zynq-uart-regs.h 
b/bsps/arm/include/bsp/zynq-uart-regs.h
similarity index 100%
rename from bsps/arm/xilinx-zynq/include/bsp/zynq-uart-regs.h
rename to bsps/arm/include/bsp/zynq-uart-regs.h
diff --git a/bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h 
b/bsps/arm/include/bsp/zynq-uart.h
similarity index 100%
rename from bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h
rename to bsps/arm/include/bsp/zynq-uart.h
diff --git a/bsps/arm/xilinx-zynq/console/zynq-uart.c 
b/bsps/arm/shared/serial/zynq-uart.c
similarity index 100%
rename from bsps/arm/xilinx-zynq/console/zynq-uart.c
rename to bsps/arm/shared/serial/zynq-uart.c
diff --git a/bsps/arm/xilinx-zynq/headers.am b/bsps/arm/xilinx-zynq/headers.am
index 708bd6411a..ed7061964c 100644
--- a/bsps/arm/xilinx-zynq/headers.am
+++ b/bsps/arm/xilinx-zynq/headers.am
@@ -11,5 +11,5 @@ include_bsp_HEADERS += 
../../../../../../bsps/arm/xilinx-zynq/include/bsp/cadenc
 include_bsp_HEADERS += 
../../../../../../bsps/arm/xilinx-zynq/include/bsp/cadence-i2c.h
 include_bsp_HEADERS += ../../../../../../bsps/arm/xilinx-zynq/include/bsp/i2c.h
 include_bsp_HEADERS += ../../../../../../bsps/arm/xilinx-zynq/include/bsp/irq.h
-include_bsp_HEADERS += 
../../../../../../bsps/arm/xilinx-zynq/include/bsp/zynq-uart-regs.h
-include_bsp_HEADERS += 
../../../../../../bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h
+include_bsp_HEADERS += ../../../../../../bsps/arm/include/bsp/zynq-uart-regs.h
+include_bsp_HEADERS += ../../../../../../bsps/arm/include/bsp/zynq-uart.h
diff --git a/c/src/lib/libbsp/arm/xilinx-zynq/Makefile.am 
b/c/src/lib/libbsp/arm/xilinx-zynq/Makefile.am
index 0ec2944d53..7b4e4aea94 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/Makefile.am
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/Makefile.am
@@ -61,7 +61,7 @@ librtemsbsp_a_SOURCES += 
../../../../../../bsps/arm/shared/irq/irq-gic.c
 librtemsbsp_a_SOURCES += 
../../../../../../bsps/shared/dev/serial/console-termios.c
 librtemsbsp_a_SOURCES += 
../../../../../../bsps/arm/xilinx-zynq/console/console-config.c
 librtemsbsp_a_SOURCES += 
../../../../../../bsps/arm/xilinx-zynq/console/debug-console.c
-librtemsbsp_a_SOURCES += 
../../../../../../bsps/arm/xilinx-zynq/console/zynq-uart.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/serial/zynq-uart.c
 
 # Clock
 librtemsbsp_a_SOURCES += 
../../../../../../bsps/arm/shared/clock/clock-a9mpcore.c
-- 
2.17.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v2 0/4] Xilinx Zynq UltraScale+ MPSoC BSP

2019-04-10 Thread Sebastian Huber

Hello Jeff,

On 11/04/2019 01:38, Jeff Kubascik wrote:

From: Jeff Kubascik 

This set of patches creates a new BSP layer for the Xilinx Zynq UltraScale+
MPSoC.

The first two patches move the zynq-uart driver into a common directory, so that
both the xilinx-zynq and xilinx-zynqmp BSPs can use it.

The third patch copies the xilinx-zynq BSP layer to xilinx-zynqmp, to use as a
starting point.

The fourth patch modifies the xilinx-zynqmp BSP layer as needed to work for the
Ultra96 board, which is based on the MPSoC. Only AArch32 mode is currently
supported.


I checked in a slightly modified patch set. Please update also the 
documentation:


https://git.rtems.org/rtems-docs/tree/user/bsps/bsps-arm.rst

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel