[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220414154232.098a4451@bootlin.com>
Date: Thu, 14 Apr 2022 15:42:32 +0200
From: Herve Codina <herve.codina@...tlin.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Marek Vasut <marek.vasut+renesas@...il.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Krzysztof Wilczyński <kw@...ux.com>,
Rob Herring <robh@...nel.org>,
linux-pci <linux-pci@...r.kernel.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Sergey Shtylyov <s.shtylyov@....ru>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Clement Leger <clement.leger@...tlin.com>,
Miquel Raynal <miquel.raynal@...tlin.com>
Subject: Re: [PATCH v2 1/8] PCI: rcar-gen2: Add support for clocks
Hi Geert,
On Thu, 14 Apr 2022 13:48:22 +0200
Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> Hi Hervé,
>
> On Thu, Apr 14, 2022 at 1:29 PM Herve Codina <herve.codina@...tlin.com> wrote:
> > On Thu, 14 Apr 2022 10:45:54 +0200
> > Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> > > On Thu, Apr 14, 2022 at 9:40 AM Herve Codina <herve.codina@...tlin.com> wrote:
> > > > The PCI rcar-gen2 does not call any clk_prepare_enable().
> > >
> > > Correct, this driver manages the clocks indirectly through Runtime PM.
> > >
> > > > This lead to an access failure when the driver tries to access
> > > > the IP (at least on a RZ/N1D platform).
> > >
> > > I expect adding
> > >
> > > power-domans = <&sysctrl>;
> > >
> > > to the pci_usb node makes this patch redundant.
> >
> > Seems not enough.
> > I tried what you suggest :
> > - Added 'power-domains = <&systrl>;' to the pci_usb node
> > - Added missing '#power-domain-cells = <0>;' to sysctrl node
> > - Reverted my patch.
> >
> > The system crashed at boot:
>
> > [ 0.832958] Unhandled fault: external abort on non-linefetch (0x1008) at 0x90b5f848
>
> That's indeed a typical symptom of accessing a module's registers
> while the module's clock is disabled.
>
> > I also added a trace printk in r9a06g032-clocks.c and
> > r9a06g032_attach_dev() was never called.
> >
> > Did I miss to set something ?
>
> Do you have CONFIG_PM and CONFIG_PM_GENERIC_DOMAINS
> enabled?
> Apparently ARCH_RZN1 does not select these options yet.
>
Thanks a lot for pointing this.
I added select CONFIG_PM and CONFIG_PM_GENERIC_DOMAINS
in ARCH_RZN1 and it works.
I will remove my patch calling clk_bulk_prepare_enable() and
add some new patches to enable power domains in the v3 series.
Regards,
Hervé
Powered by blists - more mailing lists