From b9b5a32da429037dd17b3ab4c4356b2aa3df4772 Mon Sep 17 00:00:00 2001 From: Wang-Huachen Date: Thu, 10 Jun 2021 20:46:13 +0800 Subject: [PATCH] add copyright notice and permission notice --- .../drivers/Zynq_HAL_Driver/sleep.h | 9 +++++ .../drivers/Zynq_HAL_Driver/xil_assert.h | 9 +++++ .../drivers/Zynq_HAL_Driver/xil_cache.h | 9 +++++ .../drivers/Zynq_HAL_Driver/xil_printf.h | 13 +++++-- .../drivers/Zynq_HAL_Driver/xil_types.h | 34 +++++++++++++++++++ .../drivers/Zynq_HAL_Driver/xplatform_info.h | 10 ++++++ bsp/zynqmp-r5-axu4ev/drivers/drv_eth.c | 2 -- bsp/zynqmp-r5-axu4ev/drivers/zynqmp-r5.h | 9 +++++ 8 files changed, 91 insertions(+), 4 deletions(-) diff --git a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/sleep.h b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/sleep.h index 7e8c778295..ca6e56a7ec 100644 --- a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/sleep.h +++ b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/sleep.h @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2020-2021, WangHuachen + * + * SPDX-License-Identifier: MIT + * + * Change Logs: + * Date Author Notes + * 2020-11-30 WangHuachen the first version + */ #ifndef XLI_SLEEP_H #define XLI_SLEEP_H diff --git a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_assert.h b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_assert.h index de095f1f4c..7abe853e29 100644 --- a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_assert.h +++ b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_assert.h @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2020-2021, WangHuachen + * + * SPDX-License-Identifier: MIT + * + * Change Logs: + * Date Author Notes + * 2020-11-30 WangHuachen the first version + */ #ifndef XIL_ASSERT_H /* prevent circular inclusions */ #define XIL_ASSERT_H /* by using protection macros */ diff --git a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_cache.h b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_cache.h index 2590ce096b..575157e6d2 100644 --- a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_cache.h +++ b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_cache.h @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2020-2021, WangHuachen + * + * SPDX-License-Identifier: MIT + * + * Change Logs: + * Date Author Notes + * 2020-11-30 WangHuachen the first version + */ #ifndef XIL_CACHE_H #define XIL_CACHE_H diff --git a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_printf.h b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_printf.h index b6983a5d7e..29de8c2441 100644 --- a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_printf.h +++ b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_printf.h @@ -1,5 +1,14 @@ - #ifndef XIL_PRINTF_H - #define XIL_PRINTF_H +/* + * Copyright (c) 2020-2021, WangHuachen + * + * SPDX-License-Identifier: MIT + * + * Change Logs: + * Date Author Notes + * 2020-11-30 WangHuachen the first version + */ +#ifndef XIL_PRINTF_H +#define XIL_PRINTF_H #include diff --git a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_types.h b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_types.h index a6988a20a5..cebdbcd56e 100644 --- a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_types.h +++ b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xil_types.h @@ -1,3 +1,13 @@ +/* + * Copyright (C) 2010-2020 Xilinx, Inc. + * Copyright (c) 2020-2021, WangHuachen + * All rights reserved. + * SPDX-License-Identifier: MIT + * + * Change Logs: + * Date Author Notes + * 2020-11-30 WangHuachen the first version + */ #ifndef XIL_TYPES_H /* prevent circular inclusions */ #define XIL_TYPES_H /* by using protection macros */ @@ -70,6 +80,30 @@ typedef void (*XInterruptHandler) (void *InstancePtr); */ typedef void (*XExceptionHandler) (void *InstancePtr); +/** + * @brief Returns 32-63 bits of a number. + * @param n : Number being accessed. + * @return Bits 32-63 of number. + * + * @note A basic shift-right of a 64- or 32-bit quantity. + * Use this to suppress the "right shift count >= width of type" + * warning when that quantity is 32-bits. + */ +#if defined (__aarch64__) || defined (__arch64__) +#define UPPER_32_BITS(n) ((u32)(((n) >> 16) >> 16)) +#else +#define UPPER_32_BITS(n) 0U +#endif +/** + * @brief Returns 0-31 bits of a number + * @param n : Number being accessed. + * @return Bits 0-31 of number + */ +#define LOWER_32_BITS(n) ((u32)(n)) + + + + /************************** Constant Definitions *****************************/ #ifndef TRUE diff --git a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xplatform_info.h b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xplatform_info.h index 4213736270..e995d4a589 100644 --- a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xplatform_info.h +++ b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xplatform_info.h @@ -1,3 +1,13 @@ +/* + * Copyright (C) 2014-2020 Xilinx, Inc. + * Copyright (c) 2020-2021, WangHuachen + * All rights reserved. + * SPDX-License-Identifier: MIT + * + * Change Logs: + * Date Author Notes + * 2020-11-30 WangHuachen the first version + */ #ifndef XPLATFORM_INFO_H /* prevent circular inclusions */ #define XPLATFORM_INFO_H /* by using protection macros */ diff --git a/bsp/zynqmp-r5-axu4ev/drivers/drv_eth.c b/bsp/zynqmp-r5-axu4ev/drivers/drv_eth.c index e3e1884cf2..05c29305fc 100644 --- a/bsp/zynqmp-r5-axu4ev/drivers/drv_eth.c +++ b/bsp/zynqmp-r5-axu4ev/drivers/drv_eth.c @@ -7,8 +7,6 @@ * Date Author Notes * 2021-5-10 WangHuachen the first version */ - - #include "board.h" #include #include "lwipopts.h" diff --git a/bsp/zynqmp-r5-axu4ev/drivers/zynqmp-r5.h b/bsp/zynqmp-r5-axu4ev/drivers/zynqmp-r5.h index 3192942b57..fc8cfb0f97 100644 --- a/bsp/zynqmp-r5-axu4ev/drivers/zynqmp-r5.h +++ b/bsp/zynqmp-r5-axu4ev/drivers/zynqmp-r5.h @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2020-2021, WangHuachen + * + * SPDX-License-Identifier: MIT + * + * Change Logs: + * Date Author Notes + * 2020-11-30 WangHuachen the first version + */ #ifndef __ZYNQMP_R5_H__ #define __ZYNQMP_R5_H__