[U-Boot] [PATCH 1/4] gpio: Adds GPIO driver support for Armada100

Wolfgang Denk wd at denx.de
Wed Jul 20 08:02:34 CEST 2011


Dear Ajay Bhargav,

In message <1207509190.33599.1311140198703.JavaMail.root at ahm.einfochips.com> you wrote:
> 
> e.g. 
> struct armdgpio_gplr_register {
>     u32 gplr0;
>     u32 gplr1;
>     u32 gplr2;
>     u8 pad[some_value]; //this padding is going to be big
>     u32 gplr3;
> }

Is there any specific reason for not using u32 for the padding as
well?

> then while using this particular set i can just use ARMD1_GPLR_BASE
> ( ARMD1_GPIO_BASE + GPLR_OFFSET). moreover i am not using all the
> registers so i define only those register sets which are in use. what
> you say about this?

Why would you need this BASE + OFFSET notation when using a C struct
for the registers? Thi smakes little sense to me.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The thing is, as you progress in the Craft,  you'll  learn  there  is
another rule... When you break rules, break 'em good and hard.
                                    - Terry Pratchett, _Wyrd Sisters_


More information about the U-Boot mailing list