This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP3530 SW Booting Configuration

Hello,

I am trying to make use of the SW booting (Page 3381 in the TRM) but so far I have not had a lot of luck with it.

What I would like to do is have something like:

- Normally boot from MMC

- If x-load detects some condition, e.g. a button is held down, configure a different boot device using the SW booting configuration, then reset.

 

So, when x-load detects the right condition:

- Write 0x4800 2920 to 0x4800 2910 (the magic address in the scratchpad)

- At 0x4800 2920, write 0xCF00 AA01  // Magic value from TRM

- At 0x4800 2924, write 0x0000 000C  // Size of SW boot structure, again from TRM

- At 0x4800 2928, write 0x0000 0011  // Let's try and boot from USB

- At 0x4800 292C, write 0x0000 0000  // Don't care about 2nd or 3rd boot devices

- At 0x4800 2930, write 0x0000 0000  // Don't care about 4th boot device, and reserved.

- Reset by setting DPPL3 reset in PRM_RSTCTRL

 

If any one can spot the error in this or has some working code they could share with me I would appreciate it :).

Thank you in advance,

Richard.

  • With further thought and coffee I now have this working.

    - The reset was incorrect, the TRM had suggested that DPPL3 reset is a treated as a cold reset which I *think* means the software boot is ignored. Therefore this should have set RST_GS instead (in the same register).

    The reason I was doing the reset this way was, RST_GS caused our dev board to lock up, but this was caused by an invalid SW booting configuration. Presumably it was trying to boot of a device I didn't expect?!

    The other problem was the write to 0x4800 2928 should have been 0x0011 0000. Basically the two 2-byte values were the other way around to what I was expecting.

     

    So for the benefit of any one else trying to do this, here is my final code for x-load:

    #include <asm/io.h>

    // SW Boot config (see page 2719 of TRM)

    // Set the first scratch pad location to contain the address of where we will put the SW booting configuration structure

    __raw_writel(0x48002920, 0x48002910);

    // Set section 1 key

    __raw_writel(0xCF00AA01, 0x48002920);

    // Set section 1 size

    __raw_writel(0x0000000C, 0x48002924);

    // Don't mask CH, Disable speed up, boot from USB

    __raw_writel(0x00110100, 0x48002928);

    // No 2nd or 3rd device

    __raw_writel(0x00000000, 0x4800292C);

    // No 4th device

    __raw_writel(0x00000000, 0x48002930);

    // Global software reset
    __raw_writel(0x2, 0x48307250);

     

    Regards,

    Richard.