Received: by 2002:a05:6214:13e2:0:0:0:0 with SMTP id ch2csp1959414qvb; Thu, 21 Oct 2021 00:26:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKf2+jo+djyBw4GM3LyYNarToF2eFShrusQQ/JZQ1eM1cB3YR3PNwRa3popP55VnjQNtDH X-Received: by 2002:a5b:802:: with SMTP id x2mr4388599ybp.164.1634801176527; Thu, 21 Oct 2021 00:26:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634801176; cv=none; d=google.com; s=arc-20160816; b=e/bjQge5qegXm9MA2zP/z8FBDXdLtxls47AipjBIWer/lz0UEZl+zEK/zyJspQiFvh KLgaI4UI2/qX3vQUNAPPQgXjkdVMwtByNY5QYyfaCfDGrFIxGT6GKQA9Up4C4hyVmMkb GyPiXh9LPK3jNzFD8Ucpqs3ZLUVxPL18+Hv0HrAuRGG/vWu/Uwey0Ma3Z6G2P875/4ba /uuZE9XJf0407k1FPsKV3QCYupS7eIYd8O8xu2hdOz252cSD3qCAwIPHvHV2tHUnSlGu pa/xdide6uCwXa7QnRjBBUB9LoTRqlHH6Rtb8Q8GNWRgCs/uIIhPBa03megr1+GgKrVD i9xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=pD002zJYWYqGlmtmb/t7NDLdy5h3nUcoNRUVEMoNxss=; b=IbMpMe86YPFFYow92JnVwuXSUxBPEOmWEXAdyz5MvR2KLtDkPu/Q72DBX1wzAD7Rjw ZyrcG2FNLRDFa42+pAgWJTHRY8uPJqRD/otO/6QgyottJS7xW5Z4U1drDP75yNDskNF+ htzlIuGONS/ritljS5ClL9jl8Yxk8fpZB6z3AlmiPe8ovAhfwi8sJh/O53iot+s0nU1c HtsbPXEbz19zJfd7wBDdrtuOXSk9A3v7DFcc6cD8VLvUkSkMwgzymDTqbinVy8SJTj6J DSGZIT7Rv6Q98BfASmF91NoFf/WU1u1ODX03ZbfbNjSp5fa2fuK4ssoy9Furqez0AXld mM4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=FWvPB0CW; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 17si4723907ybx.433.2021.10.21.00.26.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Oct 2021 00:26:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=FWvPB0CW; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from localhost ([::1]:54892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdSSt-0007Qe-Un for alex.bennee@linaro.org; Thu, 21 Oct 2021 03:26:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdSSE-0007MG-RS; Thu, 21 Oct 2021 03:25:34 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:36832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdSSA-0003L7-Rt; Thu, 21 Oct 2021 03:25:34 -0400 Received: by mail-lf1-x12c.google.com with SMTP id g36so849564lfv.3; Thu, 21 Oct 2021 00:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=pD002zJYWYqGlmtmb/t7NDLdy5h3nUcoNRUVEMoNxss=; b=FWvPB0CWtQWOrZsi1JlZAGySTzSWa+GmYsmU7nAk//OPa09PEA/pz/UGgeZh3rIeIP N9+dhXPLb/4jqyK8szdUXaUsNOQAGEBwOsi24/U9Hxj0azeZYbt9/pSZ+KQ+dFb3y4rC 5Ffn8tepXxlrLJxENVMflBp3RoRKwBBb6SHjpfyU3Ffizes7mX5KXTLetOtEIjhGUqc6 iOCj5Ye3PMiht06V3w4z9U8hh1c6ZRrcy6rFKkls41nKotc2+1vFUNAi1z0XY//2dS2y Ll30RE9nADuZTu77fWTcalkoABjaWxbh0RKwYOLn1l3fwj8YMZcIdHGwwYwiUKHKKEeF CUjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=pD002zJYWYqGlmtmb/t7NDLdy5h3nUcoNRUVEMoNxss=; b=nExMFn+cElTKYFR68KBtACtS67cHYnXyW7/M3V/Xhrqy/Wu2G3/WPdn6QZ9QhmXKLd Fefy7QmJRqrlXoj15rrizFJIh3kI7sO2m2G9QhvEgsOQ4hUOznw+ozpmUDqpW1u64DCU iebCyivy4H3mViXdBIXh2KNBPwnxpvfth6T0dMMcJyML7Yg/G6BNBv2yQm4ti00MFLbd tv1ttoH9tUJsmgGKqZeyi5sf5AZ82XexvETwJeFl2bAlH/M8f0a7/lZWr7Fk1UWKCHW+ Lm8UkbJC8qy1XULD5K6J8IEnqG315BH20IeiSSJhmunefvERhmWC1Zzv7en2cImxn639 A9LA== X-Gm-Message-State: AOAM53334wv7wfqzOmOJofMnSTMvWnThoy4y06VzXbHqMR4v6hZb01aX sJMCk3obaTa+slzkLhq4r8Y= X-Received: by 2002:a05:6512:2341:: with SMTP id p1mr3900062lfu.204.1634801128484; Thu, 21 Oct 2021 00:25:28 -0700 (PDT) Received: from fralle-msi (31-208-27-151.cust.bredband2.com. [31.208.27.151]) by smtp.gmail.com with ESMTPSA id x20sm385258lfu.196.2021.10.21.00.25.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 00:25:28 -0700 (PDT) Date: Thu, 21 Oct 2021 09:25:26 +0200 From: Francisco Iglesias To: =?iso-8859-1?Q?C=E9dric?= Le Goater Subject: Re: [PATCH v2 1/5] aspeed/wdt: Introduce a container for the MMIO region Message-ID: <20211021072525.GG23846@fralle-msi> References: <20211018132609.160008-1-clg@kaod.org> <20211018132609.160008-2-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211018132609.160008-2-clg@kaod.org> User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=frasse.iglesias@gmail.com; helo=mail-lf1-x12c.google.com X-Spam_score_int: -1001 X-Spam_score: -100.2 X-Spam_bar: --------------------------------------------------- X-Spam_report: (-100.2 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_WELCOMELIST=-0.01, USER_IN_WHITELIST=-100 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Andrew Jeffery , qemu-devel@nongnu.org, qemu-arm@nongnu.org, Joel Stanley , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: kVtKAOmODatJ On [2021 Oct 18] Mon 15:26:05, Cédric Le Goater wrote: > On the AST2600, the 2nd watchdog timer can be controlled through the > FMC controller to disable the alternate boot function. Next changes > will map the WDT2 registers in the AST2600 FMC memory region. Add a > container on top of the register region for this purpose. > > Signed-off-by: Cédric Le Goater Reviewed-by: Francisco Iglesias > --- > include/hw/watchdog/wdt_aspeed.h | 1 + > hw/watchdog/wdt_aspeed.c | 6 +++++- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/include/hw/watchdog/wdt_aspeed.h b/include/hw/watchdog/wdt_aspeed.h > index f945cd6c5833..14e91acb1284 100644 > --- a/include/hw/watchdog/wdt_aspeed.h > +++ b/include/hw/watchdog/wdt_aspeed.h > @@ -28,6 +28,7 @@ struct AspeedWDTState { > QEMUTimer *timer; > > /*< public >*/ > + MemoryRegion iomem_container; > MemoryRegion iomem; > uint32_t regs[ASPEED_WDT_REGS_MAX]; > > diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c > index 146ffcd71301..803e861a9c61 100644 > --- a/hw/watchdog/wdt_aspeed.c > +++ b/hw/watchdog/wdt_aspeed.c > @@ -275,9 +275,13 @@ static void aspeed_wdt_realize(DeviceState *dev, Error **errp) > */ > s->pclk_freq = PCLK_HZ; > > + memory_region_init(&s->iomem_container, OBJECT(s), > + TYPE_ASPEED_WDT ".container", ASPEED_WDT_REGS_MAX * 4); > + sysbus_init_mmio(sbd, &s->iomem_container); > + > memory_region_init_io(&s->iomem, OBJECT(s), &aspeed_wdt_ops, s, > TYPE_ASPEED_WDT, ASPEED_WDT_REGS_MAX * 4); > - sysbus_init_mmio(sbd, &s->iomem); > + memory_region_add_subregion(&s->iomem_container, 0x0, &s->iomem); > } > > static Property aspeed_wdt_properties[] = { > -- > 2.31.1 > >