[PATCH 9/9] arm/mach-pxa: add mioa701 board

Robert Jarzmik robert.jarzmik at free.fr
Fri Nov 25 16:50:02 EST 2011


Sascha Hauer <s.hauer at pengutronix.de> writes:

> On Thu, Nov 24, 2011 at 10:22:08PM +0100, Robert Jarzmik wrote:
>> Sascha Hauer <s.hauer at pengutronix.de> writes:
>> > Are the defines in this file used by generic code? If not, please put
>> > them into a board specific include file (or remove them if they are
>> > unused)
>> I intended to use these values in lowlevel_init.S. Isn't that the right place ?
>
> config.h in the board file is included by common.h and thus in nearly
> every compiled file. It is the config.h derived from U-Boot. Ideally
> this file should be empty. Creating some other include file in your
> board directory is just fine though.
Ok, I will empty it.

> BTW the generic lowlevel code in barebox is written in C and it also is
> for several boards. So when you can spare some bytes of SRAM I recommend
> to do it C. You can have a look for example at the pcm038 board. We also
> have a get_pc() function to determine whether we already run from SDRAM
> and thus should skip its initialization.
I was thinking I should write the IPL in lowlevel_init.S (the part which should
be in 0x800 bytes, and which will load the remaining of barebox from the
disk-on-chip ROM part at address 0).

I still don't know if I should design a separate assembly file from barebox, but
my goal was to have it all in barebox (like grub where there's a first stage of
512 bytes and another big stage).

> You should only initialize the barest minimum in lowlevel code. So when
> setup_gpios is not needed for initializing SDRAM you should not do it
> here.
Maybe. My idea was :
 - if power button is not pressed (GPIO0) and the reset is triggered by a
 power/true reset, the IPL will put back the cpu into deep-sleep
 - else light up the keyboard led
 - eventually put SDRAM out of self-refresh
 - eventually jump to resume vector if out of deep-sleep
 - read SPL from docg3
 - jump to SPL (ie. to barebox)

In order to achieve this, I need gpios in the first IPL to activate LEDs.

-- 
Robert



More information about the barebox mailing list