Skip to content

Commit 6664958

Browse files
alvsunjhedberg
authored andcommitted
drivers: flash: npcx: support GDMA operation for NPCXn and NPCKn
1. Introduced GDMA support for efficient data transfer in the NPCX FIU QSPI driver. 2. Refactor flash driver mutex handling to enhance concurrency safety, preventing other threads from preempting erase/write operations during UMA until mutex release. Signed-off-by: Alvis Sun <[email protected]> Signed-off-by: Tom Chang <[email protected]> Signed-off-by: Mulin Chao <[email protected]>
1 parent c6b2d00 commit 6664958

File tree

6 files changed

+551
-140
lines changed

6 files changed

+551
-140
lines changed

drivers/flash/Kconfig.npcx_fiu

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ config FLASH_NPCX_FIU_NOR
2626
This option enables the QSPI NOR Flash driver for NPCX family of
2727
processors.
2828

29+
config FLASH_NPCX_FIU_USE_DMA
30+
bool "Use GDMA for FIU transactions"
31+
default y if $(dt_nodelabel_has_prop,qspi_fiu0,dmas)
32+
depends on DMA_NPCX_GDMA
33+
help
34+
Enable GDMA transaction
35+
2936
if FLASH_NPCX_FIU_QSPI
3037

3138
config FLASH_NPCX_FIU_NOR_INIT
@@ -39,20 +46,39 @@ config FLASH_NPCX_FIU_NOR_INIT
3946

4047
config FLASH_NPCX_FIU_DRA_V1
4148
bool "Direct Read Access version 1 support"
42-
default y if SOC_SERIES_NPCX9
49+
default y
50+
depends on $(dt_compat_any_has_prop,$(DT_COMPAT_NUVOTON_NPCX_FIU_QSPI),support-npcxn-v1,True)
4351
help
4452
This option enables DRA V1 support.
4553

4654
config FLASH_NPCX_FIU_DRA_V2
4755
bool "Direct Read Access version 2 support"
48-
default y if SOC_SERIES_NPCX4
56+
default y
57+
depends on $(dt_compat_any_has_prop,$(DT_COMPAT_NUVOTON_NPCX_FIU_QSPI),support-npcxn-v2,True)
4958
help
50-
This option enables DRA V1 support.
59+
This option enables DRA V2 support.
60+
61+
config FLASH_NPCX_FIU_DRA_EX
62+
bool "Extended Direct Read Access mode support"
63+
default y
64+
depends on $(dt_compat_any_has_prop,$(DT_COMPAT_NUVOTON_NPCX_FIU_QSPI),support-npckn-v1,True)
65+
help
66+
This option enables extended DRA mode support for NPCKn variant of
67+
processors.
68+
69+
config FLASH_NPCX_FIU_UMA_EX
70+
bool "Extended User Mode Access mode support"
71+
default y
72+
depends on $(dt_compat_any_has_prop,$(DT_COMPAT_NUVOTON_NPCX_FIU_QSPI),support-npckn-v1,True)
73+
help
74+
This option enables extended UMA mode support for NPCKn variant of
75+
processors.
5176

5277
config FLASH_NPCX_FIU_SUPP_DRA_4B_ADDR
5378
bool "4 byte address support in Direct Read Access mode"
54-
default y if FLASH_NPCX_FIU_DRA_V1 || \
55-
FLASH_NPCX_FIU_DRA_V2
79+
default y if FLASH_NPCX_FIU_DRA_V1 || \
80+
FLASH_NPCX_FIU_DRA_V2 || \
81+
FLASH_NPCX_FIU_DRA_EX
5682
help
5783
Selected if NPCX series supports 4 byte address mode in Direct Read
5884
Access mode.

0 commit comments

Comments
 (0)