Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mcux/mcux-sdk-ng/drivers/caam/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 2024-2025 NXP
# Copyright 2024-2026 NXP
#
# SPDX-License-Identifier: BSD-3-Clause

if(CONFIG_MCUX_COMPONENT_driver.caam)
mcux_component_version(2.4.1)
mcux_component_version(2.4.2)

mcux_add_source(SOURCES fsl_caam.c fsl_caam.h)

Expand Down
2 changes: 2 additions & 0 deletions mcux/mcux-sdk-ng/drivers/caam/doxygen/ChangeLog_caam.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# CAAM
## [2.4.2]
- Sync Zephyr-only changes to entropy descriptors which need to be placed in non-cacheable sections

## [2.4.1]

Expand Down
13 changes: 12 additions & 1 deletion mcux/mcux-sdk-ng/drivers/caam/fsl_caam.c

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I strongly suggest using same code for both MCUX SDK and Zephyr, this can keep the source sync and maintain easy.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made changes which should be compatible with SDK and Zephyr. Made changes in the SDK, and just copied the changes to this PR.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Freescale Semiconductor, Inc.
* Copyright 2016-2025 NXP
* Copyright 2016-2026 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
Expand All @@ -9,6 +9,10 @@
#include "fsl_caam.h"
#include "fsl_clock.h"

#if defined(__ZEPHYR__)
#include <zephyr/linker/sections.h>
#endif

#if defined(FSL_FEATURE_HAS_L1CACHE) || defined(__DCACHE_PRESENT)
#include "fsl_cache.h"

Expand Down Expand Up @@ -222,10 +226,17 @@ static uint32_t s_jrIndex2 = 0; /*!< Current index in the input
static caam_job_ring_interface_t *s_jr3 = NULL; /*!< Pointer to job ring interface 3. */
static uint32_t s_jrIndex3 = 0; /*!< Current index in the input job ring 3. */

#if defined(__ZEPHYR__)
static caam_rng_config_t rngConfig __nocache;
static caam_desc_rng_t rngGenSeckey __nocache;
static caam_desc_rng_t rngInstantiate __nocache;
static caam_desc_rng_t descBuf __nocache;
#else
AT_NONCACHEABLE_SECTION(static caam_rng_config_t rngConfig);
AT_NONCACHEABLE_SECTION(static caam_desc_rng_t rngGenSeckey);
AT_NONCACHEABLE_SECTION(static caam_desc_rng_t rngInstantiate);
AT_NONCACHEABLE_SECTION(static caam_desc_rng_t descBuf);
#endif
/*******************************************************************************
* Code
******************************************************************************/
Expand Down
8 changes: 5 additions & 3 deletions mcux/mcux-sdk-ng/drivers/caam/fsl_caam.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Freescale Semiconductor, Inc.
* Copyright 2016-2023 NXP
* Copyright 2016-2026 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
Expand Down Expand Up @@ -32,7 +32,7 @@ enum
/*! @{ */
/*! @brief CAAM driver version.
*
* Current version: 2.4.1
* Current version: 2.4.2
*
* Change log:
* - Version 2.0.0
Expand Down Expand Up @@ -82,8 +82,10 @@ enum
* and support for black keys and blobs for both symmetric and asymmetric operations.
* - Version 2.4.1
* - Fix MSG and MISRA-2012 issues.
* - Version 2.4.2
* - Sync Zephyr-only changes to entropy descriptors which need to be placed in non-cacheable sections
*/
#define FSL_CAAM_DRIVER_VERSION (MAKE_VERSION(2, 4, 1))
#define FSL_CAAM_DRIVER_VERSION (MAKE_VERSION(2, 4, 2))
/*! @} */

/*! @brief CAAM callback function. */
Expand Down