From: Ajay Bhargav <ajay.bhargav@einfochips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] Armada100: Ethernet support for Marvell gplugD
Date: Fri, 8 Jul 2011 17:33:12 +0530 (IST) [thread overview]
Message-ID: <107544326.47582.1310126592414.JavaMail.root@ahm.einfochips.com> (raw)
In-Reply-To: <751999513.47571.1310126396909.JavaMail.root@ahm.einfochips.com>
Dear Wolfdang,
I did get your point sir, but...
> To me this looks different.
> - Do not use a "base address + offset" notation (with a declartion of
> register offsets in your header files), but use C structs instead to
> describe the regioster layout, and then use proper I/O accessor
> functions on them.
asm/arch-kirkwood/gpio.h)>
#define GPIO_OFF(pin) (((pin) >> 5) ? 0x0040 : 0x0000)
#define GPIO_OUT(pin) (KW_GPIO0_BASE + GPIO_OFF(pin) + 0x00)
#define GPIO_IO_CONF(pin) (KW_GPIO0_BASE + GPIO_OFF(pin) + 0x04)
#define GPIO_REG(x) (GPIO_REGS_VIRT + (x))
#define GPLR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x00)
#define GPDR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x0c)
> - Do not implement your own GPIO framework, but instead use existing
> code.
I did not tried anything on my own. I just tried similar things which were done
by others already. I hope I am able to highlight what i am trying to say.
Regards,
Ajay Bhargav
next parent reply other threads:[~2011-07-08 12:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <751999513.47571.1310126396909.JavaMail.root@ahm.einfochips.com>
2011-07-08 12:03 ` Ajay Bhargav [this message]
2011-07-08 12:39 ` [U-Boot] [PATCH 1/4] Armada100: Ethernet support for Marvell gplugD Wolfgang Denk
[not found] <422945680.47818.1310129034861.JavaMail.root@ahm.einfochips.com>
2011-07-08 12:48 ` Ajay Bhargav
2011-07-08 14:59 ` Prafulla Wadaskar
[not found] <1773826644.46838.1310120108778.JavaMail.root@ahm.einfochips.com>
2011-07-08 10:23 ` Ajay Bhargav
2011-07-08 11:29 ` Wolfgang Denk
[not found] <1707892633.46126.1310116683428.JavaMail.root@ahm.einfochips.com>
2011-07-08 9:32 ` Ajay Bhargav
2011-07-08 10:17 ` Wolfgang Denk
2011-07-08 15:06 ` Prafulla Wadaskar
[not found] <1361369926.45813.1310113039881.JavaMail.root@ahm.einfochips.com>
2011-07-08 8:17 ` Ajay Bhargav
2011-07-08 6:22 Ajay Bhargav
2011-07-08 7:47 ` Wolfgang Denk
2011-07-08 15:19 ` Prafulla Wadaskar
2011-07-11 4:42 ` Ajay Bhargav
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=107544326.47582.1310126592414.JavaMail.root@ahm.einfochips.com \
--to=ajay.bhargav@einfochips.com \
--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