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,
--- Quote Start --- I've got to this piece of code but couldn't find where it's set as well. There are several modules which call this function and as 'map' is a parameter I can't be sure where it's coming from. Also, i don't get the point. What the mapping is? Is it the memory address space allocated to the device or is it probed or derived from hardware? It's strange I couldn't find anything about it in the whole internet, is it that unusual to have a 64Mb flash on a board running uCLinux? --- Quote End --- I'm using Ver.2.6.30. So maybe my suggestion is beside the point, but if device's configurations are done in the file 'arch/nios2/kernel/config.c', then please search the text with a keyword 'cfi'. For example
static struct resource nios2_flash_resource = {
# if defined(CFI_FLASH_0_BASE)
.start = CFI_FLASH_0_BASE,
.end = CFI_FLASH_0_BASE + CFI_FLASH_0_SPAN - 1,
# else
.start = EXT_FLASH_BASE,
.end = EXT_FLASH_BASE + EXT_FLASH_SPAN - 1,
# endif
.flags = IORESOURCE_MEM,
};
determines the CFI flash memory size by 'CFI_FLASH_0_SPAN' or 'EXT_FLASH_SPAN'. Linux kernel will call a function 'platform_add_devices' with these data and register the devices. Inside this function, a special address space for the device is mapped for its use. Of course the space is different from the main memory one. Kazu