Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1453127

Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng

From Andre Przywara <andre.przywara@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng
Date 2016-08-01 12:50 +0200
Message-ID <s1iXf-5ai-9@gated-at.bofh.it> (permalink)
References <rZhiV-6Jx-3@gated-at.bofh.it> <s1awF-7Zx-1@gated-at.bofh.it> <s1gVs-3TO-7@gated-at.bofh.it>
Organization ARM Ltd.

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-26 22:40 +0200
  [PATCH 12/13] arm64: dts: add Allwinner A64 SoC .dtsi Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-26 22:40 +0200
  [PATCH 03/13] clk: sunxi-ng: sun8i: Rename DDR and video plls Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-26 22:40 +0200
  [PATCH 09/13] arm64: sunxi: Kconfig: add essential pinctrl driver Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-26 22:40 +0200
  [PATCH 13/13] arm64: dts: add Pine64 support Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-26 22:40 +0200
  [PATCH 02/13] clk: sunxi-ng: mux: Add mux table support Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-26 22:40 +0200
  [PATCH 08/13] clk: sunxi-ng: Add A64 clocks Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-26 22:40 +0200
    Re: [PATCH 08/13] clk: sunxi-ng: Add A64 clocks Rob Herring <robh@kernel.org> - 2016-07-29 23:20 +0200
  [PATCH 10/13] arm64: Kconfig: sunxi: add PINCTRL Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-26 22:40 +0200
  Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Jean-Francois Moine <moinejf@free.fr> - 2016-07-27 10:50 +0200
    Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-28 22:10 +0200
      Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Jean-Francois Moine <moinejf@free.fr> - 2016-07-29 07:50 +0200
        Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-31 22:30 +0200
  Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng André Przywara <andre.przywara@arm.com> - 2016-08-01 03:50 +0200
    Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Jean-Francois Moine <moinejf@free.fr> - 2016-08-01 10:40 +0200
      Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Chen-Yu Tsai <wens@csie.org> - 2016-08-01 11:20 +0200
        Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Jean-Francois Moine <moinejf@free.fr> - 2016-08-01 14:10 +0200
          Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Chen-Yu Tsai <wens@csie.org> - 2016-08-01 14:10 +0200
            Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Jean-Francois Moine <moinejf@free.fr> - 2016-08-01 14:20 +0200
      Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Andre Przywara <andre.przywara@arm.com> - 2016-08-01 12:50 +0200
    Re: [PATCH 00/13] arm64: Allwinner A64 support based on sunxi-ng Chen-Yu Tsai <wens@csie.org> - 2016-08-01 11:20 +0200

csiph-web