From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-sunxi] [PATCH v4 5/6] ARM: sun7i: Convert to CCU
Date: Thu, 29 Jun 2017 13:53:57 +0200 [thread overview]
Message-ID: <20170629115357.sxs3tjmhfncfvtpj@flea> (raw)
In-Reply-To: <20170629132812.52ce1214d6967b82da52123e@bidouilliste.com>
On Thu, Jun 29, 2017 at 01:28:12PM +0200, Emmanuel Vadot wrote:
> On Thu, 29 Jun 2017 11:57:05 +0100
> Andre Przywara <andre.przywara@arm.com> wrote:
>
> > Hi,
> >
> > On 25/06/17 21:45, Priit Laes wrote:
> > > Convert sun7i-a20.dtsi to new CCU driver.
> >
> > I know that some people hat^Wget annoyed by me asking this, but anyway:
> >
> > Why do we actually need this?
>
> No. I can understand the need for clkng/sunxi-ng/whatever you call it,
> it's not that bad (but see below) to add a new SoC on FreeBSD now that
> I've added the framework, but breaking old SoC that were perfectly fine
> isn't acceptable.
We haven't broken it.
> It also mean that, on FreeBSD, we still have patches for sun7i dts to
> add hdmi support (which we have since a year or so) because last time
> someone (I think plaes) wanted to add clock node for it, it was said
> that it was needed to move to clkng first.
This is a circular argument. It wouldn't have been the case with
sunxi-ng, since we would have had that clock from the start...
> > This ultimately makes the DT incompatible with older kernels (as
> > actually shipped by distros today).
>
> Yes, right now sun5i support is broken in FreeBSD because I couldn't
> find the time to make a driver for it yet.
Probably because you merged new DTs without updating the code. That
has nothing to do with backward compatibility, the old DT would still
work fine.
> > So if we for instance use UEFI boot or otherwise just use "one golden
> > DT" to drive all kernels (like using the DT from U-Boot), we now don't
> > have one good DT that fits all. This is really a showstopper for boards
> > which ship a DT in firmware (in SPI flash, for instance, or on some eMMC).
> > So:
> > - Do we actually need to change the .dtsi? The old .dtsi should still work.
> > - Is there anything that the new and fancy clocks gives us over the
> > existing clocks? If yes, that should be a stated in the commit message
> > or cover letter.
> > - Why do we change the clocks for those older SoCs in the first place?
> > Can't we just keep on using what worked for years? I think we really
> > can't remove the old code anyway.
> >
> > The new clock driver moves information from the DT into the kernel. That
> > means it is no longer available for a DT consumer and the SoC details
> > (which clocks is located where, for instance), have to be replicated to
> > other DT users (U-Boot, *BSD, you-name-it). We already came across this
> > issue when looking at converting U-Boot over to use DT clocks.
> > Also it ultimately requires kernel changes for each new SoC, even if it
> > only differs in some detail which could be perfectly modelled in DT
> > (think of H3 vs. H5).
>
> The last point is very interesting, before adding a new Allwinner SoC
> was just a matter of maybe handling one/two new clocks (at least to
> have something that 'just boots'), now it's a whole new big boring file
> to write while reading datasheet.
You can definitely do that with sunxi-ng bindings if you want. You
just have to populate only the IDs that are of interest to you.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170629/be8e70a7/attachment.sig>
next prev parent reply other threads:[~2017-06-29 11:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-25 20:45 [PATCH v4 0/6] ARM: sunxi: Convert sun4i/sun7i series SoCs to sunxi-ng CCU Priit Laes
2017-06-25 20:45 ` [PATCH v4 1/6] clk: sunxi-ng: div: Add support for fixed post-divider Priit Laes
2017-06-25 22:05 ` [linux-sunxi] " Jonathan Liu
2017-06-26 5:53 ` Priit Laes
2017-06-26 10:15 ` Jonathan Liu
2017-06-27 9:46 ` Maxime Ripard
2017-06-28 17:59 ` Priit Laes
2017-06-29 7:33 ` Maxime Ripard
2017-06-25 20:45 ` [PATCH v4 2/6] clk: sunxi-ng: Add sun4i/sun7i CCU driver Priit Laes
2017-06-25 20:45 ` [PATCH v4 3/6] dt-bindings: List devicetree binding for the CCU of Allwinner A20 Priit Laes
2017-06-25 20:45 ` [PATCH v4 4/6] dt-bindings: List devicetree binding for the CCU of Allwinner A10 Priit Laes
2017-06-25 20:45 ` [PATCH v4 5/6] ARM: sun7i: Convert to CCU Priit Laes
2017-06-29 10:57 ` [linux-sunxi] " Andre Przywara
2017-06-29 11:28 ` Emmanuel Vadot
2017-06-29 11:53 ` Maxime Ripard [this message]
2017-06-29 11:49 ` Maxime Ripard
2017-06-30 13:12 ` Andre Przywara
2017-06-25 20:45 ` [PATCH v4 6/6] ARM: sun4i: " Priit Laes
2017-06-30 9:52 ` Maxime Ripard
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=20170629115357.sxs3tjmhfncfvtpj@flea \
--to=maxime.ripard@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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