summaryrefslogtreecommitdiff
path: root/chip/mchp/espi.c
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2019-10-10 15:43:02 -0600
committerCommit Bot <commit-bot@chromium.org>2019-10-25 18:52:08 +0000
commit9f392b0d616f6fec17d213736e6bf9f4217392e4 (patch)
tree85eb83515d93fa2cd5fe036d270b2811ff9101cb /chip/mchp/espi.c
parent7eded13a72691fdce4d66f59c5b119969afa35c0 (diff)
downloadchrome-ec-9f392b0d616f6fec17d213736e6bf9f4217392e4.tar.gz
GPIO/IOEX/eSPI: Give different IO signals unique values
There are 3 different IO signal types used by the EC. Ensure they each use a unique range of values so we can tell them apart. 1) Local GPIO => 0 to 0x0FFF 2) IO expander GPIO => 0x1000 to 0x1FFF 3) eSPI virtual wire signals => 0x2000 to 0x2FFF BUG=b:138600691 BRANCH=none TEST=IO expander signals still work on Trembyle Change-Id: I63fadb4bb4573ed3dd121c24e3bd40a00873e29f Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1854778 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'chip/mchp/espi.c')
-rw-r--r--chip/mchp/espi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/chip/mchp/espi.c b/chip/mchp/espi.c
index e7459ae25c..95cd05c10a 100644
--- a/chip/mchp/espi.c
+++ b/chip/mchp/espi.c
@@ -578,7 +578,7 @@ static void espi_pc_flush(void)
void espi_vw_power_signal_interrupt(enum espi_vw_signal signal)
{
CPRINTS("eSPI power signal interrupt for VW %d", signal);
- trace1(0, ESPI, 0, "eSPI pwr intr VW %d", (signal - VW_SIGNAL_BASE));
+ trace1(0, ESPI, 0, "eSPI pwr intr VW %d", (signal - VW_SIGNAL_START));
power_signal_interrupt((enum gpio_signal) signal);
}
@@ -625,7 +625,7 @@ int espi_vw_set_wire(enum espi_vw_signal signal, uint8_t level)
CPRINTS("eSPI VW Set Wire %s = %d",
espi_vw_get_wire_name(signal), level);
trace2(0, ESPI, 0, "VW SetWire[%d] = %d",
- ((uint32_t)signal - VW_SIGNAL_BASE), level);
+ ((uint32_t)signal - VW_SIGNAL_START), level);
#endif
return EC_SUCCESS;
@@ -735,7 +735,7 @@ int espi_vw_get_wire(enum espi_vw_signal signal)
CPRINTS("VW GetWire %s = %d",
espi_vw_get_wire_name(signal), vw);
trace2(0, ESPI, 0, "VW GetWire[%d] = %d",
- ((uint32_t)signal - VW_SIGNAL_BASE), vw);
+ ((uint32_t)signal - VW_SIGNAL_START), vw);
#endif
}
@@ -765,7 +765,7 @@ int espi_vw_enable_wire_int(enum espi_vw_signal signal)
CPRINTS("VW IntrEn for VW[%s]",
espi_vw_get_wire_name(signal));
trace1(0, ESPI, 0, "VW IntrEn for VW[%d]",
- ((uint32_t)signal - VW_SIGNAL_BASE));
+ ((uint32_t)signal - VW_SIGNAL_START));
#endif
ridx = vw_info_tbl[tidx].reg_idx;
@@ -816,7 +816,7 @@ int espi_vw_disable_wire_int(enum espi_vw_signal signal)
CPRINTS("VW IntrDis for VW[%s]",
espi_vw_get_wire_name(signal));
trace1(0, ESPI, 0, "VW IntrDis for VW[%d]",
- (signal - VW_SIGNAL_BASE));
+ (signal - VW_SIGNAL_START));
#endif
ridx = vw_info_tbl[tidx].reg_idx;