Trying to get CFI to work on my board.
I am trying to get CFI to work on my PowerPC 860 board so I can try jffs. The CFI probe is failing would appriciate any help.
My board has Intel 28F160S3 flash on it and my chip select CS0 is connected
to flash and value of BR0 0X28000000 OR0 0XFFC00742
Now when configuring the kernel I have following parameters set
CONFIG_MTD_CFI=mCONFIG_MTD_CFI_INTELEXT=m
# CONFIG_MTD_CFI_AMDSTD is not setCONFIG_MTD_RAM=mCONFIG_MTD_ROM=m
# CONFIG_MTD_JEDEC is not setCONFIG_MTD_PHYSMAP=mCONFIG_MTD_PHYSMAP_START=28000000CONFIG_MTD_PHYSMAP_LEN=3FFFFFCONFIG_MTD_PHYSMAP_BUSWIDTH=2
Now when I execute command modprobe -a physmap as suggested in recent HOWTO I output shown at the end,
In file physmap.c following statement remaps the flash address space to some kernel space.
physmap_map.map_priv_1 = (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
Correct? So when I execute virt_to_phys on physmap_map.map_priv_1 shouldn't I get my "original" physical address of 0x28000000 back? but I am getting following output
printk(KERN_NOTICE "physmap.map_priv_1 0x%08X, physical address 0x%08X\n",
physmap_map.map_priv_1, virt_to_phys((void *)physmap_map.map_priv_1));
physmap.map_priv_1 0xC500F000, physical address 0x0500F000
[ Sorry if this is too elementary question never played with ioremap before]
Output of modprobe -a physmap is
sh-2.04# modprobe -a physmap
physmap flash device: size 0x003FFFFF at address 0x28000000
physmap.map_priv_1 0xC500F000, physical address 0x0500F000
Call to cfi_probe receivedcfi_probe_new_chip buswidth is 2 size 0x003FFFFFphysmap_read16::virtual address 0xC500F0AA maps to physical 0x0500F0AAphysmap_write8 at address 0xC500F0AA value 0x00009898physmap_write16::virtual address 0xC500F0AA maps to physical 0x0500F0AAphysmap_read16::virtual address 0xC500F020 maps to physical 0x0500F020physmap_read16::virtual address 0xC500F020 maps to physical 0x0500F020physmap_read16::virtual address 0xC500F0AA maps to physical 0x0500F0AA
Physically mapped flash: Found no CFI device at location zerocfi_cfi_probe returned NULL/lib/modules/2.4.2-pre3/kernel/drivers/mtd/physmap.o: init_module: Device not configured
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters /lib/modules/2.4.2-pre3/kernel/drivers/mtd/physmap.o: insmod /lib/modules/2.4.2-pre3/kernel/drivers/mtd/physmap.o failed /lib/modules/2.4.2-pre3/kernel/drivers/mtd/physmap.o: insmod physmap failed
/Subodh Nijsure
To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 3 lines · [email protected] said:
Correct? So when I execute
virt_to_physon physmap_map.map_priv_1
shouldn't I get my "original" physical address of0x28000000back? but I am getting following output
No. You should get a 'cookie' back which is to be passed to the kernel's read[bwl] functions. This 'cookie' may be coincidence be very similar to a virtual address.
I don't think virt_to_phys() is supposed to work for ioremapped areas - only for main memory. If you just use map_rom_probe instead of cfi_probe, can you read sensible data from the beginning of the chip (i.e. does it match what you know is in there)?
What chips are on the board and how are they arranged?
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to [email protected]