Hi Chris,
On Mon, Dec 17, 2018 at 8:40 PM Chris Brandt <[email protected]> wrote:
> On Monday, December 17, 2018 1, [email protected] wrote:
> > > Yup...there's the killer!
> > > You'll notice that in mainline RZ/A devices, there is no QSPI driver,
> > > and also the QSPI clock is left out of the list of HW clocks. Otherwise,
> > > as you mentioned, that 'unused' clock would get shut off at the end of
> > > boot...and you're whole system would stop immediately.
> >
> > If you had a simple driver with the binding as I proposed, then it
> > could do the ioremap and clock management. And you could also have
> > specific SPI and flash drivers for when you need to flashing without
> > changing the DT.
>
> I agree.
>
> At the same time, this particular XIP-QSPI HW is now used in the latest
> Renesas R-Car devices, and there has been some talk of upstreaming the
> driver for it (as in, using it in SPI mode instead of XIP mode).
> I'm waiting to see where that ends up, and if I should just use that
> SPI mode driver for the RZ/A series but simply put in a new property like
> "use-xip-mode;" that basically tells the driver to do nothing except enable
> the clock (again) so it doesn't get shut off at the end of boot.
The "clock management" should simply be calls to pm_runtime_enable()
and pm_runtime_get_sync().
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds