public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: icenowy@aosc•xyz (Icenowy Zheng)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng
Date: Mon, 01 Aug 2016 20:19:54 +0800	[thread overview]
Message-ID: <70891470053994@web8m.yandex.ru> (raw)
In-Reply-To: <8b4d1f09-b1ce-5708-f815-29dbd438c2db@arm.com>

Hi Andre,

01.08.2016, 18:48, "Andre Przywara" <andre.przywara@arm•com>:
> Hi Jean-Francois,
>
> On 01/08/16 09:30, Jean-Francois Moine wrote:
>> ?On Mon, 1 Aug 2016 02:43:06 +0100
>> ?Andr? Przywara <andre.przywara@arm•com> wrote:
>>
>>> ?As this became quite a long read, here a TL;DR:
>>> ?- We consider using an SCPI based clock system for the A64, alongside
>>> ?allwinner,simple-gates and fixed clocks. We try to avoid any Allwinner
>>> ?specific clocks (apart from the simple-gates).
>>> ?- ARM Trusted Firmware provides the SCPI implementation - for now, later
>>> ?we may move this into a possible arisc firmware.
>>> ?- We upstream some basic DT first, possibly omitting any controversial
>>> ?clock parts at all.
>>>
>>> ?Let me know what you think!
>>
>> ?Hi Andr?,
>>
>> ?This looks interesting.
>> ?As I understand, the clock enable/rate setting functions would be in
>> ?the arisc. The arisc firmware would be loaded only once in the Soc and
>> ?would contain the code for handling this specific SoC.
>> ?From my calculations, this would save about 1Mb of clock descriptions
>> ?in the kernel for a universal Allwinner kernel.
>
> This is the rough idea, yes. In the moment the clock code sits in the
> ARM Trusted Firmware part, but in fact this is an implementation detail.
> Theoretically we could also move that clock code to U-Boot on 32-bit
> SoCs to sit next to the PSCI implementation, which uses the same smc
> call mechanism as I do in this first implementation.
> But unfortunately we cannot remove the existing code from the kernel,
> since that would break all existing users (unless they upgrade their
> firmware). So I am not sure if supporting older SoCs with this mechanism
> is worthwhile.
>
> But: yes, I want to avoid adding tedious clock descriptions for each and
> every new SoC to the kernel. What really worries me is that sunxi-ng
> makes this situation probably worse, as we now have to add SoC specific
> "code" (in fact: clock descriptions) for every SoC, even if that chip
> doesn't introduce any new clock type.
>
>> ?But I don't see why you are keeping the simple-gates. The bus gate may
>> ?be ungated/gated when the clock is enabled/disabled, and that's what
>> ?Allwinner's software does.
>
> We could do. But SCPI does not have an explicit enable/disable
> interface, it only describes that setting the frequency to 0 disables
> the clock. For enabling it one would have to set some frequency (!= 0),
> which the firmware could then translate into a "set that bit in the gate
> register" for any gate-only clock, which sounds rather hackish to me.
> Also it would require to alter the SCPI clock driver to implement the
> enable/disable ops, since I think we never call set_rate for those clocks.
>
> So having the quite straight forward "simple-gates" driver around seems
> more sane. In the end this driver just translates "clock number x" into
> "bit number x" in that register, which is very generic. That's why I
> urged to introduce a fallback compatible name to express this very feature.
>
> Cheers,
> Andre.
>
It may be unpolite to say that, but I just want a working A64 mainline kernel at first.
I'm trying to submit the drivers of the changed IP blocks now, but it's a pity that I
cannot submit the DT patches now.
clock-ng is at least now a usable solution.
Or can you work out such a firmware-based clock driver as soon as possible?

I'm expecting your SCPI-based driver!
(ARM is now such a mess that it really needs a standard.)
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2016-08-01 12:19 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26 20:30 [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Maxime Ripard
2016-07-26 20:30 ` [PATCH 01/13] clk: sunxi-ng: mux: Rename mux macro to be consistent Maxime Ripard
2016-07-26 20:30 ` [PATCH 02/13] clk: sunxi-ng: mux: Add mux table support Maxime Ripard
2016-07-26 20:30 ` [PATCH 03/13] clk: sunxi-ng: sun8i: Rename DDR and video plls Maxime Ripard
2016-07-27  7:57   ` kbuild test robot
2016-07-26 20:30 ` [PATCH 04/13] clk: sunxi-ng: sun8i: Fix register offset Maxime Ripard
2016-07-26 20:30 ` [PATCH 05/13] clk: sunxi-ng: sun8i: Rename H3 only clocks Maxime Ripard
2016-07-26 20:30 ` [PATCH 06/13] clk: sunxi-ng: sun8i: Move fixed factors around Maxime Ripard
2016-07-26 20:30 ` [PATCH 07/13] clk: sunxi-ng: sun8i: Prefix clock defines by SoC Name Maxime Ripard
2016-07-26 20:30 ` [PATCH 08/13] clk: sunxi-ng: Add A64 clocks Maxime Ripard
2016-07-29 21:15   ` Rob Herring
2016-07-26 20:30 ` [PATCH 09/13] arm64: sunxi: Kconfig: add essential pinctrl driver Maxime Ripard
2016-07-26 20:30 ` [PATCH 10/13] arm64: Kconfig: sunxi: add PINCTRL Maxime Ripard
2016-07-26 20:30 ` [PATCH 11/13] Documentation: devicetree: add vendor prefix for Pine64 Maxime Ripard
2016-07-26 20:30 ` [PATCH 12/13] arm64: dts: add Allwinner A64 SoC .dtsi Maxime Ripard
2016-09-08  8:41   ` Andre Przywara
2016-09-09 20:04     ` Maxime Ripard
2016-07-26 20:30 ` [PATCH 13/13] arm64: dts: add Pine64 support Maxime Ripard
2016-07-27  8:46 ` [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Jean-Francois Moine
2016-07-28 20:07   ` Maxime Ripard
2016-07-29  5:48     ` Jean-Francois Moine
2016-07-31  8:51       ` Maxime Ripard
2016-08-01  1:43 ` André Przywara
2016-08-01  8:30   ` Jean-Francois Moine
2016-08-01  9:13     ` Chen-Yu Tsai
2016-08-01 12:00       ` Jean-Francois Moine
2016-08-01 12:01         ` Chen-Yu Tsai
2016-08-01 12:11           ` Jean-Francois Moine
2016-08-01 10:44     ` Andre Przywara
2016-08-01 12:19       ` Icenowy Zheng [this message]
2016-08-01  9:11   ` Chen-Yu Tsai
2016-08-11  0:36     ` André Przywara
2016-08-23 19:31   ` Maxime Ripard
2016-08-24 23:54     ` André Przywara
2016-08-26 22:18       ` 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=70891470053994@web8m.yandex.ru \
    --to=icenowy@aosc$(echo .)xyz \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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