Received: from eggs.gnu.org ([2001:4830:134:3::10]:39429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8uoQ-0003LA-7A for qemu-devel@nongnu.org; Sat, 27 Jun 2015 14:26:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8uoL-000243-3w for qemu-devel@nongnu.org; Sat, 27 Jun 2015 14:26:46 -0400 Received: from mail-qk0-x230.google.com ([2607:f8b0:400d:c09::230]:35778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8uoK-00023z-UB for qemu-devel@nongnu.org; Sat, 27 Jun 2015 14:26:41 -0400 Received: by qkbp125 with SMTP id p125so72541193qkb.2 for ; Sat, 27 Jun 2015 11:26:40 -0700 (PDT) From: Paulo Alcantara Date: Sat, 27 Jun 2015 15:26:13 -0300 Message-Id: <1435429573-1728-1-git-send-email-pcacjr@zytor.com> Subject: [Qemu-devel] [PATCH] ich9: Fix naming confusion when referring to RCBA register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, Paulo Alcantara , mst@redhat.com Looks like RCBA was confused by either RBCA (Receive Broadcast Packet, TSEC), or they were all just typos. This patch changes all incorrect namings from RBCA to RCBA. Signed-off-by: Paulo Alcantara --- hw/isa/lpc_ich9.c | 32 ++++++++++++++++---------------- include/hw/i386/ich9.h | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index b3e0b1f..3d02c53 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -392,18 +392,18 @@ ich9_lpc_pmbase_update(ICH9LPCState *lpc) ich9_pm_iospace_update(&lpc->pm, pm_io_base); } -/* config:RBCA */ -static void ich9_lpc_rcba_update(ICH9LPCState *lpc, uint32_t rbca_old) +/* config:RCBA */ +static void ich9_lpc_rcba_update(ICH9LPCState *lpc, uint32_t rcba_old) { - uint32_t rbca = pci_get_long(lpc->d.config + ICH9_LPC_RCBA); + uint32_t rcba = pci_get_long(lpc->d.config + ICH9_LPC_RCBA); - if (rbca_old & ICH9_LPC_RCBA_EN) { - memory_region_del_subregion(get_system_memory(), &lpc->rbca_mem); + if (rcba_old & ICH9_LPC_RCBA_EN) { + memory_region_del_subregion(get_system_memory(), &lpc->rcba_mem); } - if (rbca & ICH9_LPC_RCBA_EN) { + if (rcba & ICH9_LPC_RCBA_EN) { memory_region_add_subregion_overlap(get_system_memory(), - rbca & ICH9_LPC_RCBA_BA_MASK, - &lpc->rbca_mem, 1); + rcba & ICH9_LPC_RCBA_BA_MASK, + &lpc->rcba_mem, 1); } } @@ -427,7 +427,7 @@ static int ich9_lpc_post_load(void *opaque, int version_id) ICH9LPCState *lpc = opaque; ich9_lpc_pmbase_update(lpc); - ich9_lpc_rcba_update(lpc, 0 /* disabled ICH9_LPC_RBCA_EN */); + ich9_lpc_rcba_update(lpc, 0 /* disabled ICH9_LPC_RCBA_EN */); ich9_lpc_pmcon_update(lpc); return 0; } @@ -436,14 +436,14 @@ static void ich9_lpc_config_write(PCIDevice *d, uint32_t addr, uint32_t val, int len) { ICH9LPCState *lpc = ICH9_LPC_DEVICE(d); - uint32_t rbca_old = pci_get_long(d->config + ICH9_LPC_RCBA); + uint32_t rcba_old = pci_get_long(d->config + ICH9_LPC_RCBA); pci_default_write_config(d, addr, val, len); if (ranges_overlap(addr, len, ICH9_LPC_PMBASE, 4)) { ich9_lpc_pmbase_update(lpc); } if (ranges_overlap(addr, len, ICH9_LPC_RCBA, 4)) { - ich9_lpc_rcba_update(lpc, rbca_old); + ich9_lpc_rcba_update(lpc, rcba_old); } if (ranges_overlap(addr, len, ICH9_LPC_PIRQA_ROUT, 4)) { pci_bus_fire_intx_routing_notifier(lpc->d.bus); @@ -460,7 +460,7 @@ static void ich9_lpc_reset(DeviceState *qdev) { PCIDevice *d = PCI_DEVICE(qdev); ICH9LPCState *lpc = ICH9_LPC_DEVICE(d); - uint32_t rbca_old = pci_get_long(d->config + ICH9_LPC_RCBA); + uint32_t rcba_old = pci_get_long(d->config + ICH9_LPC_RCBA); int i; for (i = 0; i < 4; i++) { @@ -479,13 +479,13 @@ static void ich9_lpc_reset(DeviceState *qdev) ich9_cc_reset(lpc); ich9_lpc_pmbase_update(lpc); - ich9_lpc_rcba_update(lpc, rbca_old); + ich9_lpc_rcba_update(lpc, rcba_old); lpc->sci_level = 0; lpc->rst_cnt = 0; } -static const MemoryRegionOps rbca_mmio_ops = { +static const MemoryRegionOps rcba_mmio_ops = { .read = ich9_cc_read, .write = ich9_cc_write, .endianness = DEVICE_LITTLE_ENDIAN, @@ -596,8 +596,8 @@ static int ich9_lpc_init(PCIDevice *d) pci_set_long(d->wmask + ICH9_LPC_PMBASE, ICH9_LPC_PMBASE_BASE_ADDRESS_MASK); - memory_region_init_io(&lpc->rbca_mem, OBJECT(d), &rbca_mmio_ops, lpc, - "lpc-rbca-mmio", ICH9_CC_SIZE); + memory_region_init_io(&lpc->rcba_mem, OBJECT(d), &rcba_mmio_ops, lpc, + "lpc-rcba-mmio", ICH9_CC_SIZE); lpc->isa_bus = isa_bus; diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h index a2cc15c..c0c70d0 100644 --- a/include/hw/i386/ich9.h +++ b/include/hw/i386/ich9.h @@ -57,7 +57,7 @@ typedef struct ICH9LPCState { /* isa bus */ ISABus *isa_bus; - MemoryRegion rbca_mem; + MemoryRegion rcba_mem; Notifier machine_ready; qemu_irq *pic; -- 2.1.0