MTD device initialisation, how to access ?
ccool
ccool at ninjatech.biz
Mon Nov 29 09:19:56 EST 2004
Hello
I have a RPXlite board with 16 Mb of AMD flash on it (the board configuration
is at the end of this mail). When I boot linux, I can see that the
cfi_probie is seeing my chip, but I don`t know how to access it.
I use the /dev support in my kernel with the option that mount it
automatically at boot, but I don`t see any character device int /dev/mtd or
any block device in /dev/mtdblock
I think everythings gets detected correctly, because here is what I see when I
"dmesg" :
<--- some other kernel stuff --->
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
RPX Lite or CLLF flash device: 800000 at fe000000
RPX: Found 4 x16 devices at 0x0 in 32-bit mode
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
Using word write method
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
<--- other messages --->
My kernel configuration is at the end of this mail.
I would really like to know a way to access the MTD device. I thought that
there would be something I have to set, so I changed the
#define WINDOW_ADDR 0xfe000000
#define WINDOW_SIZE 0x800000
for
#define WINDOW_ADDR 0xff000000
#define WINDOW_SIZE 0x1000000
in the
drivers/mtd/maps/rpxlite.c
and I thought that would solve the problem, but it did not. Please if someone
could direct my toward the solution, an understanding of what is happening or
even a nice document where it would explain what I have to set to have access
to the mtd device. (ideally, a block device)
Thanks
Raphaël
------------------------
RPXlite
Powerpc MPC823
16 Mb RAM 0000 0000 - 00FF FFFF
16 Mb Flash FF00 0000 - FFFF FFFF
128 ko NVRAM FA00 0000 - FA02 0000
... actually, I have a lot
------------------------
Flash memory map, 16 Mb, from FF00 0000 to FFFF FFFF
4 Chips of AMD D323CB90VI 9952AQA G
On the RPXlite, the flash memory is mirrored 4 times because of the way the
adresses are decoded.:
FC00 0000
- mirrored flash 16 Mb
FCFF FFFF
FD00 0000
- mirrored flash 16 Mb
FDFF FFFF
FE00 0000
- mirrored flash 16 Mb
FEFF FFFF
FF00 0000
- actual flash 16 Mb
FFFF FFFF
------------------------
Kernel MTD configuration option
#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
CONFIG_MTD_DEBUG=y
CONFIG_MTD_DEBUG_VERBOSE=3
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CONCAT=y
CONFIG_MTD_REDBOOT_PARTS=y
# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
CONFIG_MTD_CHAR=y
# CONFIG_MTD_BLOCK is not set
CONFIG_MTD_BLOCK_RO=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
#
# RAM/ROM/Flash chip drivers
#
CONFIG_MTD_CFI=y
CONFIG_MTD_JEDECPROBE=y
CONFIG_MTD_GEN_PROBE=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
# CONFIG_MTD_CFI_NOSWAP is not set
CONFIG_MTD_CFI_BE_BYTE_SWAP=y
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
CONFIG_MTD_CFI_GEOMETRY=y
# CONFIG_MTD_CFI_B1 is not set
CONFIG_MTD_CFI_B2=y
CONFIG_MTD_CFI_B4=y
# CONFIG_MTD_CFI_B8 is not set
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
CONFIG_MTD_CFI_I4=y
CONFIG_MTD_CFI_I8=y
# CONFIG_MTD_CFI_INTELEXT is not set
CONFIG_MTD_CFI_AMDSTD=y
# CONFIG_MTD_CFI_STAA is not set
CONFIG_MTD_CFI_UTIL=y
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
# CONFIG_MTD_OBSOLETE_CHIPS is not set
# CONFIG_MTD_AMDSTD is not set
# CONFIG_MTD_SHARP is not set
# CONFIG_MTD_JEDEC is not set
#
# Mapping drivers for chip access
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PHYSMAP is not set
CONFIG_MTD_RPXLITE=y
More information about the linux-mtd
mailing list