From nobody Tue Dec 16 05:37:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520983008952928.6682230812638; Tue, 13 Mar 2018 16:16:48 -0700 (PDT) Received: from localhost ([::1]:43438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evtA0-0003uV-4T for importer@patchew.org; Tue, 13 Mar 2018 19:16:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evsiC-0005t7-C7 for qemu-devel@nongnu.org; Tue, 13 Mar 2018 18:48:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evsiB-0003Y2-A0 for qemu-devel@nongnu.org; Tue, 13 Mar 2018 18:48:04 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:45854) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1evsiB-0003Wf-0x for qemu-devel@nongnu.org; Tue, 13 Mar 2018 18:48:03 -0400 Received: by mail-wr0-x241.google.com with SMTP id h2so2479952wre.12 for ; Tue, 13 Mar 2018 15:48:02 -0700 (PDT) Received: from donizetti.lan (94-36-191-219.adsl-ull.clienti.tiscali.it. [94.36.191.219]) by smtp.gmail.com with ESMTPSA id x107sm1557951wrb.97.2018.03.13.15.48.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Mar 2018 15:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qyc9MswLQ4sjH+Vti2P6DVcLBX4/bajQXSQ2fSyv/fY=; b=LxTE9cc/f4Kd7Ms/O3kGgxBJlmn37t7f+vg5KUfy+FIvRGm+sXK6p1DxvJmFcAArdO qP8ZZJ+FMIyzkxbFqpoNoQGJhTgS5rytC/Wyk704fmR9dDNRv61lBjP0vr/e/4MeHHbw AOUSO48wGbhe8eKeApOyQghL+Ela1AgCYOM8UbVRPxD+fw0jnh1MaEo0wjsR3+bCa9eQ krGF2Z+qFXMe4FNoEE6U6UljD4a2j6qvDiBeM9edsOJWm7rxLhzb0Xp1aPNFi9gSwj8E 4cV0+8+tu/CBYmlV3CtqTNvuPXu0jBaztMji5JYWqrQBa3SbyA9h7mBaPDQsHAJXyDj7 1wyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=qyc9MswLQ4sjH+Vti2P6DVcLBX4/bajQXSQ2fSyv/fY=; b=Z2Ah/zNT8c9TJlYRb/1HMip93KpgOktqps0sIZj33j42oRx3B9cqa6A1klAdO7VoL/ 4Ttp8sEHEp+5QWHjlUnG/rjP4o6xIvTU9JBWXoPxYewQt9jJa8J3JwCaNIbFi5tDkosG prX7/bb2No73D2ANbsPi7ZU/rsadV+uHjB9ycq+xhtkWw+uPoJNQ2W0eOKk3jbizNjxO ppUCFULipRfViYjef7LV/mpavjVwU4tw35+kzT6x4jH16+RCOi/GMT/an3K6I3VFTJ9W qb95BYH6MvnalBoo4E2LOa25BF+l86uKz0qn3XXoHjhqYoxs0v8eWUxFefJKCT9789zZ PO1w== X-Gm-Message-State: AElRT7FqMEW5D8i3wQZXDUNIF7jG/8bofeO0PBxmK9tZ8vAm465IwLhv 4RFcXyZhzO6gIEiHwe/NaALlXuNx X-Google-Smtp-Source: AG47ELtrEgpWORnUW0TnX3sJ+4U8UX46HCAogw2roH2snAT2XRYWU3AAzetubTNxkjljw7/KG0W8RQ== X-Received: by 10.223.195.116 with SMTP id e49mr1926320wrg.5.1520981281636; Tue, 13 Mar 2018 15:48:01 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 13 Mar 2018 23:46:42 +0100 Message-Id: <20180313224719.4954-33-pbonzini@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180313224719.4954-1-pbonzini@redhat.com> References: <20180313224719.4954-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PULL 32/69] hw/isa/pc87312: Use uint16_t for the ISA I/O base address X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Philippe Mathieu-Daud=C3=A9 This matches the isa_register_ioport() prototype. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20180308223946.26784-7-f4bug@amsat.org> Signed-off-by: Paolo Bonzini --- hw/isa/pc87312.c | 14 +++++++------- include/hw/isa/pc87312.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c index e9edbc6c50..105c23e680 100644 --- a/hw/isa/pc87312.c +++ b/hw/isa/pc87312.c @@ -69,9 +69,9 @@ static inline bool is_parallel_enabled(PC87312State *s) return s->regs[REG_FER] & FER_PARALLEL_EN; } =20 -static const uint32_t parallel_base[] =3D { 0x378, 0x3bc, 0x278, 0x00 }; +static const uint16_t parallel_base[] =3D { 0x378, 0x3bc, 0x278, 0x00 }; =20 -static inline uint32_t get_parallel_iobase(PC87312State *s) +static inline uint16_t get_parallel_iobase(PC87312State *s) { return parallel_base[s->regs[REG_FAR] & FAR_PARALLEL_ADDR]; } @@ -92,12 +92,12 @@ static inline uint32_t get_parallel_irq(PC87312State *s) =20 /* UARTs */ =20 -static const uint32_t uart_base[2][4] =3D { +static const uint16_t uart_base[2][4] =3D { { 0x3e8, 0x338, 0x2e8, 0x220 }, { 0x2e8, 0x238, 0x2e0, 0x228 } }; =20 -static inline uint32_t get_uart_iobase(PC87312State *s, int i) +static inline uint16_t get_uart_iobase(PC87312State *s, int i) { int idx; idx =3D (s->regs[REG_FAR] >> (2 * i + 2)) & 0x3; @@ -130,7 +130,7 @@ static inline bool is_fdc_enabled(PC87312State *s) return s->regs[REG_FER] & FER_FDC_EN; } =20 -static inline uint32_t get_fdc_iobase(PC87312State *s) +static inline uint16_t get_fdc_iobase(PC87312State *s) { return (s->regs[REG_FER] & FER_FDC_ADDR) ? 0x370 : 0x3f0; } @@ -143,7 +143,7 @@ static inline bool is_ide_enabled(PC87312State *s) return s->regs[REG_FER] & FER_IDE_EN; } =20 -static inline uint32_t get_ide_iobase(PC87312State *s) +static inline uint16_t get_ide_iobase(PC87312State *s) { return (s->regs[REG_FER] & FER_IDE_ADDR) ? 0x170 : 0x1f0; } @@ -373,7 +373,7 @@ static const VMStateDescription vmstate_pc87312 =3D { }; =20 static Property pc87312_properties[] =3D { - DEFINE_PROP_UINT32("iobase", PC87312State, iobase, 0x398), + DEFINE_PROP_UINT16("iobase", PC87312State, iobase, 0x398), DEFINE_PROP_UINT8("config", PC87312State, config, 1), DEFINE_PROP_END_OF_LIST() }; diff --git a/include/hw/isa/pc87312.h b/include/hw/isa/pc87312.h index 710eb1c807..b65b219a8a 100644 --- a/include/hw/isa/pc87312.h +++ b/include/hw/isa/pc87312.h @@ -34,7 +34,7 @@ typedef struct PC87312State { ISADevice dev; =20 - uint32_t iobase; + uint16_t iobase; uint8_t config; /* initial configuration */ =20 struct { --=20 2.14.3