[U-Boot] [PATCH v2 2/6] ARM: hi6220: Add register and bitfield definition header files.

Peter Griffin peter.griffin at linaro.org
Wed Jul 29 23:07:40 CEST 2015


Hi Simon,

On 18 July 2015 at 15:37, Simon Glass <sjg at chromium.org> wrote:

> Hi Peter,
>
> On 8 July 2015 at 09:57, Peter Griffin <peter.griffin at linaro.org> wrote:
> > This patch adds the header files which will be used in the subsquent
> > board / drivers to enable support for hi6220 hikey board.
> >
> > Signed-off-by: Peter Griffin <peter.griffin at linaro.org>
> > ---
> >  arch/arm/include/asm/arch-hi6220/hi6220.h          | 324
> +++++++++++++++++++
> >  .../include/asm/arch-hi6220/hi6220_regs_alwayson.h | 349
> +++++++++++++++++++++
> >  2 files changed, 673 insertions(+)
> >  create mode 100644 arch/arm/include/asm/arch-hi6220/hi6220.h
> >  create mode 100644
> arch/arm/include/asm/arch-hi6220/hi6220_regs_alwayson.h
> >
> > diff --git a/arch/arm/include/asm/arch-hi6220/hi6220.h
> b/arch/arm/include/asm/arch-hi6220/hi6220.h
> > new file mode 100644
> > index 0000000..3ddec91
> > --- /dev/null
> > +++ b/arch/arm/include/asm/arch-hi6220/hi6220.h
> > @@ -0,0 +1,324 @@
> > +/*
> > + * (C) Copyright 2015 Linaro
> > + * Peter Griffin <peter.griffin at linaro.org>
> > + *
> > + * SPDX-License-Identifier:    GPL-2.0+
> > + */
> > +
> > +#ifndef __HI6220_H__
> > +#define __HI6220_H__
> > +
> > +#include "hi6220_regs_alwayson.h"
> > +
> > +#define HI6220_MMC0_BASE                       0xF723D000
> > +#define HI6220_MMC1_BASE                       0xF723E000
> > +
> > +#define HI6220_PMUSSI_BASE                     0xF8000000
> > +
> > +#define HI6220_PERI_BASE                       0xF7030000
> > +
> > +#define PERI_SC_PERIPH_CTRL1                   (HI6220_PERI_BASE +
> 0x000)
> > +
>
> I think you should have:
>
> struct peri_sc_regs {
>    u32 ctrl1;
>    u32 ctrl2;
> ...
> };
>
> U-Boot uses structs for I/O access.
>

Phew...I've converted it over to structs for register access.
It actually took quite a long time to do, but it all works again now :)

So it will be using structs for I/O access in V3.

regards,

Peter.


More information about the U-Boot mailing list