EP7312 can't use 32MB DRAM (fwd)
shadow
saturn at structure.biochem.nchu.edu.tw
Mon Dec 9 15:20:55 EST 2002
---------- Forwarded message ----------
Date: Mon, 9 Dec 2002 23:29:19 +0800 (CST)
From: shadow <saturn at structure.biochem.nchu.edu.tw>
To: PA Nilsson <pa at glaze.se>
Subject: RE: EP7312 can't use 32MB DRAM
Thanks for your suggestion.
I had modified my source code but still can not work.
mi->bank[0].start = 0xc0000000;
mi->bank[0].size = 32*1024*1024;
mi->bank[0].node = 0;
mi->nr_banks = 1;
I also rewrited my bootloader(hermit), in the linux.c, I specified
page_size, page_number, page_number_in_bank.
/* system page size */
ps->u1.s.page_size = 0x1000;
/* number of pages in all banks */
ps->u1.s.nr_pages = 8192;
/* pages per bank */
ps->u1.s.pages_in_bank[0] = 8192;
In hermit's boot.S, I reconfigured the SDRAM size, 32MB.
mov r1, #0x42 /* 32MB */
add r1, r1, #0x0500
mov r2, #0x2300
add r2, r2, r0
str r1, [r2]
mov r1, #0x240 /* 36MHz SDRAM refresh period */
mov r2, #0x2340
add r2, r2, r0
str r1, [r2]
I wonder the above initial code of SDRAM, if it is also needed by linux
kernel's boot.S or it only needed to executed once at the bootloader ?
Sadly, it still can not work after the above course.
Any suggestion would be greatly appreciated.
Thanks in advance,
Brian
On Thu, 5 Dec 2002, PA Nilsson wrote:
> Since I am a hardware designer, software is not my strongest side but this
> might help you.
>
> You do not write anything about what board you are running on, but here is
> one possibility why your code might crash:
>
> If your board is set up with two 16-bit wide DRAMs to form a 32-bit wide
> bus, all of your memory will be located in the same bank, not over both
> banks. That would mean that you should only configure one bank, but twice
> the size.
>
> Make sure that you have set up your DRAM-controller in your bootloader
> aswell, depending on the physical layout on the board.
>
> /PA
>
More information about the linux-mtd
mailing list