soc: nordic: move nrf_ironside from drivers/firmware to soc/nordic
Move the IronSide APIs to soc/nordic from drivers/firmware since these are vendor specific APIs. The header files are now included from <nrf_ironside/*.h>. Adjust code that uses these APIs accordingly. Also move the DT binding for "nordic,ironside-call" from bindings/firmware to bindings/misc. Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
This commit is contained in:
committed by
Daniel DeGrasse
parent
75dd614437
commit
b18c326946
@@ -2,6 +2,5 @@
|
||||
|
||||
# zephyr-keep-sorted-start
|
||||
add_subdirectory_ifdef(CONFIG_ARM_SCMI scmi)
|
||||
add_subdirectory_ifdef(CONFIG_NRF_IRONSIDE nrf_ironside)
|
||||
add_subdirectory_ifdef(CONFIG_TISCI tisci)
|
||||
# zephyr-keep-sorted-stop
|
||||
|
||||
@@ -11,7 +11,6 @@ config ARM_SCMI
|
||||
Interface (SCMI).
|
||||
|
||||
# zephyr-keep-sorted-start
|
||||
source "drivers/firmware/nrf_ironside/Kconfig"
|
||||
source "drivers/firmware/scmi/Kconfig"
|
||||
source "drivers/firmware/tisci/Kconfig"
|
||||
# zephyr-keep-sorted-stop
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/boot_report.h>
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/update.h>
|
||||
#include <nrf_ironside/boot_report.h>
|
||||
#include <nrf_ironside/update.h>
|
||||
#include <zephyr/logging/log.h>
|
||||
|
||||
LOG_MODULE_REGISTER(app, LOG_LEVEL_INF);
|
||||
|
||||
@@ -47,3 +47,4 @@ endif()
|
||||
|
||||
add_subdirectory(${SOC_SERIES})
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(ironside)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Copyright (c) 2025 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_include_directories(include)
|
||||
|
||||
zephyr_library()
|
||||
|
||||
zephyr_library_sources_ifdef(CONFIG_NRF_IRONSIDE_CALL call.c)
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <zephyr/devicetree.h>
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/boot_report.h>
|
||||
#include <nrf_ironside/boot_report.h>
|
||||
|
||||
#define IRONSIDE_SE_BOOT_REPORT_ADDR DT_REG_ADDR(DT_NODELABEL(ironside_se_boot_report))
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <nrf_ironside/call.h>
|
||||
#include <zephyr/cache.h>
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/call.h>
|
||||
#include <zephyr/drivers/mbox.h>
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/sys/barrier.h>
|
||||
@@ -9,8 +9,8 @@
|
||||
#include <zephyr/sys/util.h>
|
||||
#include <zephyr/kernel.h>
|
||||
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/call.h>
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/cpuconf.h>
|
||||
#include <nrf_ironside/call.h>
|
||||
#include <nrf_ironside/cpuconf.h>
|
||||
|
||||
#define CPU_PARAMS_CPU_OFFSET (0)
|
||||
#define CPU_PARAMS_CPU_MASK (0xF)
|
||||
@@ -5,8 +5,8 @@
|
||||
#include <hal/nrf_hsfll.h>
|
||||
#include <zephyr/kernel.h>
|
||||
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/dvfs.h>
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/call.h>
|
||||
#include <nrf_ironside/dvfs.h>
|
||||
#include <nrf_ironside/call.h>
|
||||
|
||||
static enum ironside_dvfs_oppoint current_dvfs_oppoint = IRONSIDE_DVFS_OPP_HIGH;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_BOOT_REPORT_H_
|
||||
#define ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_BOOT_REPORT_H_
|
||||
#ifndef ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_BOOT_REPORT_H_
|
||||
#define ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_BOOT_REPORT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
@@ -74,4 +74,4 @@ struct ironside_boot_report {
|
||||
*/
|
||||
int ironside_boot_report_get(const struct ironside_boot_report **report);
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_BOOT_REPORT_H_ */
|
||||
#endif /* ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_BOOT_REPORT_H_ */
|
||||
@@ -3,8 +3,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CALL_H_
|
||||
#define ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CALL_H_
|
||||
#ifndef ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CALL_H_
|
||||
#define ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CALL_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -79,4 +79,4 @@ void ironside_call_dispatch(struct ironside_call_buf *buf);
|
||||
*/
|
||||
void ironside_call_release(struct ironside_call_buf *buf);
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CALL_H_ */
|
||||
#endif /* ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CALL_H_ */
|
||||
@@ -3,14 +3,14 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CPUCONF_H_
|
||||
#define ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CPUCONF_H_
|
||||
#ifndef ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CPUCONF_H_
|
||||
#define ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CPUCONF_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/call.h>
|
||||
#include <zephyr/toolchain/common.h>
|
||||
#include <nrf.h>
|
||||
#include <nrf_ironside/call.h>
|
||||
|
||||
/**
|
||||
* @name CPUCONF service error codes.
|
||||
@@ -71,4 +71,4 @@ BUILD_ASSERT(IRONSIDE_CPUCONF_NUM_ARGS <= NRF_IRONSIDE_CALL_NUM_ARGS);
|
||||
int ironside_cpuconf(NRF_PROCESSORID_Type cpu, const void *vector_table, bool cpu_wait,
|
||||
const uint8_t *msg, size_t msg_size);
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CPUCONF_H_ */
|
||||
#endif /* ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CPUCONF_H_ */
|
||||
@@ -3,8 +3,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_DVFS_H_
|
||||
#define ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_DVFS_H_
|
||||
#ifndef ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_DVFS_H_
|
||||
#define ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_DVFS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
@@ -89,4 +89,4 @@ static inline bool ironside_dvfs_is_oppoint_valid(enum ironside_dvfs_oppoint dvf
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_DVFS_H_ */
|
||||
#endif /* ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_DVFS_H_ */
|
||||
@@ -3,8 +3,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_UPDATE_H_
|
||||
#define ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_UPDATE_H_
|
||||
#ifndef ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_UPDATE_H_
|
||||
#define ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_UPDATE_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
@@ -69,4 +69,4 @@ struct ironside_update_blob {
|
||||
*/
|
||||
int ironside_update(const struct ironside_update_blob *update);
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_UPDATE_H_ */
|
||||
#endif /* ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_UPDATE_H_ */
|
||||
@@ -3,8 +3,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/update.h>
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/call.h>
|
||||
#include <nrf_ironside/update.h>
|
||||
#include <nrf_ironside/call.h>
|
||||
|
||||
int ironside_update(const struct ironside_update_blob *update)
|
||||
{
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <soc/nrfx_coredep.h>
|
||||
#include <soc_lrcconf.h>
|
||||
#include <dmm.h>
|
||||
#include <zephyr/drivers/firmware/nrf_ironside/cpuconf.h>
|
||||
#include <nrf_ironside/cpuconf.h>
|
||||
|
||||
LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user