Using both memory banks for 256Mb DRAM in AT91SAM9G45

Nicu Pavel <[email protected]>
Newsgroups gmane.linux.ports.arm.general
Message-ID <1252913342.5141.11.camel@droids>
Hi,

I have a AT91SAM9G45 kit which has 2 DRAM banks conforming to datasheet
one starting from 0x20000000 marked as EBI Chip Select 1
DDR2-LPDDR-SDRAM and the one that's used by default starting from
0x70000000 marked as DDR2-LPDDR Chip Select.

 I modified U-Boot and initialised the bank at 0x20000000 for kernel
usage by adding:

gd->bd->bi_dram[1].start = 0x20000000;
gd->bd->bi_dram[1].size = 0x8000000;

in dram_init(). After recompiling and flashing U-Boot reports 256Mb, I
also tried some uboot mw/md commands from 0x20000000 and higher and
seems to work so DRAM looks like it's initialised correctly.

The problem appears after booting linux (I'm using a 2.6.27 linux4sam
kernel with -at91 and -exp patches without framebuffer compiled in) and
trying to use more then 128Mb (as a single bank has) the kernel enters
in a recursive OOOPS.
I'm starting the kernel with different bootargs:

1) mem=256Mb
2) Specify and exact map of the memory doesn't help either:
bootargs=mem=256M memmap=exactmap memmap=0x8000000@0x20000000
memmap=0x8000000@0x20000000 ...
3) Tried to map less memory for kernel:
bootargs=mem=200M memmap=exactmap memmap=0x07000000@0x20000000
memmap=0x05000000@0x73000000 


Anyone has any ideea where the problem lies ?


Thanks,
Nicu Pavel

U-Boot messages:

U-Boot 1.3.4 (Sep 4 2009 - 11:59:42)

DRAM: 256 MB
NAND: 256 MiB
DataFlash:AT45DB321
Nb pages: 8192
Page Size: 528
Size= 4325376 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C00041FF (RO) Bootstrap
Area 1: C0004200 to C00083FF Environment
Area 2: C0008400 to C0041FFF (RO) U-Boot
Area 3: C0042000 to C0251FFF Kernel
Area 4: C0252000 to C041FFFF FS
In: serial
Out: serial
Err: serial
Net: macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation timed out (status=0x7849)
macb0: link down (status: 0x7849)
Hit any key to stop autoboot: 0
U-Boot> printenv
ethaddr=3a:1f:34:08:54:54
bootdelay=3
baudrate=115200
stdin=serial
stdout=serial
stderr=serial
console=ttyS0,115200
root=/dev/mtdblock1
rw
rootfstype=jffs2"
bootargs=mem=256M memmap=exactmap memmap=0x08000000@0x20000000
memmap=0x08000000@0x70000000 console=ttyS0,115200 root=/dev/mtdblock1 rw
rootfstype=jffs2
bootcmd=nand read 0x72200000 0x00200000 0x0017CC38; bootm 0x72200000
ethact=macb0

Environment size: 412/131067 bytes





-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.