using a portion of a FLASH device as FTL?

Williams, Kevin M. kevin.m.williams at marconi.com
Fri Apr 6 16:46:27 EDT 2001


Hello again,

I've figured out why FTL wasn't finding the header.  It was looking at the
bottom section of the flash for the FTL data structure ("FTL100").  We store
our bootloader and some other code at the base of the FLASH.  I need to only
use part of the FLASH as FTL, the rest I want to leave alone.  The Flash
chips (AMD29DL162, ) are detected properly by the CFI probe at location
0xFFC00000 thru 0xFFFFFFFF, but I only want the FTL to use from 0xFFF20000
to FFFE0000. 

I can't see anywhere in the code where provisions for this have been added.
Any advice on modifying the existing code to accomplish this?

I know I'm a newbie, so if no one wants to reply, I'll go away, have a good
cry, and figure it out slowly on my own.

Kevin Williams

> -----Original Message-----
> From:	Williams, Kevin M. 
> Sent:	Thursday, April 05, 2001 4:44 PM
> To:	'mtd at infradead.org'
> Subject:	FTL header not found?
> 
> Hello,
> 
> I am a Linux newbie porting Linux 2.4.3 to a custom embedded PowerPC 860
> board.   I have replaced my drivers/mtd and include/linux/mtd directories
> with what's in the latest mtd snapshot off the FTP site (20010404).  I am
> not trying to do anything real fancy or cutting edge, I just want to be
> able to mount my onboard AMD flash chips as an ext2 filesystem.
> 
> The cfi_probe code in the latest mtd patch seems to identify the chips and
> configuration (coupled pair in 16 bit mode), but scan_header() in ftl.c
> seems to read incorrectly when searching for the ftl header (it doesn't
> find one...see output below).   The kernel builds and boots, but I get an
> ftl error (header not found) during boot up, and I can't mount the flash.
> I get:
> 
> 192.168.60.12:/> mount -t ext2 /dev/ftla /flash
> bad area!!
> bad area!!
> mount: /dev/ftla has wrong device number or fs type ext2 not supported
> 
> ls -l on the /dev directory shows:
> crwxr-xr-x   1 root     root      60,   0 Oct  2  2000 flash0
> brwxr-xr-x   1 root     root      44,   0 Oct  2  2000 ftla
> 
> This same hardware currently runs a hacked up version of 2.2.13 with some
> flash code merged in that has ftl and cfi functionality, but not as mtd,
> just as a device.
> 
> I'm guessing either the read routine isn't big-endian supported, or I
> don't need to find the ftl header and my problem is really elsewhere, or I
> am just doing something stupid.
> 
> Is there a HOWTO or other documentation on any of this?  
> 
> Thanks in advance for any help or ideas.
> 
> Kevin Williams
> Marconi Commerce Systems
> 
> relevant portion of debug output.............
> physmap flash device: 400000 at ffc00000
> Physically mapped flash: Found 2 x16 devices at 0x0 in 32-bit mode
>  Amd/Fujitsu Extended Query Table v1.1 at 0x0040
> Physically mapped flash: Swapping erase regions for broken CFI table.
> number of CFI chips: 1
> 0: offset=0x0,size=0x20000,blocks=31
> 1: offset=0x3e0000,size=0x4000,blocks=8
> mtd: Giving out device 0 to Physically mapped flash
> $Id: ftl.c,v 1.28 2001/03/17 17:10:21 dwmw2 Exp $
> ftl_cs: FTL header not found.
> NET4: Linux TCP/IP 1.0 for NET4.0...
> 
> .config MTD settings:
> #
> # Memory Technology Devices (MTD)
> #
> CONFIG_MTD=y
> CONFIG_MTD_DEBUG=y
> CONFIG_MTD_DEBUG_VERBOSE=3
> 
> #
> # Disk-On-Chip Device Drivers
> #
> # CONFIG_MTD_DOC1000 is not set
> # CONFIG_MTD_DOC2000 is not set
> # CONFIG_MTD_DOC2001 is not set
> # CONFIG_MTD_DOCPROBE is not set
> 
> #
> # RAM/ROM Device Drivers
> #
> # CONFIG_MTD_SLRAM is not set
> # CONFIG_MTD_RAM is not set
> # CONFIG_MTD_ROM is not set
> # CONFIG_MTD_MTDRAM is not set
> 
> #
> # Linearly Mapped Flash Device Drivers
> #
> CONFIG_MTD_CFI=y
> # CONFIG_MTD_CFI_VIRTUAL_ER is not set
> # CONFIG_MTD_CFI_ADV_OPTIONS is not set
> # CONFIG_MTD_CFI_INTELEXT is not set
> CONFIG_MTD_CFI_AMDSTD=y
> # CONFIG_MTD_AMDSTD is not set
> # CONFIG_MTD_SHARP is not set
> CONFIG_MTD_PHYSMAP=y
> CONFIG_MTD_PHYSMAP_START=0xFFC00000
> CONFIG_MTD_PHYSMAP_LEN=0x00400000
> CONFIG_MTD_PHYSMAP_BUSWIDTH=4
> # CONFIG_MTD_NORA is not set
> # CONFIG_MTD_PNC2000 is not set
> # CONFIG_MTD_RPXLITE is not set
> # CONFIG_MTD_SC520CDP is not set
> # CONFIG_MTD_SA1100 is not set
> # CONFIG_MTD_DC21285 is not set
> # CONFIG_MTD_IQ80310 is not set
> # CONFIG_MTD_CSTM_CFI_JEDEC is not set
> # CONFIG_MTD_CFI_FLAGADM is not set
> # CONFIG_MTD_JEDEC is not set
> # CONFIG_MTD_ARM is not set
> 
> #
> # NAND Flash Device Drivers
> #
> # CONFIG_MTD_NAND is not set
> 
> #
> # User Modules And Translation Layers
> #
> # CONFIG_MTD_CHAR is not set
> # CONFIG_MTD_BLOCK is not set
> # CONFIG_MTD_BLOCK_RO is not set
> CONFIG_FTL=y
> # CONFIG_NFTL is not set
> 
> 


To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list