[U-Boot] [PATCH V2 2/3] mx7: psci: add basic psci support

Fabio Estevam festevam at gmail.com
Tue Oct 20 12:50:14 CEST 2015


On Tue, Oct 20, 2015 at 3:59 AM, Peng Fan <Peng.Fan at freescale.com> wrote:

> +static inline void psci_writel(u32 value, u32 reg)
> +{
> +       *(volatile u32 *)reg = value;
> +}
> +
> +static inline int psci_readl(u32 reg)
> +{
> +       return *(volatile u32*)reg;
> +}

Do you really need psci_writel() psci_readl() functions? Why not
simple call writel and readl instead?

> +/* enable all periherial can be access in nosec mode */
> +static void init_csu(void)
> +{
> +       int i = 0;
> +       for (i = 0; i < 64; i++)
> +               writel(0x00FF00FF, 0x303e0000 + i * 4);

Lots of magic values here. Please add defines for improving code readability.

Thanks


More information about the U-Boot mailing list