Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp312936imp; Wed, 20 Feb 2019 00:19:25 -0800 (PST) X-Google-Smtp-Source: AHgI3IZirJlgQP+qi5D1yHTt6LDgMVkKsr7/IfLzoQAyGGGdqsJxT+QRfl8VUJqJOVCQ1gpAZ8li X-Received: by 2002:a62:2ad1:: with SMTP id q200mr15927669pfq.34.1550650765330; Wed, 20 Feb 2019 00:19:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550650765; cv=none; d=google.com; s=arc-20160816; b=QKVorhc2B2NZ6sg1/O/WzYtf1Esv/1fgS1/QLvF2XTk/xT1yP+1PvX4sMLCU5F+xqq 8l0NBoaEUmC0YKj/4dDKXa8wG/MzCeLgp4OVf/olp8WoJXQLRmXYlqreIVcgxAHZrNdk Ha3vEfIXJ6w0W0eMr+OnKTFUcUjhn1xydN8Lnb82leh7NF/TEO7NMDzsbLrtkwPUkcCU K74bKHxhQD/aOnbUePvzl9UZpFHs0IJmFoEGKS3lsrK/MG63HvczETfxRNoJwrHUcsk0 NC1rmt91dSnewUUSHR+oIZMLSFUBwrkoO9X9PeV2Wl7tlyIo2+wiLsaxD/dj6KjoMe48 JuMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6SE50yRLG24IenTCWFJzb7yiZvnqBKDw4IuvgeX4DmM=; b=A6bYn/URDFzOORU/zght80qRkhz36gM6GK0mK8UCstaWe3uzVO9G68GhUUMi05GknU PlqZ/oldbesR3YShsHR8r09/g8fQ5AQoqqowtjA6NSJx5q5WRp5Kij9iQfTgOaWMkoTD 9yaaV/xw4YgLpuedYLCt/K9bORbttqMzoUxUuJPKkLUrIFGg28Ahw4Xvwbgad3qjPRzl z+/nx8f6e4lHFaYBtHslYU2BdpYPZTJwenQBU1OGG+8Sy/rRXbz7cK+/HO4fgHibjLsY c66B90pR1bvC+deWE2L5j2180myJ8ENUDSl24tL8V2h5E0436A1c2NzmATe+/mZdXpMh /0CQ== 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 l192si13935299pge.280.2019.02.20.00.19.09; Wed, 20 Feb 2019 00:19:25 -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 S1726460AbfBTIQ7 (ORCPT + 99 others); Wed, 20 Feb 2019 03:16:59 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:57925 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725779AbfBTIQ6 (ORCPT ); Wed, 20 Feb 2019 03:16:58 -0500 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gwN3k-0005VC-85; Wed, 20 Feb 2019 09:16:52 +0100 Received: from mfe by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1gwN3i-0008ML-Tz; Wed, 20 Feb 2019 09:16:50 +0100 Date: Wed, 20 Feb 2019 09:16:50 +0100 From: Marco Felsch To: Aisheng Dong 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 Subject: Re: [PATCH] dt-bindings: imx: update scu resource id headfile Message-ID: <20190220081650.cu3yzausx55jefb6@pengutronix.de> References: <1550566601-11497-1-git-send-email-Anson.Huang@nxp.com> <20190219125211.2pg2bqxner4klcb5@pengutronix.de> <20190219144808.qqpaubjcsb4huoml@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 08:40:43 up 32 days, 12:22, 38 users, load average: 0.12, 0.04, 0.01 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: mfe@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 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. Regards, Marco > > > > Please double check with SCU firmware owner what the removed ID are used before? > Any side effect if removing them. > > And please also check if the combability can be maintained via IMX_SC_RPC_VERSION? > > Regards > Dong Aisheng > > > Anson. > > > > > > > > Regards, > > > Marco > > > > > > > > > > > Anson. > > > > > > > > > > > > > > Regards, > > > > > Marco > > > > > > > > > > > Signed-off-by: Anson Huang > > > > > > --- > > > > > > include/dt-bindings/firmware/imx/rsrc.h | 39 > > > > > > +++++++++++++++++++-------------- > > > > > > 1 file changed, 22 insertions(+), 17 deletions(-) > > > > > > > > > > > > diff --git a/include/dt-bindings/firmware/imx/rsrc.h > > > > > > b/include/dt-bindings/firmware/imx/rsrc.h > > > > > > index 4481f2d..ad747a8 100644 > > > > > > --- a/include/dt-bindings/firmware/imx/rsrc.h > > > > > > +++ b/include/dt-bindings/firmware/imx/rsrc.h > > > > > > @@ -36,15 +36,15 @@ > > > > > > #define IMX_SC_R_DC_0_BLIT1 20 > > > > > > #define IMX_SC_R_DC_0_BLIT2 21 > > > > > > #define IMX_SC_R_DC_0_BLIT_OUT 22 > > > > > > -#define IMX_SC_R_DC_0_CAPTURE0 23 > > > > > > -#define IMX_SC_R_DC_0_CAPTURE1 24 > > > > > > +#define IMX_SC_R_PERF 23 > > > > > > +#define IMX_SC_R_UNUSED5 24 > > > > > > #define IMX_SC_R_DC_0_WARP 25 > > > > > > -#define IMX_SC_R_DC_0_INTEGRAL0 26 > > > > > > -#define IMX_SC_R_DC_0_INTEGRAL1 27 > > > > > > +#define IMX_SC_R_UNUSED7 26 > > > > > > +#define IMX_SC_R_UNUSED8 27 > > > > > > #define IMX_SC_R_DC_0_VIDEO0 28 > > > > > > #define IMX_SC_R_DC_0_VIDEO1 29 > > > > > > #define IMX_SC_R_DC_0_FRAC0 30 > > > > > > -#define IMX_SC_R_DC_0_FRAC1 31 > > > > > > +#define IMX_SC_R_UNUSED6 31 > > > > > > #define IMX_SC_R_DC_0 32 > > > > > > #define IMX_SC_R_GPU_2_PID0 33 > > > > > > #define IMX_SC_R_DC_0_PLL_0 34 > > > > > > @@ -53,17 +53,17 @@ > > > > > > #define IMX_SC_R_DC_1_BLIT1 37 > > > > > > #define IMX_SC_R_DC_1_BLIT2 38 > > > > > > #define IMX_SC_R_DC_1_BLIT_OUT 39 > > > > > > -#define IMX_SC_R_DC_1_CAPTURE0 40 > > > > > > -#define IMX_SC_R_DC_1_CAPTURE1 41 > > > > > > +#define IMX_SC_R_UNUSED9 40 > > > > > > +#define IMX_SC_R_UNUSED10 41 > > > > > > #define IMX_SC_R_DC_1_WARP 42 > > > > > > -#define IMX_SC_R_DC_1_INTEGRAL0 43 > > > > > > -#define IMX_SC_R_DC_1_INTEGRAL1 44 > > > > > > +#define IMX_SC_R_UNUSED11 43 > > > > > > +#define IMX_SC_R_UNUSED12 44 > > > > > > #define IMX_SC_R_DC_1_VIDEO0 45 > > > > > > #define IMX_SC_R_DC_1_VIDEO1 46 > > > > > > #define IMX_SC_R_DC_1_FRAC0 47 > > > > > > -#define IMX_SC_R_DC_1_FRAC1 48 > > > > > > +#define IMX_SC_R_UNUSED13 48 > > > > > > #define IMX_SC_R_DC_1 49 > > > > > > -#define IMX_SC_R_GPU_3_PID0 50 > > > > > > +#define IMX_SC_R_UNUSED14 50 > > > > > > #define IMX_SC_R_DC_1_PLL_0 51 > > > > > > #define IMX_SC_R_DC_1_PLL_1 52 > > > > > > #define IMX_SC_R_SPI_0 53 > > > > > > @@ -303,8 +303,8 @@ > > > > > > #define IMX_SC_R_M4_0_UART 287 > > > > > > #define IMX_SC_R_M4_0_I2C 288 > > > > > > #define IMX_SC_R_M4_0_INTMUX 289 > > > > > > -#define IMX_SC_R_M4_0_SIM 290 > > > > > > -#define IMX_SC_R_M4_0_WDOG 291 > > > > > > +#define IMX_SC_R_UNUSED15 290 > > > > > > +#define IMX_SC_R_UNUSED16 291 > > > > > > #define IMX_SC_R_M4_0_MU_0B 292 > > > > > > #define IMX_SC_R_M4_0_MU_0A0 293 > > > > > > #define IMX_SC_R_M4_0_MU_0A1 294 > > > > > > @@ -323,8 +323,8 @@ > > > > > > #define IMX_SC_R_M4_1_UART 307 > > > > > > #define IMX_SC_R_M4_1_I2C 308 > > > > > > #define IMX_SC_R_M4_1_INTMUX 309 > > > > > > -#define IMX_SC_R_M4_1_SIM 310 > > > > > > -#define IMX_SC_R_M4_1_WDOG 311 > > > > > > +#define IMX_SC_R_UNUSED17 310 > > > > > > +#define IMX_SC_R_UNUSED18 311 > > > > > > #define IMX_SC_R_M4_1_MU_0B 312 > > > > > > #define IMX_SC_R_M4_1_MU_0A0 313 > > > > > > #define IMX_SC_R_M4_1_MU_0A1 314 > > > > > > @@ -337,7 +337,7 @@ > > > > > > #define IMX_SC_R_IRQSTR_SCU2 321 > > > > > > #define IMX_SC_R_IRQSTR_DSP 322 > > > > > > #define IMX_SC_R_ELCDIF_PLL 323 > > > > > > -#define IMX_SC_R_UNUSED6 324 > > > > > > +#define IMX_SC_R_OCRAM 324 > > > > > > #define IMX_SC_R_AUDIO_PLL_0 325 > > > > > > #define IMX_SC_R_PI_0 326 > > > > > > #define IMX_SC_R_PI_0_PWM_0 327 > > > > > > @@ -554,6 +554,11 @@ > > > > > > #define IMX_SC_R_VPU_MU_3 538 > > > > > > #define IMX_SC_R_VPU_ENC_1 539 > > > > > > #define IMX_SC_R_VPU 540 > > > > > > -#define IMX_SC_R_LAST 541 > > > > > > +#define IMX_SC_R_DMA_5_CH0 541 > > > > > > +#define IMX_SC_R_DMA_5_CH1 542 > > > > > > +#define IMX_SC_R_DMA_5_CH2 543 > > > > > > +#define IMX_SC_R_DMA_5_CH3 544 > > > > > > +#define IMX_SC_R_ATTESTATION 545 > > > > > > +#define IMX_SC_R_LAST 546 > > > > > > > > > > > > #endif /* __DT_BINDINGS_RSCRC_IMX_H */ > > > > > > -- > > > > > > 2.7.4 > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Pengutronix e.K. | > > | > > > > > Industrial Linux Solutions | > > > > > > > > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fww > > > > > > > > w.pengutronix.de%2F&data=02%7C01%7Canson.huang%40nxp.com%7 > > > > > > > > > > Cfe709ac17a164d82c7d508d6966915fb%7C686ea1d3bc2b4c6fa92cd99c5c30 > > 1 > > > > > > > > > > 635%7C0%7C0%7C636861775412076730&sdata=05ZzPf2%2BQF10JXLLs > > > > > OPqDdqTi00BWXNHxmMOsQ1z0yI%3D&reserved=0 | Peiner Str. > > 6-8, > > > > > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 > > > | > > > > > Amtsgericht Hildesheim, HRA 2686 | Fax: > > +49-5121-206917-5555 | > > > > > > -- > > > Pengutronix e.K. | > > | > > > Industrial Linux Solutions | > > > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fww > > > w.pengutronix.de%2F&data=02%7C01%7Canson.huang%40nxp.com%7 > > > > > Cd5d39730435e4b06549c08d696794904%7C686ea1d3bc2b4c6fa92cd99c5c > > 30 > > > > > 1635%7C0%7C0%7C636861845015130502&sdata=tQYrNl5lzIRRNVBCji6 > > A > > > sPREOnIfDgdPWgAnsWyCErg%3D&reserved=0 | > > > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 > > | > > > Amtsgericht Hildesheim, HRA 2686 | Fax: > > +49-5121-206917-5555 | > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |