From: Wolfgang Denk Date: Wed, 20 Jul 2011 08:02:34 +0200 Subject: [U-Boot] [PATCH 1/4] gpio: Adds GPIO driver support for Armada100 In-Reply-To: <1207509190.33599.1311140198703.JavaMail.root@ahm.einfochips.com> References: <1207509190.33599.1311140198703.JavaMail.root@ahm.einfochips.com> Message-ID: <20110720060234.E72941579DF2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Ajay Bhargav, In message <1207509190.33599.1311140198703.JavaMail.root@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_