* [U-Boot-Users] AT91 Header File Clarification
@ 2008-04-04 20:32 Zac Wheeler
2008-04-04 22:25 ` Stelian Pop
0 siblings, 1 reply; 6+ messages in thread
From: Zac Wheeler @ 2008-04-04 20:32 UTC (permalink / raw)
To: u-boot
I have a question about the arrangement of include files for the
at91sam9 family.
Is the intention that asm/arch/at91_xxx.h be applicable for all
at91sam9 microcontrollers, or should they be broken down into subarch
folders (e.g. asm/arch/at91sam9261/at91_pmc.h)?
I am trying to bring up the at91sam9261 on a custom board a little
ahead of what appears to be the schedule for the at91sam9261ek and I
want to try to be compatible with the existing format. I haven't done
a lot of comparisons between 9260/9261/9263, but for some things (e.g.
at91_lcd.h) it obviously depends on which microcontroller you're
using.
Thanks,
Zac
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] AT91 Header File Clarification
2008-04-04 20:32 [U-Boot-Users] AT91 Header File Clarification Zac Wheeler
@ 2008-04-04 22:25 ` Stelian Pop
2008-04-04 23:32 ` Zac Wheeler
2008-04-05 2:08 ` Zac Wheeler
0 siblings, 2 replies; 6+ messages in thread
From: Stelian Pop @ 2008-04-04 22:25 UTC (permalink / raw)
To: u-boot
Le vendredi 04 avril 2008 ? 13:32 -0700, Zac Wheeler a ?crit :
> I have a question about the arrangement of include files for the
> at91sam9 family.
>
> Is the intention that asm/arch/at91_xxx.h be applicable for all
> at91sam9 microcontrollers, or should they be broken down into subarch
> folders (e.g. asm/arch/at91sam9261/at91_pmc.h)?
They are supposed to be shareable for all at91sam microcontrollers, in
the same way it's done in Linux.
> I am trying to bring up the at91sam9261 on a custom board a little
> ahead of what appears to be the schedule for the at91sam9261ek and I
> want to try to be compatible with the existing format.
I'm working on support for the at91sam9261, I will probably have a patch
for the end of the next week. Hopefully you can wait until then. If not,
please go ahead.
> I haven't done
> a lot of comparisons between 9260/9261/9263, but for some things (e.g.
> at91_lcd.h)
There is no such file in u-boot, nor linux iirc. There is a atmel_lcdc.h
in Linux (and I plan importing it into U-Boot, but later...).
Stelian.
--
Stelian Pop <stelian@popies.net>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] AT91 Header File Clarification
2008-04-04 22:25 ` Stelian Pop
@ 2008-04-04 23:32 ` Zac Wheeler
2008-04-05 18:02 ` Stelian Pop
2008-04-05 2:08 ` Zac Wheeler
1 sibling, 1 reply; 6+ messages in thread
From: Zac Wheeler @ 2008-04-04 23:32 UTC (permalink / raw)
To: u-boot
On Fri, Apr 4, 2008 at 3:25 PM, Stelian Pop <stelian@popies.net> wrote:
>
> Le vendredi 04 avril 2008 ? 13:32 -0700, Zac Wheeler a ?crit :
>
> > I have a question about the arrangement of include files for the
> > at91sam9 family.
> >
> > Is the intention that asm/arch/at91_xxx.h be applicable for all
> > at91sam9 microcontrollers, or should they be broken down into subarch
> > folders (e.g. asm/arch/at91sam9261/at91_pmc.h)?
>
> They are supposed to be shareable for all at91sam microcontrollers, in
> the same way it's done in Linux.
So should things like AT91_ECC as defined in at91sam960.h be
AT91SAM9260_ECC instead or moved to an at91_sys.h file? It seems
somewhat dangerous to define an AT91_ in a AT91SAM9260-specific file.
Sorry for my lack of understanding if I'm missing the point.
Zac
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] AT91 Header File Clarification
2008-04-04 23:32 ` Zac Wheeler
@ 2008-04-05 18:02 ` Stelian Pop
0 siblings, 0 replies; 6+ messages in thread
From: Stelian Pop @ 2008-04-05 18:02 UTC (permalink / raw)
To: u-boot
Le vendredi 04 avril 2008 ? 16:32 -0700, Zac Wheeler a ?crit :
> On Fri, Apr 4, 2008 at 3:25 PM, Stelian Pop <stelian@popies.net> wrote:
> >
> > Le vendredi 04 avril 2008 ? 13:32 -0700, Zac Wheeler a ?crit :
> >
> > > I have a question about the arrangement of include files for the
> > > at91sam9 family.
> > >
> > > Is the intention that asm/arch/at91_xxx.h be applicable for all
> > > at91sam9 microcontrollers, or should they be broken down into subarch
> > > folders (e.g. asm/arch/at91sam9261/at91_pmc.h)?
> >
> > They are supposed to be shareable for all at91sam microcontrollers, in
> > the same way it's done in Linux.
>
> So should things like AT91_ECC as defined in at91sam960.h be
> AT91SAM9260_ECC instead or moved to an at91_sys.h file?
No, the idea is to keep the same conventions as the kernel guys. In fact
the header files have been copied from Linux, and are 95% identical to
them (we cannot use the header files provided by Atmel, because there is
too much craft inside, and rewriting a third form of the same headers
seemed to me too error prone).
As for AT91_ECC:
at91cap9.h:#define AT91_ECC (0xffffe200 - AT91_BASE_SYS)
at91sam9260.h:#define AT91_ECC (0xffffe800 - AT91_BASE_SYS)
at91sam9263.h:#define AT91_ECC0 (0xffffe000 - AT91_BASE_SYS)
at91sam9263.h:#define AT91_ECC1 (0xffffe600 - AT91_BASE_SYS)
at91sam9rl.h:#define AT91_ECC (0xffffe800 - AT91_BASE_SYS)
seems to me quite nice this way !
> It seems
> somewhat dangerous to define an AT91_ in a AT91SAM9260-specific file.
It shouldn't be. All the AT91 platforms have pretty much the same
hardware, so having the same constants means we don't need extra #ifdefs
in the driver code.
Of course, one should take care of including only the header file which
goes with his platform. This is what
include/asm-arm/arch-at91sam9/hardware.h does: based on what
CONFIG_AT91xxxxx is defined, the relevant platform specific header file
is included.
Stelian.
--
Stelian Pop <stelian@popies.net>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] AT91 Header File Clarification
2008-04-04 22:25 ` Stelian Pop
2008-04-04 23:32 ` Zac Wheeler
@ 2008-04-05 2:08 ` Zac Wheeler
2008-04-05 16:46 ` Stelian Pop
1 sibling, 1 reply; 6+ messages in thread
From: Zac Wheeler @ 2008-04-05 2:08 UTC (permalink / raw)
To: u-boot
On Fri, Apr 4, 2008 at 3:25 PM, Stelian Pop <stelian@popies.net> wrote:
>
> Le vendredi 04 avril 2008 ? 13:32 -0700, Zac Wheeler a ?crit :
>
> > I have a question about the arrangement of include files for the
> > at91sam9 family.
> >
> > Is the intention that asm/arch/at91_xxx.h be applicable for all
> > at91sam9 microcontrollers, or should they be broken down into subarch
> > folders (e.g. asm/arch/at91sam9261/at91_pmc.h)?
>
> They are supposed to be shareable for all at91sam microcontrollers, in
> the same way it's done in Linux.
>
>
> > I am trying to bring up the at91sam9261 on a custom board a little
> > ahead of what appears to be the schedule for the at91sam9261ek and I
> > want to try to be compatible with the existing format.
>
> I'm working on support for the at91sam9261, I will probably have a patch
> for the end of the next week. Hopefully you can wait until then. If not,
> please go ahead.
>
>
> > I haven't done
> > a lot of comparisons between 9260/9261/9263, but for some things (e.g.
> > at91_lcd.h)
>
> There is no such file in u-boot, nor linux iirc. There is a atmel_lcdc.h
> in Linux (and I plan importing it into U-Boot, but later...).
There is an at91_lcdc.h in Linux, but you're right, atmel_lcdc.h
appears to be the one that is used for the actual driver.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] AT91 Header File Clarification
2008-04-05 2:08 ` Zac Wheeler
@ 2008-04-05 16:46 ` Stelian Pop
0 siblings, 0 replies; 6+ messages in thread
From: Stelian Pop @ 2008-04-05 16:46 UTC (permalink / raw)
To: u-boot
Le vendredi 04 avril 2008 ? 19:08 -0700, Zac Wheeler a ?crit :
> > There is no such file in u-boot, nor linux iirc. There is a atmel_lcdc.h
> > in Linux (and I plan importing it into U-Boot, but later...).
>
> There is an at91_lcdc.h in Linux,
Was. It was removed in 2.6.25-rc1.
> but you're right, atmel_lcdc.h
> appears to be the one that is used for the actual driver.
>
--
Stelian Pop <stelian@popies.net>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-05 18:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-04 20:32 [U-Boot-Users] AT91 Header File Clarification Zac Wheeler
2008-04-04 22:25 ` Stelian Pop
2008-04-04 23:32 ` Zac Wheeler
2008-04-05 18:02 ` Stelian Pop
2008-04-05 2:08 ` Zac Wheeler
2008-04-05 16:46 ` Stelian Pop
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox