From 00b46686b12d853663607e49cfbc997466d46920 Mon Sep 17 00:00:00 2001 From: David Leach Date: Fri, 5 Apr 2024 22:41:40 -0500 Subject: [PATCH] drivers: lpc55s36: Remove deprecated CSS driver CSS was deprecated from the mcu-sdk. Removing driver from lpc55s36 to clear build error. This is a temporary patch to remove the build error. Fixes #69961 Signed-off-by: David Leach --- boards/nxp/lpcxpresso55s36/doc/index.rst | 2 - .../nxp/lpcxpresso55s36/lpcxpresso55s36.yaml | 5 -- drivers/entropy/CMakeLists.txt | 1 - drivers/entropy/Kconfig.mcux | 8 --- drivers/entropy/entropy_mcux_css.c | 55 ------------------- dts/arm/nxp/nxp_lpc55S3x_common.dtsi | 10 ---- dts/bindings/rng/nxp,css-v2.yaml | 12 ---- west.yml | 2 +- 8 files changed, 1 insertion(+), 94 deletions(-) delete mode 100644 drivers/entropy/entropy_mcux_css.c delete mode 100644 dts/bindings/rng/nxp,css-v2.yaml diff --git a/boards/nxp/lpcxpresso55s36/doc/index.rst b/boards/nxp/lpcxpresso55s36/doc/index.rst index a8914f2015..bff3ef5d36 100644 --- a/boards/nxp/lpcxpresso55s36/doc/index.rst +++ b/boards/nxp/lpcxpresso55s36/doc/index.rst @@ -77,8 +77,6 @@ already supported, which can also be re-used on this lpcxpresso55s36 board: +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ -| CSS | on-chip | entropy | -+-----------+------------+-------------------------------------+ | USB FS | on-chip | USB Full Speed device | +-----------+------------+-------------------------------------+ | DAC | on-chip | dac | diff --git a/boards/nxp/lpcxpresso55s36/lpcxpresso55s36.yaml b/boards/nxp/lpcxpresso55s36/lpcxpresso55s36.yaml index 58dbfb9df6..5a28b2149c 100644 --- a/boards/nxp/lpcxpresso55s36/lpcxpresso55s36.yaml +++ b/boards/nxp/lpcxpresso55s36/lpcxpresso55s36.yaml @@ -20,8 +20,3 @@ supported: - pwm - dac vendor: nxp -env: # Provisional hack to prevent tests being run in this board, as it fails in many test & samples - - LPCXPRESSO55S36_TWISTER_ENABLE - # Twister won't run tests in this board unless LPCXPRESSO55S36_TWISTER_ENABLE is set in the - # environment, which it normally won't. - # Once https://github.com/zephyrproject-rtos/zephyr/issues/69961 is fixed this should be removed diff --git a/drivers/entropy/CMakeLists.txt b/drivers/entropy/CMakeLists.txt index 02a32ed252..c3d37e1461 100644 --- a/drivers/entropy/CMakeLists.txt +++ b/drivers/entropy/CMakeLists.txt @@ -11,7 +11,6 @@ zephyr_library_sources_ifdef(CONFIG_ENTROPY_MCUX_RNG entropy_mcux_rng. zephyr_library_sources_ifdef(CONFIG_ENTROPY_MCUX_RNGA entropy_mcux_rnga.c) zephyr_library_sources_ifdef(CONFIG_ENTROPY_MCUX_TRNG entropy_mcux_trng.c) zephyr_library_sources_ifdef(CONFIG_ENTROPY_MCUX_CAAM entropy_mcux_caam.c) -zephyr_library_sources_ifdef(CONFIG_ENTROPY_MCUX_CSS entropy_mcux_css.c) zephyr_library_sources_ifdef(CONFIG_ENTROPY_NRF5_RNG entropy_nrf5.c) zephyr_library_sources_ifdef(CONFIG_ENTROPY_SAM_RNG entropy_sam.c) zephyr_library_sources_ifdef(CONFIG_ENTROPY_SMARTBOND_TRNG entropy_smartbond.c) diff --git a/drivers/entropy/Kconfig.mcux b/drivers/entropy/Kconfig.mcux index 40941a2061..af4d8dc3d6 100644 --- a/drivers/entropy/Kconfig.mcux +++ b/drivers/entropy/Kconfig.mcux @@ -40,14 +40,6 @@ config ENTROPY_MCUX_CAAM This option enables the CAAM driver based on the MCUX CAAM driver. -config ENTROPY_MCUX_CSS - bool "MCUX CSS RNG driver" - default y - depends on DT_HAS_NXP_CSS_V2_ENABLED - select ENTROPY_HAS_DRIVER - help - This option enables the driver for random number generation using - the CSS (Crypto Subsystem). # # Don't use use the MCUX TRNG as a random source as it is not designed # to supply a continuous random stream. Instead, it is used to provide diff --git a/drivers/entropy/entropy_mcux_css.c b/drivers/entropy/entropy_mcux_css.c deleted file mode 100644 index e0a5853aa2..0000000000 --- a/drivers/entropy/entropy_mcux_css.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2022 NXP - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#define DT_DRV_COMPAT nxp_css_v2 - -#include "mcuxClCss_Rng.h" - -#include -#include -#include -#include - -static int entropy_mcux_css_get_entropy(const struct device *dev, uint8_t *buffer, uint16_t length) -{ - ARG_UNUSED(dev); - uint8_t status = 0; - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClCss_Prng_GetRandom(buffer, length)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClCss_Prng_GetRandom) != token) || - (result != MCUXCLCSS_STATUS_OK)) { - status = -EAGAIN; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - __ASSERT_NO_MSG(!status); - - return status; -} - -static const struct entropy_driver_api entropy_mcux_css_api_funcs = { - .get_entropy = entropy_mcux_css_get_entropy -}; - -static int entropy_mcux_css_init(const struct device *dev) -{ - ARG_UNUSED(dev); - uint8_t status = 0; - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClCss_Enable_Async()); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClCss_Enable_Async) != token) || - (result != MCUXCLCSS_STATUS_OK_WAIT)) { - status = -ENODEV; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - __ASSERT_NO_MSG(!status); - - return status; -} - -DEVICE_DT_INST_DEFINE(0, entropy_mcux_css_init, NULL, NULL, NULL, PRE_KERNEL_1, - CONFIG_ENTROPY_INIT_PRIORITY, &entropy_mcux_css_api_funcs); diff --git a/dts/arm/nxp/nxp_lpc55S3x_common.dtsi b/dts/arm/nxp/nxp_lpc55S3x_common.dtsi index 16b90cb739..328633f516 100644 --- a/dts/arm/nxp/nxp_lpc55S3x_common.dtsi +++ b/dts/arm/nxp/nxp_lpc55S3x_common.dtsi @@ -13,10 +13,6 @@ #include / { - chosen { - zephyr,entropy = &css; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -270,12 +266,6 @@ #size-cells = <0>; }; - css: css@4003000 { - compatible = "nxp,css-v2"; - reg = <0x4003000 0x200>; - status = "okay"; - }; - adc0: adc@A0000 { compatible = "nxp,lpc-lpadc"; reg = <0xA0000 0x1000>; diff --git a/dts/bindings/rng/nxp,css-v2.yaml b/dts/bindings/rng/nxp,css-v2.yaml deleted file mode 100644 index 18ac4ee3d8..0000000000 --- a/dts/bindings/rng/nxp,css-v2.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright 2022 NXP -# SPDX-License-Identifier: Apache-2.0 - -description: CSSv2 (Crypto Subsystem) - -compatible: "nxp,css-v2" - -include: base.yaml - -properties: - reg: - required: true diff --git a/west.yml b/west.yml index 6ee89e4b0b..9fdaa6b2be 100644 --- a/west.yml +++ b/west.yml @@ -193,7 +193,7 @@ manifest: groups: - hal - name: hal_nxp - revision: 14160a1c14c06ce5a918cd550989555d832a636f + revision: 4ab0e7bc9c44840cbb22a6dd74c214713f239182 path: modules/hal/nxp groups: - hal