I am currently booting off of NOR flash on 6467. Now, I'm trying to add MTD stuff for the NOR. There is one NOR flash chip (Spansion), which uses a 16-bit bus. UBL says it uses the AMD command set (manufacturer ID = 0x01). I know that the 6446 EVM uses NOR, so I copied the NOR section (CONFIG_MTD_DAVINCI_NOR) from arch/arm/mach-davinci/board-evm.c and placed it into board-dm6467-evm.c. The flash is now defined as a platform device on the 6467.
In menuconfig, I enable the following:
"MTD support" (CONFIG_MTD)
"MTD patitioning support" (CONFIG_MTD_PARTITIONS)
"Direct char device access to MTD" (CONFIGMTD_CHAR)
"Caching block device access to MTD" (CONFIGMTD_BLOCK)
"Detect flash chips by CFI" (CONFIG_MTD_CFI)
"Support for AMD/Fujitsu flash chips" (CONFIG_MTD_CFI_AMDSTD)
"TI DaVinci board mappings" (CONFIG_MTD_DAVINCI_NOR)
When the kernel is loaded, it says that "Found no davinciflash.0 device at location zero". I added some printk statements and found that it is not successfully finding "QRY" when sending the query command in the function cfi_probe_chip() in file drivers/mtd/chips/cfi_probe. It is reading 0xFFFF for the query.
In the qry_present() function in file drivers/mtd/chips/cfi_probe, I think that cfi->interleave and cfi->device_type should both be 1, because the query addresses are 0x10, 0x11, and 0x12. However, cfi->interleave and cfi->device_type are never 1 at the same time. Can someone give me any advice?