Skip to contentSkip to conversation

MAPPING MEMORY

U-Boot-Users Marco_Ivano 2 participants 2 messages Mar 17, 2006

lore
Share & tools
lore
#0 lore raw

Hi all,
i have a board based on s3c2410 processor with k9f2808uoc samsung flash (128 Mbit) and 2 banks of samsung ram code k4s283233f in total (128 Mbitx2). I try to modify the source code of board SMDK2410 but i have same problems:

1 the memory map is in the file /include/configs/smdk2410 (i have use readme file for all operation) but i don't understud the means of some variables that i report in the code below. In particular i don't means what rappresents the PHYS_SDRAM and PHYS_FLASH and PHYS_FLASH_SIZE.

2 I have do some modify in this source code : i have insert 2 banks of sdram but i don't know how modify the value of the PHYS variable.

3 How can i setting the size of flash page ?

4 How can i know the compatibility my flash with other flash?

Thanks
Marco

/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2 /* we have 1 bank of DRAM */
#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */
#define PHYS_SDRAM_1_SIZE 0x02000000 /* 16 MB */
#define PHYS_SDRAM_2 0x30000000 /* SDRAM Bank #2 */
#define PHYS_SDRAM_2_SIZE 0x02000000 /* 16 MB */

#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */

#define CFG_FLASH_BASE PHYS_FLASH_1

/*-----------------------------------------------------------------------
* FLASH and environment organization
*/

#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */
#if 0
#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */
#endif

#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
#ifdef CONFIG_AMD_LV800
#define PHYS_FLASH_SIZE 0x00100000 /* 1MB */
#define CFG_MAX_FLASH_SECT (19) /* max number of sectors on one chip */
#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x0F0000) /* addr of environment */
#endif
#ifdef CONFIG_AMD_LV400
#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */
#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */
#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x070000) /* addr of environment */
#endif

/* timeout values are in ticks */
#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */
#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */

#define CFG_ENV_IS_IN_FLASH 1
#define CFG_ENV_SIZE 0x10000 /* Total Size of Environment Sector */

#endif /* __CONFIG_H */

#1 lore raw
Quoted 5 lines · In message <[email protected]> you wrote:

1 the memory map is in the file /include/configs/smdk2410 (i have use readme file for all operation) but i don't understud the means of some variables that i report in the code below. In particular i don't means what rappresents the PHYS_SDRAM and PHYS_FLASH and PHYS_FLASH_SIZE.

I can tell you that these aree the physical addresses and size of the SDRMA and flash memory, respective - but I *strongly* recommend that you start reading the code. Using "grep" quickly reveals where these definitions are used and what they do.

Learn to use the tools, or you will have to ask again and again and again.

Quoted 2 lines

2 I have do some modify in this source code : i have insert 2 banks of sdram but i don't know how modify the value of the PHYS variable.

Read the code.

Quoted 1 line

3 How can i setting the size of flash page ?

Read the code.

Quoted 1 line

4 How can i know the compatibility my flash with other flash?

Read the chip manufacturer's data sheet.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The price of curiosity is a terminal experience.
                         - Terry Pratchett, _The Dark Side of the Sun_