[U-Boot] [PATCH V2 1/3] gpio: Add DW APB GPIO driver

Simon Glass sjg at chromium.org
Wed Aug 12 19:24:48 CEST 2015


+Tom

Hi Fabio,

On 12 August 2015 at 08:24, Fabio Estevam <festevam at gmail.com> wrote:
>
> On Wed, Aug 12, 2015 at 11:15 AM, Simon Glass <sjg at chromium.org> wrote:
>
> >> +#define GPIO_SWPORTA_DR                0x00
> >> +#define GPIO_SWPORTA_DDR       0x04
> >> +#define GPIO_INTEN             0x30
> >> +#define GPIO_INTMASK           0x34
> >> +#define GPIO_INTTYPE_LEVEL     0x38
> >> +#define GPIO_INT_POLARITY      0x3c
> >> +#define GPIO_INTSTATUS         0x40
> >> +#define GPIO_PORTA_DEBOUNCE    0x48
> >> +#define GPIO_PORTA_EOI         0x4c
> >> +#define GPIO_EXT_PORTA         0x50
> >
> > What's the deal with C structures? Has the policy on this changed? I
>
> I thought we no longer need to access registers via structs, and
> accessing them via base + offset, like the kernel does is OK in
> U-boot:
> https://www.marc.info/?l=u-boot&m=142609602127309&w=2

Thanks for the link. No I did not know that.

Perhaps we should add the type-checking referred to in that thread?
What is it and who is doing it?

Regards,
Simon


More information about the U-Boot mailing list