Message ID | 20180724070922.63362-35-ming.huang@linaro.org |
---|---|
State | New |
Headers | show |
Series | Upload for D06 platform | expand |
On Tue, Jul 24, 2018 at 03:09:18PM +0800, Ming Huang wrote: > From: shaochangliang <shaochangliang@huawei.com> > > 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 'handle' sounds better than 'deal' here and in the function names. Could they be changed? > 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 <shaochangliang@huawei.com> > Signed-off-by: Ming Huang <ming.huang@linaro.org> > Signed-off-by: Heyi Guo <heyi.guo@linaro.org> > --- > 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); Drop the '_'. Also if the first prototype is HandleI2cBusException should this not be HandleI2cException? (Putting the action in different places for the two functions looks confusing.) / Leif > + > #endif > -- > 2.17.0 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
在 8/4/2018 11:18 PM, Leif Lindholm 写道: > On Tue, Jul 24, 2018 at 03:09:18PM +0800, Ming Huang wrote: >> From: shaochangliang <shaochangliang@huawei.com> >> >> 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 > > 'handle' sounds better than 'deal' here and in the function > names. Could they be changed? OK, change them in v2. > >> 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 <shaochangliang@huawei.com> >> Signed-off-by: Ming Huang <ming.huang@linaro.org> >> Signed-off-by: Heyi Guo <heyi.guo@linaro.org> >> --- >> 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); > > Drop the '_'. > > Also if the first prototype is > HandleI2cBusException should this not be > HandleI2cException? (Putting the action in different places for the > two functions looks confusing.) OK, change it in v2. Thanks. > > / > Leif > >> + >> #endif >> -- >> 2.17.0 >>
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