Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1i4Fzy-0007rV-Ix for mharc-qemu-riscv@gnu.org; Sat, 31 Aug 2019 22:53:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47827) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4Fzo-0007hM-9e for qemu-riscv@nongnu.org; Sat, 31 Aug 2019 22:53:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4Fzm-0006bt-8t for qemu-riscv@nongnu.org; Sat, 31 Aug 2019 22:53:40 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:46886) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4Fzf-0006Qe-Uu; Sat, 31 Aug 2019 22:53:32 -0400 Received: by mail-pf1-x441.google.com with SMTP id q139so6906534pfc.13; Sat, 31 Aug 2019 19:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=9AaPW9KHgO45I20BSwtPdHnCnwAaSJjqcEM+IRY/Uk0=; b=QaOFOdGr8RFK6HCW5TnuKW1F0aLBXF0vCyet7KCJWocUr2NDtcyPLhK3DLZdVRAVro QINYWeWmmUg1M+6+nNIBApxyLKqXYfcwZL9fyUxtntkuHSiJ1iIEK09cdD/Qy0HOtv7W tMqBox3KrJhlm/6EABD6wzLwtUqTHRFjZ3svyMVuI9jDGlN7WaoyU4A34n9gN46AyECH 15IqXToXgxjDslqjRiWaSa6H5D5KkK0SHdmRDYEtTuMYUcEK2N0S99ipViw15DNXNtXE 1FFOO6LIAMkH+jeas56c1BLaP/aBcCHY1Q/cPpU4aJBbb9/d5pQOpV4tR+O0eJfHcUWq TXPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=9AaPW9KHgO45I20BSwtPdHnCnwAaSJjqcEM+IRY/Uk0=; b=BAaS9pDH3FVHxgdgBBpEMm8G88dCPVsbpy/cZrP3Xzi76v1sLV+5okDrsp6XxN6+vV a53Px49jOtRdXgPGHFveaMul0KB6BJOejKg9cobvyWcj/EALO14T1cIbnFIxcavYzyuw Dn4An5WFm1cPFi4J2HV/Rie3Iyrv6NbeihvHJt6GmdXp44X94AWRChyC3KJDNUFPyTSa I3Wjb1cLu1GGuoUR/knDd/FUQAxkRIIFSsNZ3VTgbL3UvA1KBq4fWyccCfJw8iy0jc6b eCq/aW3Lzk2Yk9LKCPAmU17pVaCVNKeiXY4P+A3flcK9v60bSIIEdTm/uKkAc1mxacsc Xa5Q== X-Gm-Message-State: APjAAAXsUxmiO6FwMf6i7XIG8p/YKF0FWTU4CpbF6NS0ZJ69pBXkv8FM KAE1VhQkL/iuXOPZuF4g/cjm2Y91 X-Google-Smtp-Source: APXvYqycrdFg6Xl4SK+HnhgDvb8xJAgCcYPPm6/iLx/9eHMLgE1ZNVhYVI1sJdANmTjDz6eCylzBCA== X-Received: by 2002:a63:2f44:: with SMTP id v65mr1899708pgv.380.1567306410696; Sat, 31 Aug 2019 19:53:30 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id p10sm11453307pff.132.2019.08.31.19.53.29 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 31 Aug 2019 19:53:30 -0700 (PDT) From: Bin Meng To: Alistair Francis , Palmer Dabbelt , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Date: Sat, 31 Aug 2019 19:52:52 -0700 Message-Id: <1567306391-2682-12-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1567306391-2682-1-git-send-email-bmeng.cn@gmail.com> References: <1567306391-2682-1-git-send-email-bmeng.cn@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::441 Subject: [Qemu-riscv] [PATCH v7 11/30] riscv: sifive_e: prci: Update the PRCI register block size X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2019 02:53:43 -0000 Currently the PRCI register block size is set to 0x8000, but in fact 0x1000 is enough, which is also what the manual says. Signed-off-by: Bin Meng Reviewed-by: Chih-Min Chao Reviewed-by: Alistair Francis --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None hw/riscv/sifive_e_prci.c | 2 +- include/hw/riscv/sifive_e_prci.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/riscv/sifive_e_prci.c b/hw/riscv/sifive_e_prci.c index 71de089..ad6c624 100644 --- a/hw/riscv/sifive_e_prci.c +++ b/hw/riscv/sifive_e_prci.c @@ -86,7 +86,7 @@ static void sifive_e_prci_init(Object *obj) SiFiveEPRCIState *s = SIFIVE_E_PRCI(obj); memory_region_init_io(&s->mmio, obj, &sifive_e_prci_ops, s, - TYPE_SIFIVE_E_PRCI, 0x8000); + TYPE_SIFIVE_E_PRCI, SIFIVE_E_PRCI_REG_SIZE); sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio); s->hfrosccfg = (SIFIVE_E_PRCI_HFROSCCFG_RDY | SIFIVE_E_PRCI_HFROSCCFG_EN); diff --git a/include/hw/riscv/sifive_e_prci.h b/include/hw/riscv/sifive_e_prci.h index c4b76aa..698b0b4 100644 --- a/include/hw/riscv/sifive_e_prci.h +++ b/include/hw/riscv/sifive_e_prci.h @@ -47,6 +47,8 @@ enum { SIFIVE_E_PRCI_PLLOUTDIV_DIV1 = (1 << 8) }; +#define SIFIVE_E_PRCI_REG_SIZE 0x1000 + #define TYPE_SIFIVE_E_PRCI "riscv.sifive.e.prci" #define SIFIVE_E_PRCI(obj) \ -- 2.7.4