diff mbox series

[edk2,edk2-platforms,v3,31/36] Silicon/Hisilicon/D06: Add I2C Bus Exception handle function

Message ID 20180816121239.44129-32-ming.huang@linaro.org
State Superseded
Headers show
Series Upload for D06 platform | expand

Commit Message

Ming Huang Aug. 16, 2018, 12:12 p.m. UTC
During the period of I2c accessing, if the board is reset
unexpectedly, and because the I2c client can not reset,
the SDA will be always pull down, then it cause I2C bus
Exception.

Follow the Hi1620 I2C FS chapter 1.8.2 design, add I2C
Bus Exception handle function. It will Config SCL and SDA
to GPIO, and set the reversal frequency of SCL to 10KHz.

The implementation of functions is in edk2-non-osi.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>

---
 Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.17.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
index 3ccfc6bee3..a232e52ed7 100644
--- a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
+++ b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
@@ -106,4 +106,7 @@  VOID DisableClusterClock(UINTN CpuClusterBase);
 VOID EnableClusterClock(UINTN CpuClusterBase);
 VOID DisableSocketClock (UINT8 Skt);
 
+EFI_STATUS EFIAPI HandleI2CException (UINT32 Socket, UINT32 Port);
+EFI_STATUS EFIAPI HandleI2CExceptionBySocket (UINT32 Socket);
+
 #endif