public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] gpio: Adds GPIO driver support for Armada100
Date: Wed, 20 Jul 2011 14:09:32 +0200	[thread overview]
Message-ID: <20110720120932.82ACC1579DF2@gemini.denx.de> (raw)
In-Reply-To: <794341286.33968.1311143785027.JavaMail.root@ahm.einfochips.com>

Dear Ajay Bhargav,

In message <794341286.33968.1311143785027.JavaMail.root@ahm.einfochips.com> you wrote:
> 
> > Is there any specific reason for not using u32 for the padding as
> > well?
> > 
> nothing specific. It makes easy to find number of bytes than words.

If there is no specific reason (which I could not think of either),
then please use u32 consistently.

If you think in number of bytes, feel free to write

	u32	reserved[128/sizeof(u32)];

> > Why would you need this BASE + OFFSET notation when using a C struct
> > for the registers? Thi smakes little sense to me.
> 
> Well I did use the C struct method, if you see my patches submitted earlier
> but according to Prafulla and Lie structure size is too big. so they want me

Who cares about the size of the struct?  We never alocate any memory
for such a structure - it is just an overlay over the existing
register space, so nobody cares if this is 16 kB of 16 MB.

> to use a mix of C struct and BASE + OFFSET notation. so I thought to break the big
> C struct into smaller grouped structures pointing each group with GPIO base + group
> offset. I would be glad if you can suggest me something better or smarter.

This may make sense of you have separate, logically independent IP
blocks.  But the reason for such a desicion is if the data belong
together in any way or not.

The "size" of such a structure is completely irrelevant.

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
Pray to God, but keep rowing to shore. - Russian Proverb

  parent reply	other threads:[~2011-07-20 12:09 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <814164661.33093.1311137863843.JavaMail.root@ahm.einfochips.com>
2011-07-20  5:36 ` [U-Boot] [PATCH 1/4] gpio: Adds GPIO driver support for Armada100 Ajay Bhargav
2011-07-20  6:02   ` Wolfgang Denk
2011-07-20  6:36     ` Ajay Bhargav
2011-07-20 10:08       ` Lei Wen
2011-07-20 10:43         ` Ajay Bhargav
2011-07-20 12:18           ` Lei Wen
2011-07-20 12:20             ` Ajay Bhargav
2011-07-20 12:19           ` Wolfgang Denk
2011-07-20 12:09       ` Wolfgang Denk [this message]
     [not found] <1287709675.34262.1311146613076.JavaMail.root@ahm.einfochips.com>
2011-07-20  7:29 ` Ajay Bhargav
2011-07-20  7:48   ` Lei Wen
2011-07-20  7:54     ` Ajay Bhargav
     [not found] <952685375.34177.1311145646630.JavaMail.root@ahm.einfochips.com>
2011-07-20  7:14 ` Ajay Bhargav
2011-07-20  7:28   ` Lei Wen
     [not found] <550445252.29883.1311070783386.JavaMail.root@ahm.einfochips.com>
2011-07-19 10:29 ` Ajay Bhargav
2011-07-19 17:36   ` Prafulla Wadaskar
2011-07-20  7:13   ` Lei Wen
2011-07-18  9:41 Ajay Bhargav
2011-07-18 17:45 ` Mike Frysinger
2011-07-18 19:01 ` Prafulla Wadaskar
2011-07-19  4:04   ` Lei Wen
2011-07-19  4:01     ` Ajay Bhargav
2011-07-19  4:14       ` Lei Wen
2011-07-19  4:14         ` Ajay Bhargav
2011-07-20  3:49           ` Prafulla Wadaskar
2011-07-19  5:27     ` Wolfgang Denk
2011-07-19  5:55       ` Lei Wen
2011-07-19  4:23   ` Ajay Bhargav
2011-07-19 17:36     ` Prafulla Wadaskar
2011-07-20  7:11     ` Lei Wen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110720120932.82ACC1579DF2@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox