[PATCH 1/3] sunxi: psci: clean away preprocessor macros
Andre Przywara
andre.przywara at arm.com
Mon Aug 14 23:05:21 CEST 2023
On Mon, 14 Aug 2023 12:10:25 -0600
Sam Edwards <cfsworks at gmail.com> wrote:
> Hi Andre,
>
> On 8/14/23 10:37, Andre Przywara wrote:
> > So I think we can get rid of this:
> > - GEN_H6 never compiles this code here, as both H6 and H616 are arm64.
>
> Easy!
>
> > - We can define SUNXI_PRCM_BASE for NCAT2, I believe Samuel once
> > mentioned that the D1/T113 does have such a block, actually.
>
> Will you be taking care of this in v2 of your T113s series, or should I
> be adding it (in which case I'll need to know the location of the block)?
Yes, I will add this to the header file, either defined as 0, or to its
actual address.
> > - The non-existing cpu_pwr_clamp member should go away when you switch to
> > a BASE_ADDR + REG_OFFSET approach, I think.
>
> Less easy, but still can do.
>
> > Shouldn't that be the opposite? In the existing code, sun6i and H3 DO
> > program the clamp (see the "-" section above).
>
> And sun7i and R40, as well.
Yes, but you handle both above explicitly.
> It appears I simply read the #if
> defined(...) mess backwards. I'll fix that for v2. As a bonus, this
> lends itself to a rather nice refactoring of sunxi_cpu_set_power() where
> I can have the if block only determine the pwroff/clamp addresses, and
> have a single tail-call to sunxi_power_switch() at the bottom. Since the
> latter function is so simple, I may as well just inline it into
> sunxi_cpu_set_power() (which I suspect might be more readable).
Yes, any further simplification is welcome, and probably somewhat
rewarding in this case ;-)
Cheers,
Andre
More information about the U-Boot
mailing list