Lines Matching refs:I2CBaseAddress

237   UINTN  I2CBaseAddress;  in I2cDisable()  local
240 I2CBaseAddress = (UINT32) PEI_TEPM_LPSS_I2C0_BAR + I2cControllerIndex * PCI_CONFIG_SPACE_SIZE; in I2cDisable()
242 I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_ENABLE, 0); in I2cDisable()
243 while (0 != ( I2CLibPeiMmioRead16 (I2CBaseAddress + R_IC_ENABLE_STATUS ) & 1)) { in I2cDisable()
264 UINTN I2CBaseAddress; in I2cEnable() local
267 I2CBaseAddress = (UINT32) PEI_TEPM_LPSS_I2C0_BAR+ I2cControllerIndex * PCI_CONFIG_SPACE_SIZE; in I2cEnable()
268 I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_ENABLE, 1); in I2cEnable()
269 while (0 == ( I2CLibPeiMmioRead16 ( I2CBaseAddress + R_IC_ENABLE_STATUS ) & 1)) { in I2cEnable()
292 IN UINTN I2CBaseAddress, in I2cBusFrequencySet() argument
309 I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_SS_SCL_HCNT, (UINT16)0x214 ); in I2cBusFrequencySet()
310 I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_SS_SCL_LCNT, (UINT16)0x272 ); in I2cBusFrequencySet()
320 I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_FS_SCL_HCNT, (UINT16)0x50 ); in I2cBusFrequencySet()
321 I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_FS_SCL_LCNT, (UINT16)0xAD ); in I2cBusFrequencySet()
325 I2CLibPeiMmioWrite32 ( I2CBaseAddress + R_IC_SDA_HOLD, (UINT16)0x40);//100K in I2cBusFrequencySet()
329 I2CLibPeiMmioWrite32 ( I2CBaseAddress + R_IC_SDA_HOLD, (UINT16)0x32);//400K in I2cBusFrequencySet()
333 I2CLibPeiMmioWrite32 ( I2CBaseAddress + R_IC_SDA_HOLD, (UINT16)0x09);//3.4M in I2cBusFrequencySet()
356 UINTN I2CBaseAddress; in I2CInit() local
369 I2CBaseAddress = I2CLibPeiMmioRead32 (PciMmBase+R_PCH_LPSS_I2C_BAR); in I2CInit()
380 if(I2CBaseAddress == (PEI_TEPM_LPSS_I2C0_BAR + I2cControllerIndex * PCI_CONFIG_SPACE_SIZE)) { in I2CInit()
385 I2CBaseAddress = (UINT32) (PEI_TEPM_LPSS_I2C0_BAR + I2cControllerIndex * PCI_CONFIG_SPACE_SIZE); in I2CInit()
386 DEBUG ((EFI_D_ERROR, "I2CBaseAddress = 0x%x \n",I2CBaseAddress)); in I2CInit()
388 while ((1 == ( I2CLibPeiMmioRead32 ( I2CBaseAddress + R_IC_STATUS) & STAT_MST_ACTIVITY ))) { in I2CInit()
398 I2cBusFrequencySet(I2CBaseAddress, 400 * 1000, &I2cMode);//Set I2cMode in I2CInit()
400 I2CLibPeiMmioWrite16(I2CBaseAddress + R_IC_INTR_MASK, 0x0); in I2CInit()
404 I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_TAR, (UINT16) SlaveAddress ); in I2CInit()
405 I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_RX_TL, 0); in I2CInit()
406 I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_TX_TL, 0 ); in I2CInit()
407 I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_CON, I2cMode); in I2CInit()
411 I2CLibPeiMmioRead16 ( I2CBaseAddress + R_IC_CLR_TX_ABRT ); in I2CInit()
443 UINTN I2CBaseAddress; in ByteReadI2CBasic() local
445 I2CBaseAddress = (UINT32)(PEI_TEPM_LPSS_I2C0_BAR + I2cControllerIndex * PCI_CONFIG_SPACE_SIZE); in ByteReadI2CBasic()
460 RawIntrStat = I2CLibPeiMmioRead16 (I2CBaseAddress + R_IC_RawIntrStat ); in ByteReadI2CBasic()
462 I2CLibPeiMmioRead16 ( I2CBaseAddress + R_IC_CLR_TX_ABRT ); in ByteReadI2CBasic()
471 I2cStatus = I2CLibPeiMmioRead16 ( I2CBaseAddress + R_IC_STATUS ); in ByteReadI2CBasic()
473 ReceiveData = I2CLibPeiMmioRead16 ( I2CBaseAddress + R_IC_DATA_CMD ); in ByteReadI2CBasic()
497 I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD|B_CMD_RESTART|B_CMD_STOP); in ByteReadI2CBasic()
499 I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD|B_CMD_RESTART); in ByteReadI2CBasic()
501 I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD|B_CMD_STOP); in ByteReadI2CBasic()
503 I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD); in ByteReadI2CBasic()
539 UINTN I2CBaseAddress; in ByteWriteI2CBasic() local
541 I2CBaseAddress = (UINT32)PEI_TEPM_LPSS_I2C0_BAR+ I2cControllerIndex * PCI_CONFIG_SPACE_SIZE; in ByteWriteI2CBasic()
553 I2cStatus = I2CLibPeiMmioRead16 (I2CBaseAddress + R_IC_STATUS); in ByteWriteI2CBasic()
554 RawIntrStat = I2CLibPeiMmioRead16 (I2CBaseAddress + R_IC_RawIntrStat); in ByteWriteI2CBasic()
556 I2CLibPeiMmioRead16 (I2CBaseAddress + R_IC_CLR_TX_ABRT); in ByteWriteI2CBasic()
565 …I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffer++) | B_CMD_RESTART | B_CMD_STO… in ByteWriteI2CBasic()
567 I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffer++) | B_CMD_RESTART); in ByteWriteI2CBasic()
569 I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffer++) | B_CMD_STOP); in ByteWriteI2CBasic()
571 I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffer++)); in ByteWriteI2CBasic()