diff --git a/bsps/include/dev/nand/xnandpsu.h b/bsps/include/dev/nand/xnandpsu.h index e311bb155b..c0655f9ef6 100644 --- a/bsps/include/dev/nand/xnandpsu.h +++ b/bsps/include/dev/nand/xnandpsu.h @@ -189,7 +189,7 @@ extern "C" { #define XNANDPSU_DEBUG #ifdef __rtems__ -#define XNANDPSU_MAX_TARGETS 2U /**< ce_n0, ce_n1 */ +#define XNANDPSU_MAX_TARGETS BSP_NANDPSU_TOTAL_CHIPS #else #define XNANDPSU_MAX_TARGETS 1U /**< ce_n0, ce_n1 */ #endif diff --git a/spec/build/bsps/objnandpsu.yml b/spec/build/bsps/objnandpsu.yml index 30c2634f51..5a27007e9c 100644 --- a/spec/build/bsps/objnandpsu.yml +++ b/spec/build/bsps/objnandpsu.yml @@ -19,7 +19,9 @@ install: - bsps/include/dev/nand/xnandpsu.h - bsps/include/dev/nand/xnandpsu_hw.h - bsps/include/dev/nand/xnandpsu_onfi.h -links: [] +links: +- role: build-dependency + uid: optnandpsuchips source: - bsps/shared/dev/nand/xnandpsu_bbm.c - bsps/shared/dev/nand/xnandpsu.c diff --git a/spec/build/bsps/optnandpsuchips.yml b/spec/build/bsps/optnandpsuchips.yml new file mode 100644 index 0000000000..d2a8ada483 --- /dev/null +++ b/spec/build/bsps/optnandpsuchips.yml @@ -0,0 +1,21 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-integer: null +- env-enable: null +- format-and-define: null +build-type: option +copyrights: +- Copyright (C) 2025 On-Line Applications Research (OAR) Corporation +default: +- enabled-by: + - aarch64/zynqmp_cfc400x + value: 2 +- enabled-by: true + value: 1 +description: | + Set the number of NAND chips expected to be attached to the NAND controller +enabled-by: true +format: '{}' +links: [] +name: BSP_NANDPSU_TOTAL_CHIPS +type: build