Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp854596pxb; Thu, 5 Nov 2020 15:05:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1Ksw8AvctvHFURA55A4oD9VzOHbhixfpWY998CF0X1vk8c59yoeZ9sAf539aWtC17KWAM X-Received: by 2002:a50:c88b:: with SMTP id d11mr5119998edh.121.1604617543502; Thu, 05 Nov 2020 15:05:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1604617543; cv=pass; d=google.com; s=arc-20160816; b=YSP0riF5GiCFtGKtPEmXHCQQQCEGVcKRPrrkbJga3VHAWbGkLGpYrEy+VcC2Q8fREn uGkdofKcT/j9eHEfVRFKe70Xe8IfSlntAtPjScy7aXSk3XFjQtTm7bXjfnVBjDBBTqtE nj0byoodlcyePzHw3miz8YpJVLZ2ErksxuVaGJhLnsnuJlwjUHzXUJ7LihGe1vYQt4Mv 0mUWlhy/8cnoPJcm9FoKnrPvr36jSI3BGsFyR/bieMyEpBWeVlteTcSRVcPgcySPQZBR dcnLoULf66TkmrJ0XaBsKTnj+NiinIDrHf0QG1OUVPPLIdTRsTPDm3NINWETgN2KChS8 QqCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=X4UiCvHmeaUSRHgSSl8Tx5zYj+eSuZrgPdLMJZRYx8I=; b=iuvRWGh1Eqa9wZ4PygrrUpdkdVnVZtsdKXhv53MAWCC8Nw1mMBPJusWRQRo5TVpCCc aA1bp4yWCdXgl0l9oqDShi+z59UwYe1hGdyXP2aJFF4BjlMLY/zBgZ+/znOyUlp0aaGa j4rXJXC+UwaYDzywSvRUaiBqIEWQkFt3usDa9bEaataG+Tng4a5sGgl3OQsLmaFKZaVF S5w1mnA76R1+9AkewltBeUGGCnONblY5xYxJq1lFW42lWKR1wwQhglcWKgDFEe+XIDdU AWg59qrLuzUGDJxQ1XN7u6fJfmwvx9xqm7KlvkhRVbL8ZZncz+OD/eua39Iqsui/H7Vi Egow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=bHsBzJCt; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si2223198ejx.702.2020.11.05.15.05.20; Thu, 05 Nov 2020 15:05:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=bHsBzJCt; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732386AbgKEXD6 (ORCPT + 99 others); Thu, 5 Nov 2020 18:03:58 -0500 Received: from mail-vi1eur05on2076.outbound.protection.outlook.com ([40.107.21.76]:18639 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731899AbgKEXD6 (ORCPT ); Thu, 5 Nov 2020 18:03:58 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S5kd2hnQC1V1XFWiq1RUEsWPFvHG6meAz9tvJh08/U2EFsFwpabR7UdTwEgX6lgsM965hbotjMdIsq+LT54Ze/kf4iLVdo52giHNeJxrfSO3PSX2274vsg2vTXmg89lsPEnmZzeixcLxvw0UYLeekHQg1H1IToCN+fSgj1PcHstveXeGHjPjq7txUo6DJuXnZ1PqOghtqMCT1Avsy3gOVoW2kp6Xy1hC3z7kAg7k0nYf4sCH8DhrBU5qwYghhbIhqjci+zqOxWjWvk2KR0MpPqrM5/n3U+opSKQ2qODX/SdN4P+/BMFAcHNz6x9BboFDiuOSiZIDQlzkoJ30Ov59xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X4UiCvHmeaUSRHgSSl8Tx5zYj+eSuZrgPdLMJZRYx8I=; b=NfmUf62yqEznKjqjECPLrDdz+mgokmg+TU8qoO3oH4oyaByjSgUV9OVYmR2LK6tKBo/C29/s+W9meOaIaejcJCuwjV22oSX/UuKf8k3GpwavoLOulJ5SyY85+9GxvvH69lb7A3h/u80ETPPKZ4WbcmmW5fNUhEZxMXwoiFUhx2fJlYkkkHqBBlpXFLvPjxfNHKAcxr7ORWSOrSgF5F6qoK0qYdNDMR28lE64eWbvPMRxAVkjZJulTL7IDIqATl30wYHf9OjykCpLfb1AImX0JsD4QalDNqCwenBxwA0pUFMXdZiNoqXae6xRnKKgayMWkahGH4UdHQ8FUpDSrZV0Cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X4UiCvHmeaUSRHgSSl8Tx5zYj+eSuZrgPdLMJZRYx8I=; b=bHsBzJCt6B5XdEMnbc7veQMx/vYpq00zif9FGPRQZ2OOuvTqU3II2ZggaJ0mLS5K1egHnvgVkb8LDcnA2DaweG6fFkKU80CmoWwNijXEoc4FK02kBiTkqZ7WA3Uw508blGMtfDEKp2/Q4vVsM7TX0jvIQIylaejyUMhCiDcUqdM= Received: from VE1PR04MB6687.eurprd04.prod.outlook.com (2603:10a6:803:121::30) by VE1PR04MB7423.eurprd04.prod.outlook.com (2603:10a6:800:1a0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21; Thu, 5 Nov 2020 23:03:55 +0000 Received: from VE1PR04MB6687.eurprd04.prod.outlook.com ([fe80::b106:ac49:e3c7:6dc8]) by VE1PR04MB6687.eurprd04.prod.outlook.com ([fe80::b106:ac49:e3c7:6dc8%7]) with mapi id 15.20.3499.032; Thu, 5 Nov 2020 23:03:55 +0000 From: Leo Li To: Rasmus Villemoes , "Biwen Li (OSS)" , "shawnguo@kernel.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "Z.q. Hou" , "tglx@linutronix.de" , "jason@lakedaemon.net" , "maz@kernel.org" CC: "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jiafei Pan , Xiaobo Xie , "linux-arm-kernel@lists.infradead.org" Subject: RE: [EXT] Re: [v2 01/11] irqchip: ls-extirq: Add LS1043A, LS1088A external interrupt Thread-Topic: [EXT] Re: [v2 01/11] irqchip: ls-extirq: Add LS1043A, LS1088A external interrupt Thread-Index: AQHWrB1r8C3YTVD4gUGfvnOjzP6Q2amrEJ2AgAACOICAANrToIAIeRcAgAD4mMCAALfQAIAEGdlg Date: Thu, 5 Nov 2020 23:03:55 +0000 Message-ID: References: <20201027044619.41879-1-biwen.li@oss.nxp.com> <5b1f2911-98b3-511f-404b-7d0fa44cc0c2@rasmusvillemoes.dk> <03dc38bb-b83a-7926-60dc-61152a3ac967@rasmusvillemoes.dk> In-Reply-To: <03dc38bb-b83a-7926-60dc-61152a3ac967@rasmusvillemoes.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: rasmusvillemoes.dk; dkim=none (message not signed) header.d=none;rasmusvillemoes.dk; dmarc=none action=none header.from=nxp.com; x-originating-ip: [136.49.1.200] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f914dcfe-3c47-4013-53cf-08d881df1206 x-ms-traffictypediagnostic: VE1PR04MB7423: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1850; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zm4lI6RlgPd7V7ST5/pJBUHO1Br9HEnCHQnIIlYW7GV7TKjlX3Zt9bmlPV+8VQrx+LocCCS6hoeR65ezlOFqLVm1dDc8Y4tj+jIdDUWDvhKUHhAGx23TeO8bQmaczjgs5p/RMkudftf6EENVWFpejxUo/KtDsvsionmizcZByCA+YemY9avLOz+p4FdgFIjzQUQyJTKqlRSAuv5UxStcopPYGyFB/ytHSqSYL+1miY8ZpFEs7ghEejZBspmgD28VhS8G9kFkRAH6hFzcVtpdSNvC68DnYMOkMV3hMgRyO8R4IyhCOIvdpo9ogaghhjz/u5avihe4JwuyL5UQh3ozhQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6687.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(366004)(136003)(376002)(39860400002)(396003)(7416002)(4326008)(66446008)(7696005)(316002)(71200400001)(110136005)(66556008)(66476007)(54906003)(8676002)(64756008)(26005)(52536014)(33656002)(5660300002)(53546011)(6506007)(186003)(8936002)(83380400001)(2906002)(55016002)(66946007)(9686003)(478600001)(76116006)(86362001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: uY4ozb0s1qZQKtfPJmer/sAMopTqogkY+4poVJ8e5XMkaxr8nNjcbtgmyiSLslTzio/RS3oJEQeuKiBsPzStaY/9ckE4sVr3pBtZGWAwpkj7fzz33uC24AvZpOiWH44laDFrT0Wx5R7KlyN1YJPIMI8/ypPF7HEWFbcF7UGl/72Ve/dI6F5NgxyFeIVlmLV7hbN05J/uaF4FRyqzp3Qwk+QNq6ivVaMTOqoA4FdkpooazU/hLC+2rxNiq2YF3z7l6GHnA2ULjCMa7FAK8xoHNK0tUgzXuygEFeY0Lz3agKQERpjKUCSohAjtz7azgpGl5PmY59Tj2Nn0KZ7UX18CuQmGmpK46+ZpkxRAQ7BPs8SBRCcmvbh/npNwuF17MJmhlG+DmNq27gONYXKokXC7cc/gVD1is1oKd8sinVfLWTLpEf5uxfZitrwd7EOAjaRWZh2XU8eeS4VeQ7IvZp23as4PnVNbToo5LVKoNgYUAbkmrHLGMZ8NqiTmn/seykTRcrFfxwPLsp6jJEDwa94safCUVwA95dU71CIPo1ZPs6rALfkOFv35Wst1SBPyvoDyjg+SSgcHBhaaA2lGrCxCFJsDXtdF2AVkScNTZVSZ691cDaWi8VAI62u545vElp7tix1ejHRncCCaKaJW2DCK0w== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6687.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f914dcfe-3c47-4013-53cf-08d881df1206 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2020 23:03:55.1740 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: R/c2+SN03HAJuHrsjDclAncHRTYOGJXpsewqBgfkz8C7ySME1gI8ruqpo1cZezZmaGjtW+xOKcaJMEO5j52NnQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7423 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Rasmus Villemoes > Sent: Tuesday, November 3, 2020 2:03 AM > To: Leo Li ; Biwen Li (OSS) ; > shawnguo@kernel.org; robh+dt@kernel.org; mark.rutland@arm.com; Z.q. > Hou ; tglx@linutronix.de; jason@lakedaemon.net; > maz@kernel.org > Cc: devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Jiafei Pan > ; Xiaobo Xie ; linux-arm- > kernel@lists.infradead.org > Subject: Re: [EXT] Re: [v2 01/11] irqchip: ls-extirq: Add LS1043A, LS1088= A > external interrupt >=20 > On 02/11/2020 22.22, Leo Li wrote: > >>> > >>> Where did you get this information that the register on LS1043 and > >>> LS1046 is bit reversed? I cannot find such information in the RM. > >>> And does this mean all other SCFG registers are also bit reversed? > >>> If this is some information that is not covered by the RM, we > >>> probably should clarify it in the code and the commit message. > >> Hi Leo, > >> > >> I directly use the same logic to write the bit(field IRQ0~11INTP) of > >> the register SCFG_INTPCR in LS1043A and LS1046A. > >> Such as, > >> if I want to control the polarity of IRQ0(field IRQ0INTP, IRQ0 is > >> active low) of LS1043A/LS1046A, then I just need write a value 1 << (3= 1 - 0) > to it. > >> The logic depends on register's definition in LS1043A/LS1046A's RM. > > > > Ok. The SCFG_SCFGREVCR seems to be a one-off fixup only existed on > LS1021. And it is mandatory to be bit_reversed according to the RM which= is > already taken care of in the RCW. So the bit reversed case should be the= only > case supported otherwise a lot of other places for SCFG access should be > failed. > > > > I think we should remove the bit_reverse thing all together from the dr= iver > for good. This will prevent future confusion. Rasmus, what do you think= ? >=20 > Yes, all the ls1021a-derived boards I know of do have something like >=20 > # Initialize bit reverse of SCFG registers > 09570200 ffffffff >=20 > in their pre-boot-loader config file. And yes, the RM does say >=20 > This register must be written 0xFFFF_FFFF as a part of > initialization sequence before writing to any other SCFG > register. >=20 > but nowhere does it say "or else...", nor a little honest addendum "becau= se > we accidentally released broken silicon with this misfeature _and_ wrong > POR value". Yeah. I do think they messed up at the beginning when trying to integrate = the big endian registers on little endian core. It is good that we are doi= ng it correctly in later SoCs. >=20 > Can we have an official statement from NXP stating that SCFGREVCR is a > hardware design bug? And can you send it through a time-machine so I had = it > three years ago avoiding the whole "fsl,bit-reverse device-tree-property,= no, > read the register if you're on a ls1021a and decide" hullabaloo. I'm not sure if it is possible to update the related documents right now fo= r this. But definitely it was not your fault to have introduced this in th= e driver due to the confusion from document. My suggestion to remove it is= just to prevent this from causing more confusions in the future as this dr= iver is used on more SoCs. Regards, Leo