From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [u-boot] [PATCH][1/2] mx27: Add necessary defines and helper functions to support I2C in i.MX27.
Date: Mon, 02 Nov 2009 08:35:32 +0100 [thread overview]
Message-ID: <4AEE8BC4.70809@denx.de> (raw)
In-Reply-To: <eedb5540911020010j64bb0d9cxe0dab22d4b913a9b@mail.gmail.com>
Hello javier,
javier Martin wrote:
> 2009/11/2 Heiko Schocher <hs@denx.de>:
>> Hello Javier,
>>
>> Javier Martin wrote:
>>> Add proper register definitions, macros and clock functions required
>>> for I2C driver to be developed.
>>>
>>>
>>>
>>> Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
>>> --
>>> diff --git a/cpu/arm926ejs/mx27/generic.c b/cpu/arm926ejs/mx27/generic.c
>>> index 808371f..540ef0c 100644
>> [...]
>>> diff --git a/include/asm-arm/arch-mx27/imx-regs.h b/include/asm-arm/arch-mx27/imx-regs.h
>>> index d36a6da..2b89b4e 100644
>>> --- a/include/asm-arm/arch-mx27/imx-regs.h
>>> +++ b/include/asm-arm/arch-mx27/imx-regs.h
>>> @@ -206,6 +206,10 @@ struct iim_regs {
>>> };
>>> #endif
>>>
>>> +#define __REG(x) (*((volatile u32 *)(x)))
>>> +#define __REG16(x) (*((volatile u16 *)(x)))
>>> +#define __REG8(x) (*((volatile u8 *)(x)))
>>> +
>> Why you need this? Couldn;t you use io accessor from asm/io.h?
>
> Hi Heiko,
> thank you for the comments. I think that would make the driver dirty
> since there would also be needed the use of an ifdef to separate
> i.MX31 reg accesses, which are accessed through __REG() macros, from
> i.MX27 ones which should be accessed by io accessors from io.h. If you
> do not have any complaint about that I will use functions from
> asm/io.h.
No, that is suboptimal, I thought more in the direction to cleanup
the driver ;-)
I see no reason, why the i.mx31 shouldn;t be able to use also the
io accessors from asm/io.h ... Tom, any suggestions?
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
prev parent reply other threads:[~2009-11-02 7:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-30 14:43 [U-Boot] [u-boot] [PATCH][1/2] mx27: Add necessary defines and helper functions to support I2C in i.MX27 Javier Martin
2009-11-02 7:07 ` Heiko Schocher
2009-11-02 8:10 ` javier Martin
2009-11-02 7:35 ` Heiko Schocher [this message]
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=4AEE8BC4.70809@denx.de \
--to=hs@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