[PATCH 1/3] sunxi: psci: clean away preprocessor macros
Sam Edwards
cfsworks at gmail.com
Mon Aug 14 20:10:25 CEST 2023
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)?
> - 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. 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).
> Cheers,
> Andre
Likewise,
Sam
More information about the U-Boot
mailing list