Skip to contentSkip to conversation

[U-Boot] [ppc440epx : memory extention]

U-Boot sean 2 participants 2 messages Sep 16, 2008

lore
Share & tools
lore

sean

author
#0 lore raw

I'd like to extend capacity of DDR2 memory from 256MB to 512MB on my custumn board.

EV Board(SEQUOIA) has 256MB DDR2 memory.

When I reset the U-Boot program, U-boot show me the SDRAM test fail message like below.

DRAM: 512MB

SDRAM test fails at : 00000000

What should I do to upgrade DDR2 memory??

I have only modified follow sessions of U-Boot Code. Is it right??

1) Sequoia.h

#define CFG_MBYTES_SDRAM (512)

2) Sdram.c

           /* For 512M DDR Registers */

           mtsdram(DDR0_02, 0x00000000);

 

           mtsdram(DDR0_00, 0x0000190A);

           mtsdram(DDR0_01, 0x01000000);

           mtsdram(DDR0_03, 0x02050A02);

           mtsdram(DDR0_04, 0x08020100);

           mtsdram(DDR0_05, 0x02020206);

           mtsdram(DDR0_06, 0x0102C811);

           mtsdram(DDR0_07, 0x00070100);

           mtsdram(DDR0_08, 0x04c80001);

           mtsdram(DDR0_09, 0x00011D5F);

           mtsdram(DDR0_10, 0x00000300);

           mtsdram(DDR0_11, 0x0013C800);

           mtsdram(DDR0_12, 0x00000003);

           mtsdram(DDR0_14, 0x00000000);

           mtsdram(DDR0_17, 0x19000000);

           mtsdram(DDR0_18, 0x19191919);

           mtsdram(DDR0_19, 0x19191919);

           mtsdram(DDR0_20, 0x0B0B0B0B);

           mtsdram(DDR0_21, 0x0B0B0B0B);

           mtsdram(DDR0_22, 0x00267F0B);

           mtsdram(DDR0_23, 0x00000000);

           mtsdram(DDR0_24, 0x01010002);

           mtsdram(DDR0_26, 0x246e0408);

           mtsdram(DDR0_27, 0x0000682B);

           mtsdram(DDR0_28, 0x00000000);

           mtsdram(DDR0_31, 0x00000000);

           mtsdram(DDR0_42, 0x0100000A);

           mtsdram(DDR0_43, 0x020A0201);

           mtsdram(DDR0_44, 0x00000002);

           mtsdram(DDR0_02, 0x00000001);

And should I modify on table entry(in init.s)

tlbentry( CFG_SDRAM_BASE, SZ_256M, CFG_SDRAM_BASE, 0, AC_R|AC_W|AC_X|SA_G)

#1 lore raw
Quoted 2 lines · sean

I'd like to extend capacity of DDR2 memory from 256MB to 512MB on my custumn board.

So you have a custom board port for your specific board, correct? Is the DDR2 hardware design similar to the one on Sequoia? What are the differences here?

Quoted 15 lines

EV Board(SEQUOIA) has 256MB DDR2 memory.

When I reset the U-Boot program, U-boot show me the SDRAM test fail message like below.

DRAM: 512MB

SDRAM test fails at : 00000000

Quoted 7 lines

What should I do to upgrade DDR2 memory??

I have only modified follow sessions of U-Boot Code. Is it right??

1) Sequoia.h

#define CFG_MBYTES_SDRAM (512)

Yes.

Quoted 5 lines

2) Sdram.c

           /* For 512M DDR Registers */

           mtsdram(DDR0_02, 0x00000000);

<snip>

Can't comment here. This is really complex and pretty board/DDR2 specific.

Quoted 3 lines

And should I modify on table entry(in init.s)

tlbentry( CFG_SDRAM_BASE, SZ_256M, CFG_SDRAM_BASE, 0, AC_R|AC_W|AC_X|SA_G)

Yes, you need to add another TLB entry for the 2nd 256MB. Or you could remove those entries completely and use program_tlb() to add the TLB(s).

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================