2010-03-19 09:52:16     U-boot - changing size of SDRAM BF537

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

2010-03-19 09:52:16     U-boot - changing size of SDRAM BF537

Mads le maire (NORWAY)

Message: 87480   

 

Hello,

 

I have a  problem porting U-boot  to new hardware. I have two different hardware platforms:

 

Platform 1:  BF537 with 16 mb SDRAM currently running U-boot 1.1.3-ADI-2006R1, working fine.

 

Platform 2: BF537 with 64 mb SDRAM currently running U-boot 2008.10-svn562 (ADI-2009R1-rc3), working fine.

 

What I need to do is to port the ADI-2009R1-rc3 version to Platform 1. Initially, I just modified the CONFIG_MEM_SIZE from 64 to 16 and the CONFIG_MEM_ADD_WDTH from 10 to 8. This did not work. Enabling Early printout show the following text:

 

*******************************************************

 

## Starting application at 0x00800000 ...

Early:start.S: Init Registers

Early:start.S: Find ourselves

Early:start.S: Program Clocks

ABCDEGHI!JK!LMNOPQST>

àþ

*******************************************************

 

After this, there is no communication.

 

Going back to platform 2, I did a single change, setting CONFIG_MEM_SIZE from 64 to 16 and buildt the bootloader. The new bootloader was not working, and show  the same problem as Platform 1. I put in some extra output in the /cpu/blackfin/start.S and finally ending up with the conclution that I do not survive the call (p3) which I belive execute init code in internal SRAM. I have carefully studied the map files for both the 16 and 64 mb compilation, found them to be identical line by line exept for code was placed at 00f80000 for the 16 mb build and 03f80000 for the 64 mb build.

 

Am I missing some settings?

 

*********** From cpu/blackfin/start.S *********************

 

.Ldma_and_reprogram:

    r0.l = LO(L1_INST_SRAM);

    r0.h = HI(L1_INST_SRAM);

    r1.l = __initcode_start;

    r1.h = __initcode_start;

    r2.l = __initcode_end;

    r2.h = __initcode_end;

    r2 = r2 - r1;    /* convert r2 into length of initcode */

    r1 = r1 - r4;    /* convert r1 from load address of initcode ... */

    r1 = r1 + r5;    /* ... to current (not load) address of initcode */

    p3 = r0;

    call _dma_memcpy_nocache;

    r0 = 0 (x);    /* set bootstruct to NULL */

    serial_early_puts("test-1");

    call (p3);

    serial_early_puts("test-2");

*******************************************************************

 

 

regards mads-l

 

QuoteReplyEditDelete

 

 

2010-03-19 12:26:07     Re: U-boot - changing size of SDRAM BF537

Mike Frysinger (UNITED STATES)

Message: 87484   

 

as the documentation explains, that early serial debug output indicates a problem with the sdram setup.  make sure your timings are actually correct wrt your CCLK/SCLK.

 

there is a spread sheet to assist you:

http://docs.blackfin.uclinux.org/doku.php?id=bfin:sdram

QuoteReplyEditDelete

 

 

2010-03-19 15:20:45     Re: U-boot - changing size of SDRAM BF537

Kanwar Saad (PAKISTAN)

Message: 87487   

 

yes you have to set timing parameters of your RAM's too. A quick solution will be to copy these parameters from your old u-boot's board configuration file.

QuoteReplyEditDelete

 

 

2010-03-23 03:28:54     Re: U-boot - changing size of SDRAM BF537

Mads le maire (NORWAY)

Message: 87617   

 

Thanks for helping me out, there was problems with DRAM. Loading a modified new bootloader bypassing the DRAM initialisation, gave me the possibility to dump and inspect the EBIU-DRAM configuration. Seems that the SDBCTLregister was set up with a 8 bits column address instead of 9 with the configuration constants imported from the old bootloader. However, defining the registervalues directly (CONFIG_EBIU_SDRRC_VAL, CONFIG_EBIU_SDGCTL_VAL, CONFIG_EBIU_SDBCTL_VAL) worked fine!

 

Mads-l

Attachments

    Outcomes