Re: [PATCH 06/25] ARM: tegra: Fix compatible string for Tegra30+ timer

Thierry Reding
2021-12-10T13:42:37Z

[-- Attachment #1: Type: text/plain, Size: 2976 bytes --]

On Thu, Dec 09, 2021 at 10:36:43PM +0300, Dmitry Osipenko wrote:
> 09.12.2021 20:33, Thierry Reding пишет:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > The TKE (time-keeping engine) found on Tegra30 and later is not
> > backwards compatible with the version found on Tegra20, so update the
> > compatible string list accordingly.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > arch/arm/boot/dts/tegra114.dtsi | 2 +-
> > arch/arm/boot/dts/tegra124.dtsi | 2 +-
> > arch/arm/boot/dts/tegra30.dtsi | 2 +-
> > 3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
> > index 546272e396b4..328425dba023 100644
> > --- a/arch/arm/boot/dts/tegra114.dtsi
> > +++ b/arch/arm/boot/dts/tegra114.dtsi
> > @@ -164,7 +164,7 @@ lic: interrupt-controller@60004000 {
> > };
> >
> > timer@60005000 {
> > - compatible = "nvidia,tegra114-timer", "nvidia,tegra30-timer", "nvidia,tegra20-timer";
> > + compatible = "nvidia,tegra114-timer", "nvidia,tegra30-timer";
> > reg = <0x60005000 0x400>;
> > interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
> > <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
> > diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
> > index 63a64171b422..f4ac0c327c2e 100644
> > --- a/arch/arm/boot/dts/tegra124.dtsi
> > +++ b/arch/arm/boot/dts/tegra124.dtsi
> > @@ -259,7 +259,7 @@ lic: interrupt-controller@60004000 {
> > };
> >
> > timer@60005000 {
> > - compatible = "nvidia,tegra124-timer", "nvidia,tegra30-timer", "nvidia,tegra20-timer";
> > + compatible = "nvidia,tegra124-timer", "nvidia,tegra30-timer";
> > reg = <0x0 0x60005000 0x0 0x400>;
> > interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
> > <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
> > diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
> > index ae3df73c20a7..4c04b9c28484 100644
> > --- a/arch/arm/boot/dts/tegra30.dtsi
> > +++ b/arch/arm/boot/dts/tegra30.dtsi
> > @@ -342,7 +342,7 @@ lic: interrupt-controller@60004000 {
> > };
> >
> > timer@60005000 {
> > - compatible = "nvidia,tegra30-timer", "nvidia,tegra20-timer";
> > + compatible = "nvidia,tegra30-timer";
> > reg = <0x60005000 0x400>;
> > interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
> > <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
> >
>
> What exactly is incompatible? IIRC, T30+ is a superset of T20. This
> patch should be wrong, also see [1].

As the comment in that location explains, Tegra114 and later have an
architectural timer that is preferred over the legacy timer. So while
this doesn't technically make Tegra114 incompatible (in terms of
register programming, etc.) with Tegra20, in practice we don't want
Tegra20 behaviour on Tegra114 and later.

For Tegra30, you're indeed correct, there shouldn't be a difference, so
I can add that back in.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]