nandflash ID format in at91boostrap/driver/nandflash.c

Moderator: nferre

ironhorse
Posts: 14
Joined: Mon Apr 06, 2015 9:05 pm

nandflash ID format in at91boostrap/driver/nandflash.c

Sun Jun 07, 2015 10:48 am

Not sure why this was not commented in the source code but can one of you tell me what the nand id format is in at91boostrap/driver/nandflash.c. I know the first four hex numbers are the manufacturer ID and the device ID from the data sheet but what is the format for the other hex values? For example,

static struct nand_chip nand_ids[] = {
/* Micron MT29F2G16AAB 256MB */
{0x2cca, 0x800, 0x20000, 0x800, 0x40, 0x1},
/* Micron MT29F2G08AAC 256MB  */
{0x2cda, 0x800, 0x20000, 0x800, 0x40, 0x0},
...

What does the 2nd (0x800), 3rd (0x20000) , 4th (0x800), 5th (0x40), and 6th (0x1) hex numbers represent since I need to move to a different memory manufacturer and will need to create a new nandflash option.

Micron nandflash data sheet link below:
http://media.digikey.com/pdf/Data%20She ... AD,ABD.pdf

Thanks in advance,
IH
blue_z
Location: USA
Posts: 1952
Joined: Thu Apr 19, 2007 10:15 pm

Re: nandflash ID format in at91boostrap/driver/nandflash.c

Mon Jun 08, 2015 9:10 pm

ironhorse wrote:Not sure why this was not commented in the source code but can one of you tell me what the nand id format is in at91boostrap/driver/nandflash.c.
Your complaint is not valid.

Code: Select all

struct nand_chip {
	unsigned short	chip_id; /* Nand Chip ID */
	unsigned short	numblocks;
	unsigned int	blocksize;
	unsigned short	pagesize;
	unsigned short	oobsize;
	unsigned char	buswidth;
	unsigned char	eccbits;
};
What's the clarification added by the comment for the first member?

You seem to be only looking at the array declaration (e.g. "what the nand id format is") and initialization specification, and asking the wrong question.
You should be looking at the structure's declaration (which is probably in an included .h header file), in which the structure members are defined.
The code is the documentation.

Regards
ironhorse
Posts: 14
Joined: Mon Apr 06, 2015 9:05 pm

Re: nandflash ID format in at91boostrap/driver/nandflash.c

Tue Jun 16, 2015 3:25 am

You're right, the code is the documentation. 

Thanks for the help.
IH

Ignore this below, I am just testing out the Quote and Code features....
The code is the documentation.

Code: Select all

   
   unsigned short   chip_id; /* Nand Chip ID */
   unsigned short   numblocks;
   unsigned int   blocksize;
   unsigned short   pagesize;
   unsigned short   oobsize;
   unsigned char   buswidth;
   unsigned char   eccbits;

Return to “SAM9-based”

Who is online

Users browsing this forum: No registered users and 3 guests