summaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2015-02-19 14:51:15 -0800
committerPatrick Georgi <pgeorgi@google.com>2015-04-21 08:22:28 +0200
commit2f37bd65518865688b9234afce0d467508d6f465 (patch)
treeeba5ed799de966299602b30c70d51dd40eaadd73 /src/drivers
parent1f60f971fc89ef841e81b978964b38278d597b1d (diff)
downloadcoreboot-2f37bd65518865688b9234afce0d467508d6f465.tar.gz
coreboot-2f37bd65518865688b9234afce0d467508d6f465.tar.bz2
coreboot-2f37bd65518865688b9234afce0d467508d6f465.zip
arm(64): Globally replace writel(v, a) with write32(a, v)
This patch is a raw application of the following spatch to src/: @@ expression A, V; @@ - writel(V, A) + write32(A, V) @@ expression A, V; @@ - writew(V, A) + write16(A, V) @@ expression A, V; @@ - writeb(V, A) + write8(A, V) @@ expression A; @@ - readl(A) + read32(A) @@ expression A; @@ - readb(A) + read8(A) BRANCH=none BUG=chromium:444723 TEST=None (depends on next patch) Change-Id: I5dd96490c85ee2bcbc669f08bc6fff0ecc0f9e27 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 64f643da95d85954c4d4ea91c34a5c69b9b08eb6 Original-Change-Id: I366a2eb5b3a0df2279ebcce572fe814894791c42 Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/254864 Reviewed-on: http://review.coreboot.org/9836 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/gic/gic.c2
-rw-r--r--src/drivers/pc80/tpm/tpm.c22
-rw-r--r--src/drivers/xgi/common/vb_init.c8
3 files changed, 16 insertions, 16 deletions
diff --git a/src/drivers/gic/gic.c b/src/drivers/gic/gic.c
index 228ca124ec53..8972d04617ba 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 68758aa7eb3a..012f61dbed42 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 a2fbc805b235..4a4d50d0556b 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;