diff options
Diffstat (limited to 'bsps/arm/xilinx-zynqmp')
-rw-r--r-- | bsps/arm/xilinx-zynqmp/console/console-config.c | 60 | ||||
-rw-r--r-- | bsps/arm/xilinx-zynqmp/include/bsp.h | 4 | ||||
-rw-r--r-- | bsps/arm/xilinx-zynqmp/include/bsp/irq.h | 2 | ||||
-rw-r--r-- | bsps/arm/xilinx-zynqmp/include/tm27.h | 2 | ||||
-rw-r--r-- | bsps/arm/xilinx-zynqmp/start/bsp_specs | 0 | ||||
-rw-r--r-- | bsps/arm/xilinx-zynqmp/start/bspreset.c | 2 | ||||
-rw-r--r-- | bsps/arm/xilinx-zynqmp/start/bspsmp.c | 2 | ||||
-rw-r--r-- | bsps/arm/xilinx-zynqmp/start/bspstart.c | 2 | ||||
-rw-r--r-- | bsps/arm/xilinx-zynqmp/start/bspstarthooks.c | 7 | ||||
-rw-r--r-- | bsps/arm/xilinx-zynqmp/start/bspstartmmu.c | 2 |
10 files changed, 19 insertions, 64 deletions
diff --git a/bsps/arm/xilinx-zynqmp/console/console-config.c b/bsps/arm/xilinx-zynqmp/console/console-config.c index fb0b003c83..550e930415 100644 --- a/bsps/arm/xilinx-zynqmp/console/console-config.c +++ b/bsps/arm/xilinx-zynqmp/console/console-config.c @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (C) 2013, 2017 embedded brains GmbH + * Copyright (C) 2013, 2017 embedded brains GmbH & Co. KG * * Copyright (C) 2019 DornerWorks * @@ -32,21 +32,22 @@ #include <rtems/console.h> #include <rtems/bspIo.h> -#include <rtems/sysinit.h> +#include <rtems/termiostypes.h> #include <bsp/irq.h> #include <dev/serial/zynq-uart.h> +#include <dev/serial/zynq-uart-regs.h> #include <bspopts.h> static zynq_uart_context zynqmp_uart_instances[2] = { { .base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER( "Zynq UART 0" ), - .regs = (volatile struct zynq_uart *) 0xff000000, + .regs = (volatile zynq_uart *) ZYNQ_UART_0_BASE_ADDR, .irq = ZYNQMP_IRQ_UART_0 }, { .base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER( "Zynq UART 1" ), - .regs = (volatile struct zynq_uart *) 0xff010000, + .regs = (volatile zynq_uart *) ZYNQ_UART_1_BASE_ADDR, .irq = ZYNQMP_IRQ_UART_1 } }; @@ -62,6 +63,7 @@ rtems_status_code console_initialize( rtems_termios_initialize(); for (i = 0; i < RTEMS_ARRAY_SIZE(zynqmp_uart_instances); ++i) { + zynq_uart_context *ctx = &zynqmp_uart_instances[i]; char uart[] = "/dev/ttySX"; uart[sizeof(uart) - 2] = (char) ('0' + i); @@ -69,10 +71,10 @@ rtems_status_code console_initialize( &uart[0], &zynq_uart_handler, NULL, - &zynqmp_uart_instances[i].base + &ctx->base ); - if (i == BSP_CONSOLE_MINOR) { + if (ctx->regs == (zynq_uart *) ZYNQ_UART_KERNEL_IO_BASE_ADDR) { link(&uart[0], CONSOLE_DEVICE_NAME); } } @@ -82,49 +84,5 @@ rtems_status_code console_initialize( void zynqmp_debug_console_flush(void) { - zynq_uart_reset_tx_flush(&zynqmp_uart_instances[BSP_CONSOLE_MINOR]); + zynq_uart_reset_tx_flush((zynq_uart *) ZYNQ_UART_KERNEL_IO_BASE_ADDR); } - -static void zynqmp_debug_console_out(char c) -{ - rtems_termios_device_context *base = - &zynqmp_uart_instances[BSP_CONSOLE_MINOR].base; - - zynq_uart_write_polled(base, c); -} - -static void zynqmp_debug_console_init(void) -{ - rtems_termios_device_context *base = - &zynqmp_uart_instances[BSP_CONSOLE_MINOR].base; - - zynq_uart_initialize(base); - BSP_output_char = zynqmp_debug_console_out; -} - -static void zynqmp_debug_console_early_init(char c) -{ - rtems_termios_device_context *base = - &zynqmp_uart_instances[BSP_CONSOLE_MINOR].base; - - zynq_uart_initialize(base); - zynqmp_debug_console_out(c); -} - -static int zynqmp_debug_console_in(void) -{ - rtems_termios_device_context *base = - &zynqmp_uart_instances[BSP_CONSOLE_MINOR].base; - - return zynq_uart_read_polled(base); -} - -BSP_output_char_function_type BSP_output_char = zynqmp_debug_console_early_init; - -BSP_polling_getchar_function_type BSP_poll_char = zynqmp_debug_console_in; - -RTEMS_SYSINIT_ITEM( - zynqmp_debug_console_init, - RTEMS_SYSINIT_BSP_START, - RTEMS_SYSINIT_ORDER_LAST_BUT_5 -); diff --git a/bsps/arm/xilinx-zynqmp/include/bsp.h b/bsps/arm/xilinx-zynqmp/include/bsp.h index 9d33cf6134..cdc37b79a4 100644 --- a/bsps/arm/xilinx-zynqmp/include/bsp.h +++ b/bsps/arm/xilinx-zynqmp/include/bsp.h @@ -7,7 +7,7 @@ /* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (C) 2013, 2014 embedded brains GmbH + * Copyright (C) 2013, 2014 embedded brains GmbH & Co. KG * * Copyright (C) 2019 DornerWorks * @@ -60,6 +60,8 @@ #include <bsp/default-initial-extension.h> #include <bsp/start.h> +#include <dev/serial/zynq-uart-zynqmp.h> + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ diff --git a/bsps/arm/xilinx-zynqmp/include/bsp/irq.h b/bsps/arm/xilinx-zynqmp/include/bsp/irq.h index 9aae8168db..2029fde773 100644 --- a/bsps/arm/xilinx-zynqmp/include/bsp/irq.h +++ b/bsps/arm/xilinx-zynqmp/include/bsp/irq.h @@ -7,7 +7,7 @@ /* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (C) 2013 embedded brains GmbH + * Copyright (C) 2013 embedded brains GmbH & Co. KG * * Copyright (C) 2019 DornerWorks * diff --git a/bsps/arm/xilinx-zynqmp/include/tm27.h b/bsps/arm/xilinx-zynqmp/include/tm27.h index 14214fe151..70fc99afbc 100644 --- a/bsps/arm/xilinx-zynqmp/include/tm27.h +++ b/bsps/arm/xilinx-zynqmp/include/tm27.h @@ -7,7 +7,7 @@ /* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (C) 2013 embedded brains GmbH + * Copyright (C) 2013 embedded brains GmbH & Co. KG * * Copyright (C) 2019 DornerWorks * diff --git a/bsps/arm/xilinx-zynqmp/start/bsp_specs b/bsps/arm/xilinx-zynqmp/start/bsp_specs deleted file mode 100644 index e69de29bb2..0000000000 --- a/bsps/arm/xilinx-zynqmp/start/bsp_specs +++ /dev/null diff --git a/bsps/arm/xilinx-zynqmp/start/bspreset.c b/bsps/arm/xilinx-zynqmp/start/bspreset.c index 14f7d32436..b43b19b05f 100644 --- a/bsps/arm/xilinx-zynqmp/start/bspreset.c +++ b/bsps/arm/xilinx-zynqmp/start/bspreset.c @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (C) 2013 embedded brains GmbH + * Copyright (C) 2013 embedded brains GmbH & Co. KG * * Copyright (C) 2019 DornerWorks * diff --git a/bsps/arm/xilinx-zynqmp/start/bspsmp.c b/bsps/arm/xilinx-zynqmp/start/bspsmp.c index 28a4b6d54d..dce6a9b45c 100644 --- a/bsps/arm/xilinx-zynqmp/start/bspsmp.c +++ b/bsps/arm/xilinx-zynqmp/start/bspsmp.c @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (C) 2014 embedded brains GmbH + * Copyright (C) 2014 embedded brains GmbH & Co. KG * * Copyright (C) 2019 DornerWorks * diff --git a/bsps/arm/xilinx-zynqmp/start/bspstart.c b/bsps/arm/xilinx-zynqmp/start/bspstart.c index fe04ef4f8f..585ab2a91d 100644 --- a/bsps/arm/xilinx-zynqmp/start/bspstart.c +++ b/bsps/arm/xilinx-zynqmp/start/bspstart.c @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (C) 2013, 2015 embedded brains GmbH + * Copyright (C) 2013, 2015 embedded brains GmbH & Co. KG * * Copyright (C) 2019 DornerWorks * diff --git a/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c b/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c index ef76563a38..fba23515f7 100644 --- a/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c +++ b/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (C) 2013, 2014 embedded brains GmbH + * Copyright (C) 2013, 2014 embedded brains GmbH & Co. KG * * Copyright (C) 2019 DornerWorks * @@ -33,11 +33,6 @@ #include <bsp.h> #include <bsp/start.h> -BSP_START_TEXT_SECTION void bsp_start_hook_0(void) -{ - /* Nothing to do */ -} - BSP_START_TEXT_SECTION void bsp_start_hook_1(void) { bsp_start_copy_sections(); diff --git a/bsps/arm/xilinx-zynqmp/start/bspstartmmu.c b/bsps/arm/xilinx-zynqmp/start/bspstartmmu.c index c778590192..99e88c0cc2 100644 --- a/bsps/arm/xilinx-zynqmp/start/bspstartmmu.c +++ b/bsps/arm/xilinx-zynqmp/start/bspstartmmu.c @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (C) 2013 embedded brains GmbH + * Copyright (C) 2013 embedded brains GmbH & Co. KG * * Copyright (C) 2019 DornerWorks * |