Commit b530be45 authored by Jay Vasanth's avatar Jay Vasanth Committed by Maureen Helm
Browse files

espi: mec172x: kbc0_ibf_isr: read sts before data



Read KBC Status register before reading KBC Data register
in kbc0_ibf_isr; since read data will clear status.

Signed-off-by: default avatarJay Vasanth <jay.vasanth@microchip.com>
parent 3abfb587
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -196,9 +196,9 @@ static void kbc0_ibf_isr(const struct device *dev)
	 * and the lower byte speficies if the host sent
	 * a command or data. 1 = Command.
	 */
	uint32_t isr_data = ((kbc_hw->EC_DATA & 0xFF) << E8042_ISR_DATA_POS) |
				((kbc_hw->EC_KBC_STS & MCHP_KBC_STS_CD) <<
	uint32_t isr_data = ((kbc_hw->EC_KBC_STS & MCHP_KBC_STS_CD) <<
				E8042_ISR_CMD_DATA_POS);
	isr_data |= ((kbc_hw->EC_DATA & 0xFF) << E8042_ISR_DATA_POS);

	struct espi_event evt = {
		.evt_type = ESPI_BUS_PERIPHERAL_NOTIFICATION,