linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Biwen Li (OSS)" <biwen.li@oss.nxp.com>
To: Leo Li <leoyang.li@nxp.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	"Biwen Li (OSS)" <biwen.li@oss.nxp.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"Z.q. Hou" <zhiqiang.hou@nxp.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"jason@lakedaemon.net" <jason@lakedaemon.net>,
	"maz@kernel.org" <maz@kernel.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jiafei Pan <jiafei.pan@nxp.com>, Xiaobo Xie <xiaobo.xie@nxp.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [EXT] Re: [v2 01/11] irqchip: ls-extirq: Add LS1043A, LS1088A external interrupt
Date: Mon, 30 Nov 2020 01:38:17 +0000	[thread overview]
Message-ID: <DB6PR0401MB2438919F5B954B0FD6BA1B1E8FF50@DB6PR0401MB2438.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CADRPPNTXnRrsRaAX-zBcU9vPo37u7BCKfAtzGG=2_Ut4syZwJA@mail.gmail.com>


> > > >>> 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
> > > >> << (31 - 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 driver
> > > for good.  This will prevent future confusion.  Rasmus, what do you think?
> > >
> > > Yes, all the ls1021a-derived boards I know of do have something like
> > >
> > > # Initialize bit reverse of SCFG registers
> > > 09570200 ffffffff
> > >
> > > in their pre-boot-loader config file. And yes, the RM does say
> > >
> > >   This register must be written 0xFFFF_FFFF as a part of
> > >   initialization sequence before writing to any other SCFG
> > >   register.
> > >
> > > but nowhere does it say "or else...", nor a little honest addendum
> > > "because 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 doing it
> correctly in later SoCs.
> >
> > >
> > > 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 for this.
> But definitely it was not your fault to have introduced this in the 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 driver is used on more
> SoCs.
> 
> Hi Biwen,
> 
> Would you send a new version of this patch?  Thanks.
Hi Leo, sure, np.
> 
> Regards,
> Leo

  reply	other threads:[~2020-11-30  1:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27  4:46 [v2 01/11] irqchip: ls-extirq: Add LS1043A, LS1088A external interrupt Biwen Li
2020-10-27  4:46 ` [v2 02/11] arm64: dts: ls1043a: add DT node for external interrupt lines Biwen Li
2020-10-27  4:46 ` [v2 03/11] arm64: dts: ls1046a: " Biwen Li
2020-10-27  4:46 ` [v2 04/11] arm64: dts: ls1046ardb: Add interrupt line for RTC node Biwen Li
2020-10-27  4:46 ` [v2 05/11] arm64: dts: ls1088a: add DT node for external interrupt lines Biwen Li
2020-10-27  4:46 ` [v2 06/11] arm64: dts: ls1088ardb: fix interrupt line for RTC node Biwen Li
2020-10-27  4:46 ` [v2 07/11] arm64: dts: ls208xa: add DT node for external interrupt lines Biwen Li
2020-10-27  4:46 ` [v2 08/11] arm64: dts: ls208xa-rdb: add interrupt line for RTC node Biwen Li
2020-10-27  4:46 ` [v2 09/11] arm64: dts: lx2160a: add DT node for external interrupt lines Biwen Li
2020-10-27  4:46 ` [v2 10/11] arm64: dts: lx2160ardb: fix interrupt line for RTC node Biwen Li
2020-10-27  4:46 ` [v2 11/11] dt-bindings: interrupt-controller: update bindings for supporting more SoCs Biwen Li
2020-10-27  7:40 ` [v2 01/11] irqchip: ls-extirq: Add LS1043A, LS1088A external interrupt Rasmus Villemoes
2020-10-27  7:48   ` [EXT] " Biwen Li
2020-10-27 21:30     ` Leo Li
2020-11-02  6:14       ` Biwen Li (OSS)
2020-11-02 21:22         ` Leo Li
2020-11-03  8:02           ` Rasmus Villemoes
2020-11-05 23:03             ` Leo Li
2020-11-24  1:33               ` Li Yang
2020-11-30  1:38                 ` Biwen Li (OSS) [this message]
2020-10-27  9:33 ` Marc Zyngier
2020-10-27 10:35   ` Biwen Li (OSS)
2020-10-27 10:43     ` Marc Zyngier
2020-10-27 10:55       ` Biwen Li (OSS)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB6PR0401MB2438919F5B954B0FD6BA1B1E8FF50@DB6PR0401MB2438.eurprd04.prod.outlook.com \
    --to=biwen.li@oss.nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=jiafei.pan@nxp.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=xiaobo.xie@nxp.com \
    --cc=zhiqiang.hou@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).