From: shaochangliang <[email protected]>

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 deal 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: shaochangliang <[email protected]>
Signed-off-by: Ming Huang <[email protected]>
Signed-off-by: Heyi Guo <[email protected]>
---
 Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h 
b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
index cc60e213de..483c2c2d41 100644
--- a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
+++ b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
@@ -106,4 +106,9 @@ VOID CloseClusterClock(UINTN CpuClusterBase);
 VOID EnableClusterClock(UINTN CpuClusterBase);
 VOID CloseSktClock (UINT8 Skt);
 
+EFI_STATUS EFIAPI DealI2cBusException(UINT32 Socket);
+EFI_STATUS
+EFIAPI
+I2C_DealException(UINT32 Socket, UINT32 Port);
+
 #endif
-- 
2.17.0

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to