diff options
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/gic/gic.c | 2 | ||||
-rw-r--r-- | src/drivers/pc80/tpm/tpm.c | 22 | ||||
-rw-r--r-- | src/drivers/xgi/common/vb_init.c | 8 |
3 files changed, 16 insertions, 16 deletions
diff --git a/src/drivers/gic/gic.c b/src/drivers/gic/gic.c index 228ca124ec..8972d04617 100644 --- a/src/drivers/gic/gic.c +++ b/src/drivers/gic/gic.c @@ -61,7 +61,7 @@ static struct gic *gic_get(void) static inline void gic_write(uint32_t *base, uint32_t val) { - writel(val, base); + write32(base, val); } static void gic_write_regs(uint32_t *base, size_t num_regs, uint32_t val) diff --git a/src/drivers/pc80/tpm/tpm.c b/src/drivers/pc80/tpm/tpm.c index 68758aa7eb..012f61dbed 100644 --- a/src/drivers/pc80/tpm/tpm.c +++ b/src/drivers/pc80/tpm/tpm.c @@ -160,7 +160,7 @@ static u32 vendor_dev_id CAR_GLOBAL; static inline u8 tpm_read_status(int locality) { - u8 value = readb(TIS_REG(locality, TIS_REG_STS)); + u8 value = read8(TIS_REG(locality, TIS_REG_STS)); TPM_DEBUG_IO_READ(TIS_REG_STS, value); return value; } @@ -168,12 +168,12 @@ static inline u8 tpm_read_status(int locality) static inline void tpm_write_status(u8 sts, int locality) { TPM_DEBUG_IO_WRITE(TIS_REG_STS, sts); - writeb(sts, TIS_REG(locality, TIS_REG_STS)); + write8(TIS_REG(locality, TIS_REG_STS), sts); } static inline u8 tpm_read_data(int locality) { - u8 value = readb(TIS_REG(locality, TIS_REG_DATA_FIFO)); + u8 value = read8(TIS_REG(locality, TIS_REG_DATA_FIFO)); TPM_DEBUG_IO_READ(TIS_REG_DATA_FIFO, value); return value; } @@ -181,21 +181,21 @@ static inline u8 tpm_read_data(int locality) static inline void tpm_write_data(u8 data, int locality) { TPM_DEBUG_IO_WRITE(TIS_REG_STS, data); - writeb(data, TIS_REG(locality, TIS_REG_DATA_FIFO)); + write8(TIS_REG(locality, TIS_REG_DATA_FIFO), data); } static inline u16 tpm_read_burst_count(int locality) { u16 count; - count = readb(TIS_REG(locality, TIS_REG_BURST_COUNT)); - count |= readb(TIS_REG(locality, TIS_REG_BURST_COUNT + 1)) << 8; + count = read8(TIS_REG(locality, TIS_REG_BURST_COUNT)); + count |= read8(TIS_REG(locality, TIS_REG_BURST_COUNT + 1)) << 8; TPM_DEBUG_IO_READ(TIS_REG_BURST_COUNT, count); return count; } static inline u8 tpm_read_access(int locality) { - u8 value = readb(TIS_REG(locality, TIS_REG_ACCESS)); + u8 value = read8(TIS_REG(locality, TIS_REG_ACCESS)); TPM_DEBUG_IO_READ(TIS_REG_ACCESS, value); return value; } @@ -203,12 +203,12 @@ static inline u8 tpm_read_access(int locality) static inline void tpm_write_access(u8 data, int locality) { TPM_DEBUG_IO_WRITE(TIS_REG_ACCESS, data); - writeb(data, TIS_REG(locality, TIS_REG_ACCESS)); + write8(TIS_REG(locality, TIS_REG_ACCESS), data); } static inline u32 tpm_read_did_vid(int locality) { - u32 value = readl(TIS_REG(locality, TIS_REG_DID_VID)); + u32 value = read32(TIS_REG(locality, TIS_REG_DID_VID)); TPM_DEBUG_IO_READ(TIS_REG_DID_VID, value); return value; } @@ -216,7 +216,7 @@ static inline u32 tpm_read_did_vid(int locality) static inline void tpm_write_int_vector(int vector, int locality) { TPM_DEBUG_IO_WRITE(TIS_REG_INT_VECTOR, vector); - writeb(vector & 0xf, TIS_REG(locality, TIS_REG_INT_VECTOR)); + write8(TIS_REG(locality, TIS_REG_INT_VECTOR), vector & 0xf); } static inline void tpm_write_int_polarity(int polarity, int locality) @@ -224,7 +224,7 @@ static inline void tpm_write_int_polarity(int polarity, int locality) /* Set polarity and leave all other bits at 0 */ u32 value = (polarity & 0x3) << 3; TPM_DEBUG_IO_WRITE(TIS_REG_INT_ENABLE, value); - writel(value, TIS_REG(locality, TIS_REG_INT_ENABLE)); + write32(TIS_REG(locality, TIS_REG_INT_ENABLE), value); } /* diff --git a/src/drivers/xgi/common/vb_init.c b/src/drivers/xgi/common/vb_init.c index a2fbc805b2..4a4d50d055 100644 --- a/src/drivers/xgi/common/vb_init.c +++ b/src/drivers/xgi/common/vb_init.c @@ -568,23 +568,23 @@ static int XGINew_ReadWriteRest(unsigned short StopAddr, unsigned long Position = 0; void __iomem *fbaddr = pVBInfo->FBAddr; - writel(Position, fbaddr + Position); + write32(fbaddr + Position, Position); for (i = StartAddr; i <= StopAddr; i++) { Position = 1 << i; - writel(Position, fbaddr + Position); + write32(fbaddr + Position, Position); } udelay(500); /* Fix #1759 Memory Size error in Multi-Adapter. */ Position = 0; - if (readl(fbaddr + Position) != Position) + if (read32(fbaddr + Position) != Position) return 0; for (i = StartAddr; i <= StopAddr; i++) { Position = 1 << i; - if (readl(fbaddr + Position) != Position) + if (read32(fbaddr + Position) != Position) return 0; } return 1; |