[U-Boot] [PATCH] at91: Add support for MEESC board of esd gmbh
Matthias Fuchs
matthias.fuchs at esd.eu
Mon May 25 11:09:55 CEST 2009
On Monday 25 May 2009 10:13, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 08:21 Mon 25 May , Daniel Gorsulowski wrote:
> > Jean-Christophe PLAGNIOL-VILLARD schrieb:
> > >> +
> > >> +static void meesc_ethercat_hw_init(void)
> > >> +{
> > >> + /* Configure SMC EBI1_CS0 for EtherCAT */
> > >> + at91_sys_write(AT91_SMC1_SETUP(0),
> > >> + AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) |
> > >> + AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0));
> > >> + at91_sys_write(AT91_SMC1_PULSE(0),
> > >> + AT91_SMC_NWEPULSE_(4) | AT91_SMC_NCS_WRPULSE_(9) |
> > >> + AT91_SMC_NRDPULSE_(4) | AT91_SMC_NCS_RDPULSE_(9));
> > >> + at91_sys_write(AT91_SMC1_CYCLE(0),
> > >> + AT91_SMC_NWECYCLE_(10) | AT91_SMC_NRDCYCLE_(5));
> > >> + /* Configure behavior at external wait signal, byte-select mode, 16 bit
> > >> + data bus width, none data float wait states and TDF optimization */
> > >> + at91_sys_write(AT91_SMC1_MODE(0),
> > >> + AT91_SMC_READMODE | AT91_SMC_EXNWMODE_READY |
> > >> + AT91_SMC_BAT_SELECT | AT91_SMC_DBW_16 | AT91_SMC_TDF_(0) |
> > >> + AT91_SMC_TDFMODE);
> > >> +
> > >> + /* Configure RDY/BSY */
> > >> + at91_set_B_periph(AT91_PIN_PE20, 0); /* EBI1_NWAIT */
> > > do you really need this
Yes.
> > > you do not seems to use it anywhere?
Right, at least not in U-Boot. All hardware specific initialisation is done in this board specific
code. So our OS can access the peripheral without knowing anything about a "SMC", "EBI1" and
so on. On some of our boards we use a couple of different OS - not only Linux - especially in
this case on MEESC. And it's a lot of work to add low level hardware setup in every OS' BSP.
That's why U-Boot's board specific code is a good place for this.
> > Yes, I really need this for debugging the ET1100 and for accessing its process
> > memory by md/mw/mm.
> ok maybe a note in a README will be nice
What kind of README do you think of? The comments are totally clear and of course the
best place for this kind of documentation. There is no need to add this stuff to
any other board.
I think there are other things that need to be discussed. Let's say a hyper generic way to
control LEDs :-)
Matthias
More information about the U-Boot
mailing list