aboutsummaryrefslogtreecommitdiff
path: root/hw/sd/allwinner-sdhost.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-08-14 11:23:41 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-08-21 16:35:35 +0200
commit39017143d6d7a068573da272528d7df71d0d31b4 (patch)
tree4f81026994f8c93587ece9ab05a83533ca755f77 /hw/sd/allwinner-sdhost.c
parentc769a88d4475f648595c6a270d9d0b0f3f7f3740 (diff)
hw/sd: Rename sdbus_write_data() as sdbus_write_byte()
The sdbus_write_data() method do a single byte access on the data line of a SD bus. Rename it as sdbus_write_byte() and document it. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200814092346.21825-3-f4bug@amsat.org>
Diffstat (limited to 'hw/sd/allwinner-sdhost.c')
-rw-r--r--hw/sd/allwinner-sdhost.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/sd/allwinner-sdhost.c b/hw/sd/allwinner-sdhost.c
index f404e1fdb4..e05e8a3864 100644
--- a/hw/sd/allwinner-sdhost.c
+++ b/hw/sd/allwinner-sdhost.c
@@ -335,7 +335,7 @@ static uint32_t allwinner_sdhost_process_desc(AwSdHostState *s,
buf, buf_bytes);
for (uint32_t i = 0; i < buf_bytes; i++) {
- sdbus_write_data(&s->sdbus, buf[i]);
+ sdbus_write_byte(&s->sdbus, buf[i]);
}
/* Read from SD bus */
@@ -654,10 +654,10 @@ static void allwinner_sdhost_write(void *opaque, hwaddr offset,
s->startbit_detect = value;
break;
case REG_SD_FIFO: /* Read/Write FIFO */
- sdbus_write_data(&s->sdbus, value & 0xff);
- sdbus_write_data(&s->sdbus, (value >> 8) & 0xff);
- sdbus_write_data(&s->sdbus, (value >> 16) & 0xff);
- sdbus_write_data(&s->sdbus, (value >> 24) & 0xff);
+ sdbus_write_byte(&s->sdbus, value & 0xff);
+ sdbus_write_byte(&s->sdbus, (value >> 8) & 0xff);
+ sdbus_write_byte(&s->sdbus, (value >> 16) & 0xff);
+ sdbus_write_byte(&s->sdbus, (value >> 24) & 0xff);
allwinner_sdhost_update_transfer_cnt(s, sizeof(uint32_t));
allwinner_sdhost_auto_stop(s);
allwinner_sdhost_update_irq(s);