Received: from eggs.gnu.org ([2001:4830:134:3::10]:50308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIKzG-000736-CD for qemu-devel@nongnu.org; Fri, 15 Aug 2014 13:08:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XIKzB-0000O2-5y for qemu-devel@nongnu.org; Fri, 15 Aug 2014 13:08:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIKzA-0000Ny-UH for qemu-devel@nongnu.org; Fri, 15 Aug 2014 13:08:17 -0400 From: Stefan Hajnoczi Date: Fri, 15 Aug 2014 18:06:32 +0100 Message-Id: <1408122422-13935-26-git-send-email-stefanha@redhat.com> In-Reply-To: <1408122422-13935-1-git-send-email-stefanha@redhat.com> References: <1408122422-13935-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 25/55] cmd646: add constants for CNTRL register access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Mark Cave-Ayland , Stefan Hajnoczi From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Stefan Hajnoczi --- hw/ide/cmd646.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index a8e35fe..d8395ef 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -33,6 +33,9 @@ #include /* CMD646 specific */ +#define CNTRL 0x51 +#define CNTRL_EN_CH0 0x04 +#define CNTRL_EN_CH1 0x08 #define MRDMODE 0x71 #define MRDMODE_INTR_CH0 0x04 #define MRDMODE_INTR_CH1 0x08 @@ -269,10 +272,10 @@ static int pci_cmd646_ide_initfn(PCIDevice *dev) pci_conf[PCI_CLASS_PROG] = 0x8f; - pci_conf[0x51] = 0x04; // enable IDE0 + pci_conf[CNTRL] = CNTRL_EN_CH0; // enable IDE0 if (d->secondary) { /* XXX: if not enabled, really disable the seconday IDE controller */ - pci_conf[0x51] |= 0x08; /* enable IDE1 */ + pci_conf[CNTRL] |= CNTRL_EN_CH1; /* enable IDE1 */ } setup_cmd646_bar(d, 0); -- 1.9.3