Skip to content

Commit

Permalink
modules: microchip: mec1501: Add missing ESPI VW defines
Browse files Browse the repository at this point in the history
Add missing ESPI Virtual Wire groups 8 - 11 GIRQ defines.

Signed-off-by: Scott Worley <[email protected]>
  • Loading branch information
scottwcpg committed Jul 26, 2021
1 parent b280eec commit ff0a329
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ MEC1501 component style is located at:

https://github.com/MicrochipTech/hal_microchip

Version: 1.2.0
Version: 1.2.1
Add missing eSPI Virtual Wires groups 8 - 10 GIRQ definitions.
24 changes: 23 additions & 1 deletion mec/mec1501/component/espi_vw.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@

/*
* ESPI MSVW interrupts
* GIRQ24 contains MSVW 0 - 6
* GIRQ25 contains MSVW 7 - 10
*/
#define MEC_ESPI_MSVW_NUM_GIRQS 2u

#define MEC_ESPI_MSVW_00_06_GIRQ 24u
#define MEC_ESPI_MSVW_00_06_NVIC 15u

Expand Down Expand Up @@ -253,11 +257,29 @@
#define MEC_ESPI_MSVW10_SRC2_POS 14u
#define MEC_ESPI_MSVW10_SRC3_POS 15u

#define MEC_ESPI_MSVW07_SRC0_VAL (1U << MEC_ESPI_MSVW07_SRC0_POS)
#define MEC_ESPI_MSVW07_SRC1_VAL (1U << MEC_ESPI_MSVW07_SRC1_POS)
#define MEC_ESPI_MSVW07_SRC2_VAL (1U << MEC_ESPI_MSVW07_SRC2_POS)
#define MEC_ESPI_MSVW07_SRC3_VAL (1U << MEC_ESPI_MSVW07_SRC3_POS)
#define MEC_ESPI_MSVW08_SRC0_VAL (1U << MEC_ESPI_MSVW08_SRC0_POS)
#define MEC_ESPI_MSVW08_SRC1_VAL (1U << MEC_ESPI_MSVW08_SRC1_POS)
#define MEC_ESPI_MSVW08_SRC2_VAL (1U << MEC_ESPI_MSVW08_SRC2_POS)
#define MEC_ESPI_MSVW08_SRC3_VAL (1U << MEC_ESPI_MSVW08_SRC3_POS)
#define MEC_ESPI_MSVW09_SRC0_VAL (1U << MEC_ESPI_MSVW09_SRC0_POS)
#define MEC_ESPI_MSVW09_SRC1_VAL (1U << MEC_ESPI_MSVW09_SRC1_POS)
#define MEC_ESPI_MSVW09_SRC2_VAL (1U << MEC_ESPI_MSVW09_SRC2_POS)
#define MEC_ESPI_MSVW09_SRC3_VAL (1U << MEC_ESPI_MSVW09_SRC3_POS)
#define MEC_ESPI_MSVW10_SRC0_VAL (1U << MEC_ESPI_MSVW10_SRC0_POS)
#define MEC_ESPI_MSVW10_SRC1_VAL (1U << MEC_ESPI_MSVW10_SRC1_POS)
#define MEC_ESPI_MSVW10_SRC2_VAL (1U << MEC_ESPI_MSVW10_SRC2_POS)
#define MEC_ESPI_MSVW10_SRC3_VAL (1U << MEC_ESPI_MSVW10_SRC3_POS)

/*
* 7 <= v <= 10
* 0 <= s <= 3
*/
#define MEC_ESPI_MSVW_07_10_GIRQ_POS(v, s) ((((uint32_t)(v) - 7ul) << 2) + (uint32_t)(s))
#define MEC_ESPI_MSVW_07_10_GIRQ_POS(v, s) \
((((uint32_t)(v) - 7ul) << 2) + (uint32_t)(s))

/* Master-to-Slave VW byte indices(offsets) */
#define MSVW_INDEX_OFS 0u
Expand Down

0 comments on commit ff0a329

Please sign in to comment.