FW: [U-Boot-Users] Flash memory Offset Values

Vikrant_Basotra Vikrant_Basotra at Satyam.com
Thu Jan 20 13:10:42 CET 2005


Hi All, 
	Sorry for putting the question wrongly (just missed 'not' in
sentence "But the way code is written its matching with the Datasheet's *16
(cross
Sixteen") Address Range values....), The actual problem is :


I am customizing Uboot for PowerQuiccII 8248 based board.
The block of Code below is from the file board/ep8248/flash.c, where
actually the starting addresses of the sectors are stored in a structure.
Since Flash memory on the ep8248 board is in *16 (cross sixteen) mode, the
sector offsets should be in accordance with the *16 (cross sixteen) Address
Range given in the data sheet of the flash memory (Am29LV320MB), 
offset values in the code are not matching with the Datasheet's *16 (cross
sixteen) Address Range values....
Can anyone please let me know what the code is actually is trying to do... 


/* set up sector start address table (bottom sector type) */
  for (i = 0; i < 8; i++) {
    info->start[i] = baseaddr + (i * 0x00004000);     
  }
  for (i = 8; i < info->sector_count; i++) {
    info->start[i] = baseaddr + (i * 0x00020000) - 0x000E0000;
  }


For your reference Boot sector Architecture Table of Am29LV320MB (from the
Datasheet):

Table 3. Am29LV320MB Bottom Boot Sector Architecture
======	===========		==========	================
============
Sector	Sector Address	Sector Size		(x8)
(x16)
		A20-A12	    Kbytes/Kwords   Address Range	Address
Range
=====		==========		==========	================
=============
SA0 		000000000 		8/4 		000000h-001FFFh
00000h-00FFFh
SA1 		000000001 		8/4 		002000h-003FFFh
01000h-01FFFh
SA2 		000000010 		8/4 		004000h-005FFFh
02000h-02FFFh
SA3 		000000011 		8/4 		006000h-007FFFh
03000h-03FFFh
SA4 		000000100 		8/4 		008000h-009FFFh
04000h-04FFFh
SA5 		000000101 		8/4 		00A000h-00BFFFh
05000h-05FFFh
SA6 		000000110 		8/4 		00C000h-00DFFFh
06000h-06FFFh
SA7 		000000111 		8/4 		00E000h-00FFFFFh
07000h-07FFFh
SA8 		000001xxx 		64/32 	010000h-01FFFFh
08000h-0FFFFh
SA9 		000010xxx 		64/32 	020000h-02FFFFh
10000h-17FFFh
SA10		000011xxx 		64/32 	030000h-03FFFFh
18000h-1FFFFh
SA11		000100xxx 		64/32 	040000h-04FFFFh
20000h-27FFFh
SA12 		000101xxx 		64/32 	050000h-05FFFFh
28000h-2FFFFh
SA13 		000110xxx 		64/32 	060000h-06FFFFh
30000h-37FFFh
SA14 		000111xxx 		64/32 	070000h-07FFFFh
38000h-3FFFFh
SA15 		01000xxx 		64/32 	080000h-08FFFFh
40000h-47FFFh
SA16 		001001xxx 		64/32 	090000h-09FFFFh
48000h-4FFFFh
---		---------		----			-----
-----
---		---------		----			-----
-----
---		---------		----			-----
-----
SA68 		111101xxx 		64/32 	3D0000h-3DFFFFh
1E8000h-1EFFFFh
SA69 		111110xxx 		64/32 	3E0000h-3EFFFFh
1F0000h-1F7FFFh
SA70 		111111xxx 		64/32 	3F0000h-3FFFFFh
1F8000h-1FFFFFh


Thanks & Regards,
Vikrant Basotra



-----Original Message-----
From: u-boot-users-admin at lists.sourceforge.net
[mailto:u-boot-users-admin at lists.sourceforge.net] On Behalf Of
Vikrant_Basotra
Sent: Thursday, January 20, 2005 5:26 PM
To: u-boot-users at lists.sourceforge.net
Cc: Sibi_Mathew
Subject: [U-Boot-Users] Flash memory Offset Values

Hello All,
I am customizing Uboot for PowerQuiccII 8248 based board.
The block of Code below is from the file board/ep8248/flash.c, where
actually the starting addresses of the sectors are stored in a structure.
Since Flash memory on the ep8248 board is in *16 (cross sixteen) mode, the
sector offsets should be in accordance with the *16 (cross sixteen) Address
Range given in the data sheet of the flash memory (Am29LV320MB), 
But the way code is written its matching with the Datasheet's *16 (cross
sixteen) Address Range values....
Can anyone please let me know what the code is actually is trying to do... 


/* set up sector start address table (bottom sector type) */
  for (i = 0; i < 8; i++) {
    info->start[i] = baseaddr + (i * 0x00004000);
  }
  for (i = 8; i < info->sector_count; i++) {
    info->start[i] = baseaddr + (i * 0x00020000) - 0x000E0000;
  }


For your reference Boot sector Architecture Table of Am29LV320MB (from the
Datasheet):

Table 3. Am29LV320MB Bottom Boot Sector Architecture
======	===========		==========	================
============
Sector	Sector Address	Sector Size		(x8)
(x16)
		A20-A12	    Kbytes/Kwords   Address Range	Address
Range
=====		==========		==========	================
=============
SA0 		000000000 		8/4 		000000h-001FFFh
00000h-00FFFh
SA1 		000000001 		8/4 		002000h-003FFFh
01000h-01FFFh
SA2 		000000010 		8/4 		004000h-005FFFh
02000h-02FFFh
SA3 		000000011 		8/4 		006000h-007FFFh
03000h-03FFFh
SA4 		000000100 		8/4 		008000h-009FFFh
04000h-04FFFh
SA5 		000000101 		8/4 		00A000h-00BFFFh
05000h-05FFFh
SA6 		000000110 		8/4 		00C000h-00DFFFh
06000h-06FFFh
SA7 		000000111 		8/4 		00E000h-00FFFFFh
07000h-07FFFh
SA8 		000001xxx 		64/32 	010000h-01FFFFh
08000h-0FFFFh
SA9 		000010xxx 		64/32 	020000h-02FFFFh
10000h-17FFFh
SA10		000011xxx 		64/32 	030000h-03FFFFh
18000h-1FFFFh
SA11		000100xxx 		64/32 	040000h-04FFFFh
20000h-27FFFh
SA12 		000101xxx 		64/32 	050000h-05FFFFh
28000h-2FFFFh
SA13 		000110xxx 		64/32 	060000h-06FFFFh
30000h-37FFFh
SA14 		000111xxx 		64/32 	070000h-07FFFFh
38000h-3FFFFh
SA15 		01000xxx 		64/32 	080000h-08FFFFh
40000h-47FFFh
SA16 		001001xxx 		64/32 	090000h-09FFFFh
48000h-4FFFFh
---		---------		----			-----
-----
---		---------		----			-----
-----
---		---------		----			-----
-----
SA68 		111101xxx 		64/32 	3D0000h-3DFFFFh
1E8000h-1EFFFFh
SA69 		111110xxx 		64/32 	3E0000h-3EFFFFh
1F0000h-1F7FFFh
SA70 		111111xxx 		64/32 	3F0000h-3FFFFFh
1F8000h-1FFFFFh


Thanks & Regards,
Vikrant Basotra

************************************************************************** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
************************************************************************** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************




More information about the U-Boot mailing list