[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/9] intel-hda: use specific endian ld/st_phys
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 3/9] intel-hda: use specific endian ld/st_phys |
Date: |
Tue, 5 Jul 2011 18:28:04 +0200 |
Signed-off-by: Alexander Graf <address@hidden>
---
hw/intel-hda.c | 21 ++++-----------------
1 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/hw/intel-hda.c b/hw/intel-hda.c
index 0ffffce..5a2bc3a 100644
--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -224,19 +224,6 @@ static target_phys_addr_t intel_hda_addr(uint32_t lbase,
uint32_t ubase)
return addr;
}
-static void stl_phys_le(target_phys_addr_t addr, uint32_t value)
-{
- uint32_t value_le = cpu_to_le32(value);
- cpu_physical_memory_write(addr, (uint8_t*)(&value_le), sizeof(value_le));
-}
-
-static uint32_t ldl_phys_le(target_phys_addr_t addr)
-{
- uint32_t value_le;
- cpu_physical_memory_read(addr, (uint8_t*)(&value_le), sizeof(value_le));
- return le32_to_cpu(value_le);
-}
-
static void intel_hda_update_int_sts(IntelHDAState *d)
{
uint32_t sts = 0;
@@ -341,7 +328,7 @@ static void intel_hda_corb_run(IntelHDAState *d)
rp = (d->corb_rp + 1) & 0xff;
addr = intel_hda_addr(d->corb_lbase, d->corb_ubase);
- verb = ldl_phys_le(addr + 4*rp);
+ verb = ldl_le_phys(addr + 4*rp);
d->corb_rp = rp;
dprint(d, 2, "%s: [rp 0x%x] verb 0x%08x\n", __FUNCTION__, rp, verb);
@@ -373,8 +360,8 @@ static void intel_hda_response(HDACodecDevice *dev, bool
solicited, uint32_t res
ex = (solicited ? 0 : (1 << 4)) | dev->cad;
wp = (d->rirb_wp + 1) & 0xff;
addr = intel_hda_addr(d->rirb_lbase, d->rirb_ubase);
- stl_phys_le(addr + 8*wp, response);
- stl_phys_le(addr + 8*wp + 4, ex);
+ stl_le_phys(addr + 8*wp, response);
+ stl_le_phys(addr + 8*wp + 4, ex);
d->rirb_wp = wp;
dprint(d, 2, "%s: [wp 0x%x] response 0x%x, extra 0x%x\n",
@@ -461,7 +448,7 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t
stnr, bool output,
}
if (d->dp_lbase & 0x01) {
addr = intel_hda_addr(d->dp_lbase & ~0x01, d->dp_ubase);
- stl_phys_le(addr + 8*s, st->lpib);
+ stl_le_phys(addr + 8*s, st->lpib);
}
dprint(d, 3, "dma: --\n");
--
1.7.3.4
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, (continued)
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Alexander Graf, 2011/07/05
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Paolo Bonzini, 2011/07/06
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Alexander Graf, 2011/07/06
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Hannes Reinecke, 2011/07/06
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Alexander Graf, 2011/07/06
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Paolo Bonzini, 2011/07/06
[Qemu-devel] [PATCH 6/9] pl080: use specific endian ld/st_phys, Alexander Graf, 2011/07/05
[Qemu-devel] [PATCH 9/9] spapr: use specific endian ld/st_phys, Alexander Graf, 2011/07/05
[Qemu-devel] [PATCH 5/9] msix: use specific endian ld/st_phys, Alexander Graf, 2011/07/05
[Qemu-devel] [PATCH 3/9] intel-hda: use specific endian ld/st_phys,
Alexander Graf <=
Re: [Qemu-devel] [PATCH 0/9] Don't use ld./st._phys in hw/, Blue Swirl, 2011/07/05