Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1289682ybl; Thu, 22 Aug 2019 12:10:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGENxzFuJK3pqJQR6EHns5nyQlKLu4WDIeUSVEmb84tNgBh7echAUXh/w+hNFMTboXJFmm X-Received: by 2002:a62:1703:: with SMTP id 3mr801897pfx.118.1566501009209; Thu, 22 Aug 2019 12:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566501009; cv=none; d=google.com; s=arc-20160816; b=UvQzT3OrImid0srlx9qecYPzysRbNA5Ffvq7wA7VxNDaxz3cWD2wISLXGPNCFlFp2F Cuw9oKIK2V3D0VXGIZAKaobJeNEFlb4HkMpDqJhvoReurUHk6LrJtYN01O25gzFLdmnn OGFk7qNdbmUDga2lvx9bzt6avqzDgwKZlpCVyiYKt0NjyHkbyeYcmE1kHI78QR//HMcA nVrvQ/X2kyGNsQCfs8h1gzQE8cSr9vp6MzPOiQHvI9EVBhnVYId/UBz0l3Gmi1VpzTNc R07dyWa7tn3URpflNORtUFYZ5zBhqHNbJ/66nILREPLTqer38ESbWFpZW2QX0IXmIlwF g9lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=OKFVc4y45lydUuw+Nf7Pm8/ZmV3D6/ESHXCjYieMNOw=; b=LPT7f9cMnOEVRArFxTa82GbYOre/5iu+mTM2q4YTgXD/zXAsDtOGSlH5c9w7LH07pZ rg8B+zMvgmSlhJgKrjcvZamiKve6yCv71Lre16LCzweWD4/2pkjJaRy8oikVMYJZWST6 36lBOtOHLpmytO2jassiUFoOjUWrDVZpO1PZgZIKipNOkI3IusI4qNxL8jAyBu6iO7f9 COkcrnTCOcVJZyeZnnwzeirmBCHrKF6i2wZCaKmQKmDs88Hm2PXhX5KjC5J0WZ6j6NNm iGmYPgMbYdhTzDC+onqcpQQ1LFbOOOXHhmzxuVUoEv3yZ3nphbNGTFU8zOk/fPsk00Hj 0cPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yadro.com header.s=mta-01 header.b=WrFYMZ73; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yadro.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h69si126298pge.543.2019.08.22.12.09.54; Thu, 22 Aug 2019 12:10:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@yadro.com header.s=mta-01 header.b=WrFYMZ73; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yadro.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387971AbfHVOYc (ORCPT + 99 others); Thu, 22 Aug 2019 10:24:32 -0400 Received: from mta-02.yadro.com ([89.207.88.252]:60606 "EHLO mta-01.yadro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387945AbfHVOYb (ORCPT ); Thu, 22 Aug 2019 10:24:31 -0400 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 13D5142ED0; Thu, 22 Aug 2019 14:24:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-transfer-encoding:mime-version:user-agent:content-type :content-type:organization:references:in-reply-to:date:date:from :from:subject:subject:message-id:received:received:received; s= mta-01; t=1566483869; x=1568298270; bh=1bYRqwEu9883JdGs0AKW2xnM1 tOirxhg2R2RAn574Yw=; b=WrFYMZ73tDcLaxuzNV0YP82ZaIl/Pp8Edk3uPxpMK 2ELuiFrr+5kF4vHxMbil5kIVphU9p12SI+Orutc0p05tPpvMSIcSo8OVVvFg3lWf ZkErBrZrmQRBminqZyhRsaMlBhrLgDK7zshIKKLd3fkL+v6WWQftTyWtM8wWmBq6 ls= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pu7N4TeU8Is4; Thu, 22 Aug 2019 17:24:29 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (t-exch-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 876BC412D3; Thu, 22 Aug 2019 17:24:28 +0300 (MSK) Received: from localhost.localdomain (172.17.15.69) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Thu, 22 Aug 2019 17:24:28 +0300 Message-ID: <550d98a41f8c36effb8147201d6c5fdc762994ea.camel@yadro.com> Subject: Re: [PATCH 3/3] watchdog/aspeed: add support for dual boot From: Ivan Mikhaylov To: Guenter Roeck CC: Wim Van Sebroeck , Joel Stanley , Andrew Jeffery , , , , , "Alexander Amelkin" Date: Thu, 22 Aug 2019 17:24:27 +0300 In-Reply-To: <20190822135528.GB8144@roeck-us.net> References: <1f2cd155057e5ab0cdb20a9a11614bbb09bb49ad.camel@yadro.com> <20190821163220.GA11547@roeck-us.net> <20190822135528.GB8144@roeck-us.net> Organization: YADRO Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.15.69] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-02.corp.yadro.com (172.17.10.102) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-08-22 at 06:55 -0700, Guenter Roeck wrote: > On Thu, Aug 22, 2019 at 12:15:20PM +0300, Ivan Mikhaylov wrote: > > On Wed, 2019-08-21 at 09:32 -0700, Guenter Roeck wrote: > > > > + writel(WDT_CLEAR_TIMEOUT_AND_BOOT_CODE_SELECTION, > > > > + wdt->base + WDT_CLEAR_TIMEOUT_STATUS); > > > > + wdt->wdd.bootstatus |= WDIOF_EXTERN1; > > > > > > The variable reflects the _boot status_. It should not change after > > > booting. > > > > Okay, then perhaps may we set 'status' handler for watchdog device and > > check > > 'status' file? Right now 'bootstatus' and 'status' are same because there is > > no > > handler for 'status'. > > > > You would still have to redefine one of the status bits to mean something > driver specific. You would also still have two different flags to read > and control cs0 - to read the status, you would read an ioctl (or the > status sysfs attribute), to write it you would write into access_cs0. > > I guess I must be missing something. What is the problem with using > access_cs0 for both ? > > Guenter > There is no problem, I'll do that way, thanks!