Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp506488imp; Wed, 20 Feb 2019 04:12:39 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib1pXwcGOHyhF+W7XCJDtGRQD7UxUG+ZmQ/Ki9AlzGkdT69MxeBHKltoyY3x6/clAA955jd X-Received: by 2002:a63:3703:: with SMTP id e3mr28573278pga.348.1550664759386; Wed, 20 Feb 2019 04:12:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550664759; cv=none; d=google.com; s=arc-20160816; b=c6LxVgds9UzsLT0HaAPDtslBx0+IbXiGcKhCnJuGf5hl/iZIdt+h8dwRnUSmofEEqs y9nRKIn5ol4ECq1Gyg6iw0WnkCa9u7a0IrFmny12kjpZp1Wdi9G1WtyBB/IYBeBIwmt1 +o506C38edse77h+H42ThcmR9+NdPon8ncJWb15byUFmDFW+KlRob4Nt2j1lC6IW2ejj D1ZUZVgZz9aM13Yrd+G2/Vd2TOEacVROHtCei5AmMacYVfj9M9m6HRasT+ZU/l1EThty h0xTs3suiJ5pT2Nr1oTtWMPShQRPJK/5qsORhF+El33H3h/xRO8200fReVgk/OGVHdkS VoAA== 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:references:in-reply-to:date:cc:to:from:subject :message-id; bh=GaiVOorlbRaC+nEd9L/BTgn5Ixl1G4/JHPLms5iOecE=; b=VUOWht0xdV2MQjtx+yQJxJqIZC7P6vCHsvwRgwOdHDwY5vbxhsQZajmUyGP4J8epRX qeKOMfTTaiOrD0X2sZ/5zSaPTagGdECFnRE8SxeJh7zA5f5MrjUajquleO6qelJmGl90 plRCCGPdg34OOE8Lo89fPkQ+fJyFYRXiJ1CVrdzkj0NusVnrKllVKdDzeih7kXxRtV7X qxroS+3A455jj+kcGLftyekDartsiTrRNI/W8iTF5pSBtMZAhwYytEvATebZbp7/n6Rr xaHN5L+GiTbJyODkxiHVWDNlHElUBWp0H2bWz/WBjMPN5Uu6dVZ0CXBvgZrH3roAQTTf ddPw== 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 k1si9146789pls.208.2019.02.20.04.12.23; Wed, 20 Feb 2019 04:12:39 -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 S1727064AbfBTML0 (ORCPT + 99 others); Wed, 20 Feb 2019 07:11:26 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:44993 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725812AbfBTMLZ (ORCPT ); Wed, 20 Feb 2019 07:11:25 -0500 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=localhost) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gwQiZ-0006zf-GY; Wed, 20 Feb 2019 13:11:15 +0100 Message-ID: Subject: Re: [PATCH] dt-bindings: imx: update scu resource id headfile From: Lucas Stach To: Aisheng Dong , Marco Felsch Cc: Anson Huang , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "ulf.hansson@linaro.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx Date: Wed, 20 Feb 2019 13:11:13 +0100 In-Reply-To: References: <1550566601-11497-1-git-send-email-Anson.Huang@nxp.com> <20190219125211.2pg2bqxner4klcb5@pengutronix.de> <20190219144808.qqpaubjcsb4huoml@pengutronix.de> <20190220081650.cu3yzausx55jefb6@pengutronix.de> <20190220105249.u2hcvk6ut3cycvqs@pengutronix.de> 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-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, den 20.02.2019, 11:21 +0000 schrieb Aisheng Dong: > Hi Marco, > > > From: Marco Felsch [mailto:m.felsch@pengutronix.de] > > Sent: Wednesday, February 20, 2019 6:53 PM > > > > Hi Aisheng, > > > > On 19-02-20 09:49, Aisheng Dong wrote: > > > > From: Marco Felsch [mailto:m.felsch@pengutronix.de] > > > > Sent: Wednesday, February 20, 2019 4:17 PM On 19-02-20 03:38, > > > > Aisheng Dong wrote: > > > > > [...] > > > > > > > > > > > > I don't like droping some ID's (e.g. IMX_SC_R_DC_0_CAPTURE0) > > > > > > > by mark them as unused or even worse give them a other > > > > > > > meaning. IMHO the scu-api should be stable since day 1 and the > > > > > > > ID's should only be > > > > extended. > > > > > > > Marking ID's as deprecated is much better than moving them around. > > > > > > > > > > > > I agree the SCU APIs should be stable since day 1 and the ID > > > > > > should ONLY be extended, but that is the best cases, the reality > > > > > > is, there are different SoCs/Revision, some revisions may remove > > > > > > the resources ID defined in pre-coded SCU firmware, like the > > > > > > IMX_SC_R_DC_0_CAPTURE0 etc., so SCU APIs removes them after real > > > > > > silicon arrived, now latest SCU firmware marks them as UNUSED, > > > > > > they could be replaced by some other new resources in later new > > > > > > SoC, I am NOT sure, but if it happens, this resource ID table > > > > > > should be updated anyway, leaving the out-of-date resource ID > > > > > > table there will have > > > > issues, since it is NOT sync with SCU firmware. > > > > > > So how to resolve such issue? We hope the SCU firmware should be > > > > > > stable since day 1, but the truth is NOT, could be still some > > > > > > updates but NOT very often. And I believe the updates will NOT > > > > > > break old > > > > kernel version. > > > > > > > > Hi Anson, > > > > > > > > Please don't mix the dt-bindings and the kernel related stuff. > > > > Unfortunately the bindings are within the kernel repo which in fact > > > > is great for us kernel developer but the bindings are also used in > > > > other projects such as barebox or other kernels (don't know the BSD > > > > guys). So you can't ensure that your change will break something. Please > > keep that in mind. > > > > IMHO solving that issue should be done by the scu firmware. I tought > > > > the scu is a cortex-m4 with a bunch of embedded flash and ram (I > > > > don't know that much about the scu since it is closed/black-boxed). > > > > Why do you don't use a translation table within the scu? As I said > > > > earlier I don't like the redefinition of ID's since they are now part of the > > dt-bindings. > > > > The bindings can store up to 32bit values which is a large number ;) > > > > IMHO wasting some ID's in favour of stability is a better solution. > > > > > > > > > > As far as I know, those remove resource IDs are pre-defined and has > > > never been used and won't be used anymore by SC firmware. (Anson can > > > double check it) So I think it's safe to remove them or mark them as > > deprecated. > > > > I think marking them as deprecated by a commentar is better than redefining > > bits to be unused. As I said the bindings not only linux related they are used in > > other projects too. > > > > For other projects, the result is same because SC firmware does not support those > Resource IDs. > > > > Personally I may prefer to remove them as they never worked to avoid > > > confusing, especially at this early stage for mx8. > > > > So why they are there if they never worked? Wouldn't it a better approach to > > start with a basic and working ID file and extend this rather than adding id's > > because maybe the will work.. > > Ideally yes, but may be hard in reality. > > SC firmware code usually is developed quite early before silicon comes. > But the real chip may changes, e.g. removed or added something. > > AFAIK those resource IDs removed have never worked in SC firmware, > and they're likely to come out of pre-silicon definition. But chip changes > later. > > > Sorry but this seems wrong to me too. > > I know the approach from driver development, adding a driver specific *_reg.h > > file and later figuring out that those bits won't work as aspected. As I said this > > will be driver and only linux related so we can change them as many times as > > we want. But in your case we are talking about dt-bindings and this approach > > won't work. > > I would agree with you if those resource IDs have worked before. > But they never worked. > Should we keep a thing never worked in device tree just because > It makes us look like keeping compatibility? > > If that, I'd rather removing them to avoid confusing in the future. Life is long, right? > I don't want people to bother with those unmeaning things anymore when they > look at it. Removing things is totally fine if they have never worked. Re-using the now "free" IDs is what is problematic. Only ever use previously unused IDs when introducing new stuff into the SCU firmware. This is something you need to communicate quite clearly with the SCU firmware developers. Regards, Lucas