From 5a8434585d815cfc2506127fb922ed7ec69ba796 Mon Sep 17 00:00:00 2001 From: Diana Zigterman Date: Wed, 13 Oct 2021 12:12:20 -0600 Subject: [PATCH] NPCX: Correct ESPICFG fields The parameters to FIELD() should be the position and size of each bit field. Correct the size of IOMODE and MAXFREQ. Otherwise, the MAXFREQ field is overwritten by the IOMODE update during espi_npcx_configure(). Signed-off-by: Diana Zigterman --- soc/arm/nuvoton_npcx/common/reg/reg_def.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soc/arm/nuvoton_npcx/common/reg/reg_def.h b/soc/arm/nuvoton_npcx/common/reg/reg_def.h index dc876320755..f9808f0df6f 100644 --- a/soc/arm/nuvoton_npcx/common/reg/reg_def.h +++ b/soc/arm/nuvoton_npcx/common/reg/reg_def.h @@ -671,8 +671,8 @@ struct espi_reg { #define NPCX_ESPICFG_HFLASHCHANEN 7 #define NPCX_ESPICFG_CHANS_FIELD FIELD(0, 4) #define NPCX_ESPICFG_HCHANS_FIELD FIELD(4, 4) -#define NPCX_ESPICFG_IOMODE_FIELD FIELD(8, 9) -#define NPCX_ESPICFG_MAXFREQ_FIELD FIELD(10, 12) +#define NPCX_ESPICFG_IOMODE_FIELD FIELD(8, 2) +#define NPCX_ESPICFG_MAXFREQ_FIELD FIELD(10, 3) #define NPCX_ESPICFG_PCCHN_SUPP 24 #define NPCX_ESPICFG_VWCHN_SUPP 25 #define NPCX_ESPICFG_OOBCHN_SUPP 26