Forum Discussion
Altera_Forum
Honored Contributor
13 years agoCFI Flash - "NOR chip too large" error on uCLinux
Hello, I'm trying to use the CFI Flash on Arria II GX Development Kit 6G Edition on uCLinux. The flash is correctly probed but I get a warning about the flash size being truncated (below)....
Altera_Forum
Honored Contributor
13 years agoHi,
The message "NOR chip too large to fit in mapping. Attempting to cope..." is produced in the function 'genprobe_ident_chips' like
static struct cfi_private *genprobe_ident_chips(struct map_info *map, struct chip_probe *cp)
{
struct cfi_private cfi;
struct cfi_private *retcfi;
unsigned long *chip_map;
int i, j, mapsize;
int max_chips;
<skip>...
/*
* Allocate memory for bitmap of valid chips.
* Align bitmap storage size to full byte.
*/
max_chips = map->size >> cfi.chipshift;
if (!max_chips) {
printk(KERN_WARNING "NOR chip too large to fit in mapping. Attempting to cope...\n");
max_chips = 1;
}
mapsize = sizeof(long) * DIV_ROUND_UP(max_chips, BITS_PER_LONG);
chip_map = kzalloc(mapsize, GFP_KERNEL);
So you must enlarge the 'map->size', but I don't know where this value is set. Kazu