Lines Matching refs:Reg
45 UINT32 Spr, BestSpr, Sppr, BestSppr, ClockDivider, Match, Reg, MinBaudDiff; in SpiSetBaudRate() local
83 Reg = MmioRead32 (SpiRegBase + SPI_CONF_REG); in SpiSetBaudRate()
84 Reg &= ~(SPI_SPR_MASK | SPI_SPPR_0_MASK | SPI_SPPR_HI_MASK); in SpiSetBaudRate()
85 Reg |= (BestSpr << SPI_SPR_OFFSET) | in SpiSetBaudRate()
88 MmioWrite32 (SpiRegBase + SPI_CONF_REG, Reg); in SpiSetBaudRate()
99 UINT32 Reg, SpiRegBase = PcdGet32 (PcdSpiRegBase); in SpiSetCs() local
101 Reg = MmioRead32 (SpiRegBase + SPI_CTRL_REG); in SpiSetCs()
102 Reg &= ~SPI_CS_NUM_MASK; in SpiSetCs()
103 Reg |= (CsId << SPI_CS_NUM_OFFSET); in SpiSetCs()
104 MmioWrite32 (SpiRegBase + SPI_CTRL_REG, Reg); in SpiSetCs()
113 UINT32 Reg, SpiRegBase = PcdGet32 (PcdSpiRegBase); in SpiActivateCs() local
116 Reg = MmioRead32 (SpiRegBase + SPI_CTRL_REG); in SpiActivateCs()
117 Reg |= SPI_CS_EN_MASK; in SpiActivateCs()
118 MmioWrite32(SpiRegBase + SPI_CTRL_REG, Reg); in SpiActivateCs()
127 UINT32 Reg, SpiRegBase = PcdGet32 (PcdSpiRegBase); in SpiDeactivateCs() local
129 Reg = MmioRead32 (SpiRegBase + SPI_CTRL_REG); in SpiDeactivateCs()
130 Reg &= ~SPI_CS_EN_MASK; in SpiDeactivateCs()
131 MmioWrite32(SpiRegBase + SPI_CTRL_REG, Reg); in SpiDeactivateCs()
142 UINT32 Reg, SpiRegBase, CoreClock, SpiMaxFreq; in SpiSetupTransfer() local
153 Reg = MmioRead32 (SpiRegBase + SPI_CONF_REG); in SpiSetupTransfer()
154 Reg |= SPI_BYTE_LENGTH; in SpiSetupTransfer()
155 MmioWrite32 (SpiRegBase + SPI_CONF_REG, Reg); in SpiSetupTransfer()
161 Reg = MmioRead32 (SpiRegBase + SPI_CONF_REG); in SpiSetupTransfer()
162 Reg &= ~(SPI_CPOL_MASK | SPI_CPHA_MASK | SPI_TXLSBF_MASK | SPI_RXLSBF_MASK); in SpiSetupTransfer()
168 Reg |= SPI_CPHA_MASK; in SpiSetupTransfer()
171 Reg |= SPI_CPOL_MASK; in SpiSetupTransfer()
174 Reg |= SPI_CPOL_MASK; in SpiSetupTransfer()
175 Reg |= SPI_CPHA_MASK; in SpiSetupTransfer()
179 MmioWrite32 (SpiRegBase + SPI_CONF_REG, Reg); in SpiSetupTransfer()
197 UINT32 Iterator, Reg, SpiRegBase; in MvSpiTransfer() local
215 Reg = MmioRead32 (SpiRegBase + SPI_CONF_REG); in MvSpiTransfer()
216 Reg &= ~SPI_BYTE_LENGTH; in MvSpiTransfer()
217 MmioWrite32 (SpiRegBase + SPI_CONF_REG, Reg); in MvSpiTransfer()