Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1389308ybf; Sun, 1 Mar 2020 08:11:14 -0800 (PST) X-Google-Smtp-Source: APXvYqxXL6GkYxy12cAtOxnDXRNzPgscRgMxRWIjMoYwHxPaZrtPiBJfZY5u6l0grtqbxaS7R9z2 X-Received: by 2002:aca:ac86:: with SMTP id v128mr8982375oie.178.1583079073941; Sun, 01 Mar 2020 08:11:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583079073; cv=none; d=google.com; s=arc-20160816; b=TJBDaZ8cGZ0B9mVZ2h4XET+XBXaOeSpFUXNZovLE6UWcdjUJ5YFLUA5rLZC8k+NQMc 52Dd5c/HhioVjKNdagog8STJjUzIpXJx1QBafdPrBsudfAcjwvrQ6PqktBWG1xHwlMHU nKqK3EY1BIh/iFuywY1ZwSEJJMKoETr9mF7SCh1uPChJ/vCfPR1i/rDtwzkGg3Z4dXT9 FvGcikERh4RFyOr1Y7X8p3YgiV8hbEszAyF0FhiowiXqFyL/oxFZ4HqFovGd/zhYzWvT nUbVqhpSSWjlkRpuJhsnJaN2aj2S+Fw1DWRZVUQjuuIMKcD6OamUzopM34PvsY4SDx8C fSbg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject:dkim-signature; bh=bMLGGlLxbtGLfHweAPeUm/il22po9rJeFTwsg4VAzRg=; b=elvdYp4UteSWp1o0YeXEkJGmqTsevUg9/ALf3A1dMUSxfTVDe9+uiZl2703+bzbLFB VSF6B6tO3PdzmOWZaXqyPpfX+JMm/UYmDbFzjKSfW0moOz2jT8mBkw73XqFMi0zJDLym kUTDYyr6RSJ2mDmhsJKXzW9O2DP69hK7wTFkzMgQ7R+JMwIpz84RHKiWEc4jpuqdZ+bS O7VpakIf2ir6wW2O/NIOjafoPAaPN/qC0xdiTWPxIbfUyiuMsRhk+g0/xIKpnMfYmblI xpskzMt6uASGat1hzfIqVsB4A1tpfPM1gv3LJeivUOlctDTTgDIMZDql9I4CJJcwOcMK Bzeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="s/LjHIap"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q195si5018854oic.83.2020.03.01.08.10.59; Sun, 01 Mar 2020 08:11:13 -0800 (PST) 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=fail header.i=@gmail.com header.s=20161025 header.b="s/LjHIap"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726673AbgCAQKt (ORCPT + 99 others); Sun, 1 Mar 2020 11:10:49 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43630 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbgCAQKs (ORCPT ); Sun, 1 Mar 2020 11:10:48 -0500 Received: by mail-pl1-f194.google.com with SMTP id p11so3181416plq.10; Sun, 01 Mar 2020 08:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bMLGGlLxbtGLfHweAPeUm/il22po9rJeFTwsg4VAzRg=; b=s/LjHIapw57aPnFnAe+O8GoGOw3PvJqyTnCUAWDr6n4eiB8u5/tO1zMOHiGVyXjRZi SpKaftcG8IjIFLs7Q3wOuQhPWHKsfbZRkmBkGhcd/U9C/QLABXJrUpUMstctOwqUqdvH DB4UN1FLU2iTpKnKlqDvaHZ48r1Kyo/P3jvHz/gPkCaK/a1U288h6X0qdKw/XrBgDOk4 KUDtuBdpSr24ZuDdSWcN3ur1OxCs7PD6X2MLcpe21MCLCNv606osi6O698uqOmTX8p2b ZG18TypSvljNczSofsmyDaVy1EYI4Lv7HetoUvzVEwzb9K6vK5CNZBUf+g0SiXgWsqBx Y+jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=bMLGGlLxbtGLfHweAPeUm/il22po9rJeFTwsg4VAzRg=; b=Wj8TQTV6kLmzzf4i+BzWZPha4WMYSuVOdZr2jA70cHLoigffrPnhMJWTinXc10fDNL 0XRzIV1C20M3stld4cR7TmZtF2WF5LBL+8Tx7QKgO7eJzfTsd8uCOAvroMkqb3PvgIJM Qvl7RHacXyA7ElIn0k4KKjqfE5q/XvClBC0NyABEdbbKaYelb7+ueik9BRerQR38Eepk 5IwjDWuuAKldZsnS/uLzlzuSttXvE1j98UtHNbn4xIlThIXKKkMRM/HD3RpRLnaFsWBt 2zuxMyM9GkwBiwxp9gDEKzCcinWjUS0LbTGn/xlv7/P+mHiG85lyIpFb2CaJpM++FYkF kCdg== X-Gm-Message-State: APjAAAWd8wBB2Dv0qq9XNBdFNa1UMVfaDbigL9k3/aa9adC3r/RykUug q8kuxMHJDkqzZUVs9Q7F2gxyExft X-Received: by 2002:a17:90a:cb11:: with SMTP id z17mr16234153pjt.122.1583079047338; Sun, 01 Mar 2020 08:10:47 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id h132sm13752512pfe.118.2020.03.01.08.10.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Mar 2020 08:10:46 -0800 (PST) Subject: Re: [PATCH v1 4/4] watchdog: npcm: sets card ext1 and ext2 bootstatus during probe To: Tomer Maimon Cc: Wim Van Sebroeck , Rob Herring , Mark Rutland , Joel Stanley , Avi Fishman , Tali Perry , Nancy Yuen , Benjamin Fair , linux-watchdog@vger.kernel.org, devicetree , Linux Kernel Mailing List , OpenBMC Maillist References: <20200301094040.123189-1-tmaimon77@gmail.com> <20200301094040.123189-5-tmaimon77@gmail.com> <026fa94c-8fde-acda-e218-ffff9b5891c9@roeck-us.net> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W8Vk BIsJMaWOhks//7d92Uf3EArDlDShwR2+D+AMon8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qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= Message-ID: <998cedf4-82cb-be1b-699f-608ea7a21064@roeck-us.net> Date: Sun, 1 Mar 2020 08:10:44 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/1/20 8:08 AM, Tomer Maimon wrote: > Sorry Guenter probebly I didnt explain it well. > > > On Sun, 1 Mar 2020 at 12:48, Guenter Roeck > wrote: > > On 3/1/20 1:40 AM, Tomer Maimon wrote: > > During probe NPCM watchdog sets the following bootstatus flags: > >       - WDIOF_CARDRESET represent power and core reset. > >       - WDIOF_EXTERN1 represent watchdog 0-2 reset. > >       - WDIOF_EXTERN2 represent software 1-4 reset. > > > > Each flag is representing a group of bootstatus. > > The user can configure through the device treethe exact reset > > to each flag group. > > > > Sorry, this doesn't make sense to me. I could understand reporting > the above, but it looks to me like devicetree is used to associate > a reset bit from the controller with one of the above. > Devicetree only seems to be used to associate reset status bits > from the controller with WDIOF_CARDRESET, WDIOF_EXTERN1, or > WDIOF_EXTERN2. That adds a lot of complexity for little if any > gain.  > >   > > It would make sense to set the bootstatus bits as suggested above, > but that doesn't require devicetree properties. > > More comments inline. > > Guenter  > >   > > In the NPCM750 we have the following reset types: > > 1. board reset (Power on reset, Core reset) > 2. WD reset (0-2 WD reset). > 3. SW reset (1-4 SW reset). > > > Each board can use different reset types, because in the WD status bit there is not enough bits to represent the entire NPCM750 resets. > > The NPCM750 reset groups are represent as follow: > >  - WDIOF_CARDRESET represent power and core reset. >  - WDIOF_EXTERN1 represent watchdog 0-2 reset. >  - WDIOF_EXTERN2 represent software 1-4 reset. > Exactly, and I don't see a need to be more specific than that. This can be implemented without all the DT complexity. Guenter