Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2626345ybv; Fri, 21 Feb 2020 20:01:57 -0800 (PST) X-Google-Smtp-Source: APXvYqzLxckf76InJJIe7r6LuoNcaUSqsI02jfE9q46UVW1BtGbVFNg4Rxf+Sy5NZhFXRGqUyDuS X-Received: by 2002:aca:ec13:: with SMTP id k19mr4689043oih.22.1582344117001; Fri, 21 Feb 2020 20:01:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582344116; cv=none; d=google.com; s=arc-20160816; b=qDHpOf87N05U0JfBfVAvpES7FYKiXICPZMUO2DbnR4ig53q5eqEv6EvAxgPgqCftVo 22JIVxIcvWbA0GV4In4fi/EZ6CPTz8NBFyB48BivF8vcx+4hAPE7q4TRtd/a5uzQYRJ9 LyhrruZ7CnY2t2DjuRivwKej0yOPUpuimxxiqUdzrdptOO2f2yEpQYWw59QVN3tkKgS7 MStLY6JVXEuHK7p2V3p+8oQwgy7Wl113eGX3eSEfxwOSllVFuudPs8CxekM2u9dtoiGX 3kwsY6R8W4PFsATmoq/vgQqi465JYg4zmJoNsisPEKkeVFdKUxdKp9YY+3qIttItpV21 TEmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=kz9wqXxzFR4rl7s+9L39Emy1weqj5Lhmm2BFMtnxgWo=; b=lO3v+1pyTOYGcJa1slL/fbk/LFQ2hutLkY/vPwodbmuGBTQpBbdsGabECxY/oKNzM6 A/5QtRNXbW5ICnwmg8Isvcvxu8Y3N3NOcmRJdohGd1qIEC7evMj4mrfYJcd9Qqg06Dnf zenSVY0d8a6GeOHtTZ2jRVSjvewBCs4STEiG1KA+kvF0wHQRmatQxlzJ+FP+R3c54wt6 uDb4xOuyCMYYvKO2E+uJDVDNJKkldabfokPCbWy3gXkWc+PfKIZpvS57kLfNFK79kcHU PiAyzAZxv5SA1Xwb14lo8fTC/AWQJ042qy0Co5WXqS7VlBJyTXl7PgsIdEk7+PCcvAvU 56PQ== ARC-Authentication-Results: i=1; mx.google.com; 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 r4si2462857otq.188.2020.02.21.20.01.07; Fri, 21 Feb 2020 20:01:56 -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; 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 S1727025AbgBVEBD (ORCPT + 99 others); Fri, 21 Feb 2020 23:01:03 -0500 Received: from mail-sz.amlogic.com ([211.162.65.117]:57549 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726032AbgBVEBD (ORCPT ); Fri, 21 Feb 2020 23:01:03 -0500 Received: from [10.28.90.152] (10.28.90.152) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server id 15.1.1591.10; Sat, 22 Feb 2020 12:01:26 +0800 Subject: Re: [PATCH 1/2] dt-bindings: watchdog: Add arm,smc-wdt watchdog arm,smc-wdt compatible To: Julius Werner CC: Evan Benn , Guenter Roeck , Rob Herring , LKML , , "David S. Miller" , Jonathan Cameron , Mauro Carvalho Chehab , Wim Van Sebroeck , Greg Kroah-Hartman , Mark Rutland , , Jianxin Pan , Yonghui Yu , Xingyu Chen References: <20200214062637.216209-1-evanbenn@chromium.org> <20200214172512.1.I02ebc5b8743b1a71e0e15f68ea77e506d4e6f840@changeid> <20200219223046.GA16537@bogus> <20200219232005.GA9737@roeck-us.net> From: Xingyu Chen Message-ID: <1326f594-3cfd-c03d-4f2c-50eeb75724b2@amlogic.com> Date: Sat, 22 Feb 2020 12:01:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Originating-IP: [10.28.90.152] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Julius On 2020/2/22 3:41, Julius Werner wrote: >> Because the ATF does not define standard wdt index, each vendor defines >> its own index. >> So I don't think that the current driver[0] can fully cover my usecases. > I think the best way to solve this would be to put the SMC function ID > as another field into the device tree, so that multiple vendors could > share the same driver even if their firmware interface uses a > different SMC. But they still have to implement the same API for that > SMC, of course, not sure if the Meson driver is suitable for that (but > if it is then I think merging those drivers would be a good idea). The SMC function ID may be solved by the DTS, but the wdt indexs(Eg: SMCWD_INFO) are also different for each vendor. The imx_sc_wdt.c is also use the SMC to operate the WDT, but the wdt indexs(Eg: IMX_SIP_TIMER_START_WDOG) are different from ours. IMO, If the ATF can implement a common hal interface and index for watchdog, then writing a common smc wdt driver will be easier to compatible with all vendors. Best Regards > > .