[U-Boot] [PATCH] Add support for Faraday RTC IP FTRTC
Ratbert Po-Yu Chuang(莊博宇)
ratbert at faraday-tech.com
Wed Apr 1 05:38:03 CEST 2009
Dear Wolfgang Denk,
I am a newbie and I have not realized all the rules, so I
have some questions.
On Tue Mar 31 12:24:03 CEST 2009, you wrote:
> > +static unsigned int rtc = CONFIG_SYS_RTC_BASE;
>
> Please use a proper C structure to describe the RTC; do not use base
> address plus offsets.
Do you mean U-Boot prefers to use structure to describe
registers? What if there were large gaps between registers?
For example, in our ethernet IP FTMAC100, there is nothing
in 0x34 - 0x84, 0xa0 - 0xc0. Should I use structure to
describe it?
I thought that placing a lot of paddings in a structure is ulgy.
How do you think? Is there a guideline about this?
Also in drivers/rtc/pl031.c, the RTC_WRITE_REG and
RTC_READ_REG use base + offset.
> outl() is not portable across architectures?
> inl() is not portable across architectures?
Sorry I don't understand.
There are outl() and inl() in most architectures except blackfin,
i386 and sparc. And the outl() and the inl() I use are arm ones.
Which macros should I use?
> > + debug("rtc_get(): record register: %x\n", inl(rtc + FTRTC_OFFSET_RECORD));
>
> Line too long.
Sorry, this is my fault. I will fix them.
Best Regards,
Po-Yu Chuang (莊博宇)
=== Faraday Technology Corporation, Headquarters TW ===
= 智原科技股份有限公司
= Dept.: CTD/SD/SSD
= Tel : 886-3-578-7888 Ext:8818
= Fax : 886-3-666-3958
= Email: ratbert at faraday-tech.com
= WWW : www.faraday-tech.com
=======================================================
********************* Confidentiality Notice ************************
This electronic message and any attachments may contain
confidential and legally privileged information or
information which is otherwise protected from disclosure.
If you are not the intended recipient,please do not disclose
the contents, either in whole or in part, to anyone,and
immediately delete the message and any attachments from
your computer system and destroy all hard copies.
Thank you for your cooperation.
***********************************************************************
More information about the U-Boot
mailing list