Contiguous Memory with Two 64MB SDRAM Chips on i.MX25

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Contiguous Memory with Two 64MB SDRAM Chips on i.MX25

1,285 Views
Jim_Carlson
Senior Contributor II

Hello,

 

My customer’s i.MX25 system has two 64MB SDRAM chips connected.  Since each chip select maps a 256MB region, the two SDRAMS are noncontiguous (a 192MB gap between them).  Can Linux be made to treat them as one 128MB RAM area or do we have to modify the ARM926’s MMU driver to remap them to a contiguous logical address space?

--

Regards,

 

Jim Carlson

Freescale FAE in Portland, Oregon

Labels (1)
0 Kudos
6 Replies

950 Views
Frias
Contributor V
Jim, The first step, is mandatory: - Add the second bank initialization DCD commands on: board/freescale/mx25_3stack/dcdheader.S Otherwise the DDR controller will not init the second bank. I never tested the Linux CONFIG mentioned, can't comment on this... sorry.
0 Kudos

950 Views
Jim_Carlson
Senior Contributor II
Hi Renato, My customer doesn't think your suggestion is too useful. Not being a Linux expert, I can't really comment. Here are his comments: We are setting up both banks within the ATAGs we pass in from U-boot to the kernel, we just need someone to explain the various kernel memory configuration options for discontiguous memory like this, ie: CONFIG_DISCONTIGMEM_MANUALhttp://cateee.net/lkddb/web-lkddb/DISCONTIGMEM_MANUAL.html or the newer option CONFIG_SPARSEMEM We can enable these fairly easily, it is just unknown if 1. We need to and 2. What we gain/lose if we do. Can you comment on this? Thank you very much! -- Regards, Jim
0 Kudos

950 Views
Jim_Carlson
Senior Contributor II
Thank you!
0 Kudos

950 Views
Frias
Contributor V
You don't need to modify the Linux code, the only change needed is in u-Boot. - Add the second bank initialization DCD commands on: board/freescale/mx25_3stack/dcdheader.S - Change include/configs/mx25_3stack.h to add the second bank: #define CONFIG_NR_DRAM_BANKS 2 #define PHYS_SDRAM_1 CSD0_BASE #define PHYS_SDRAM_2 CSD1_BASE - Change dram_init function on board/freescale/mx25_3stack/mx25_3stack.c Hope this helps! Renato
0 Kudos

950 Views
Jim_Carlson
Senior Contributor II
Thank you. I will check this out.
0 Kudos

950 Views
RobertSchwebel
Contributor IV
Jim, Usually the bootloader manages the SDRAM banks and reports them to the kernel with the ATAG mechanism. For example, in barebox this looks like this (on MX31, but this is not different on MX25): http://git.pengutronix.de/?p=barebox.git;f=arch/arm/boards/pcm037/pcm037.c;hb=HEAD#l42 Robert
0 Kudos