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 <dzigterman@google.com>
This commit is contained in:
Diana Zigterman 2021-10-13 12:12:20 -06:00 committed by Anas Nashif
commit 5a8434585d

View file

@ -671,8 +671,8 @@ struct espi_reg {
#define NPCX_ESPICFG_HFLASHCHANEN 7 #define NPCX_ESPICFG_HFLASHCHANEN 7
#define NPCX_ESPICFG_CHANS_FIELD FIELD(0, 4) #define NPCX_ESPICFG_CHANS_FIELD FIELD(0, 4)
#define NPCX_ESPICFG_HCHANS_FIELD FIELD(4, 4) #define NPCX_ESPICFG_HCHANS_FIELD FIELD(4, 4)
#define NPCX_ESPICFG_IOMODE_FIELD FIELD(8, 9) #define NPCX_ESPICFG_IOMODE_FIELD FIELD(8, 2)
#define NPCX_ESPICFG_MAXFREQ_FIELD FIELD(10, 12) #define NPCX_ESPICFG_MAXFREQ_FIELD FIELD(10, 3)
#define NPCX_ESPICFG_PCCHN_SUPP 24 #define NPCX_ESPICFG_PCCHN_SUPP 24
#define NPCX_ESPICFG_VWCHN_SUPP 25 #define NPCX_ESPICFG_VWCHN_SUPP 25
#define NPCX_ESPICFG_OOBCHN_SUPP 26 #define NPCX_ESPICFG_OOBCHN_SUPP 26