2009-05-12 02:37:20     eoors while enabling JFFS2 and MTD

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-05-12 02:37:20     eoors while enabling JFFS2 and MTD

hari a (INDIA)

Message: 73978   

 

Hi All,

 

I am using Linux version 2.6.22.19-ADI-2008R1.5-svn.

My board has

 

    BF533

    8MB flash memory from ST, which is CFI compliant.

 

Flash is connected to AMS bank-0 ( 0x20000000). I am using latches for higher order addressing.

 

To make use of JFFS2 and MTD, I followed the link

  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:jffs

  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:mtd

 

My configuration details are as follows

 

 

Device drivres

    <*> Memory Technology Device (MTD) support --->

                  --Memory Technology Device (MTD) support

             [*]   MTD partitioning support

             [*]   Command line partition table parsing

      [*]   Direct char device access to MTD devices

             [*]   Caching block device access to MTD devices

 

       RAM/ROM/Flash chip drivers --->

 

           <*> Detect flash chips by Common Flash Interface (CFI) probe

 

           <*> Support for ST (Advanced Architecture) flash chips

 

           <*> Support for RAM chips in bus mapping

 

          <*> Support for ROM chips in bus mapping

 

         Mapping drivers for chip access --->

 

          [*]Support non-linear mappings of flash chips

 

           <*> CFI Flash device in physical memory map

 

                             (0x20000000) Physical start address of flash mapping

                             (0x800000) Physical length of flash mapping

(2)Bank width in octets (NEW)

 

File systems   --->

 

Miscellaneous filesystems --->

 

    <*> Journalling Flash File System v2 (JFFS2) support

 

           (sub-options are up to you)

 

(0)      JFFS2 debugging verbosity (0 = quiet, 2 = noisy)

        

 

Flash Tools --->

 

--- MTD utils

 

[*] mtd-utils

 

[*]   flash_erase

 

[*]   flash_eraseall

 

[*]   mkfs.jff2

 

 

 

MTD details after configuration is

grep MTD ./linux-2.6.x/.config | grep =y

 

CONFIG_MTD=y

CONFIG_MTD_PARTITIONS=y

CONFIG_MTD_CMDLINE_PARTS=y

CONFIG_MTD_CHAR=y

CONFIG_MTD_BLKDEVS=y

CONFIG_MTD_BLOCK=y

CONFIG_MTD_CFI=y

CONFIG_MTD_GEN_PROBE=y

CONFIG_MTD_MAP_BANK_WIDTH_1=y

CONFIG_MTD_MAP_BANK_WIDTH_2=y

CONFIG_MTD_MAP_BANK_WIDTH_4=y

CONFIG_MTD_CFI_I1=y

CONFIG_MTD_CFI_I2=y

CONFIG_MTD_CFI_STAA=y

CONFIG_MTD_CFI_UTIL=y

CONFIG_MTD_RAM=y

CONFIG_MTD_ROM=y

CONFIG_MTD_COMPLEX_MAPPINGS=y

CONFIG_MTD_PHYSMAP=y

 

Below are kernel prints related to JFFS2 and MTD after kernel booting.

……

…….

JFFS2 version 2.2. © 2001-2006 Red Hat, Inc.

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

…..

…..

physmap platform flash device: 00800000 at 20000000

physmap-flash physmap-flash.0: Could not reserve memory region

physmap-flash: probe of physmap-flash.0 failed with error -12

 

 

I want to use JFFS2 file system for the flash memory.

I am getting the above mentioned error.

Please guide me how to solve the above error and make MTD, JFFS2 drivers up.

QuoteReplyEditDelete

 

 

2009-05-12 08:23:47     Re: eoors while enabling JFFS2 and MTD

Mike Frysinger (UNITED STATES)

Message: 73990   

 

the BF533 doesnt actually have 8 megs of async bank, so lying to the kernel wont help.  you need to write a custom flash mapping driver to handle things.  i dont know what you mean by "latches" in order to access the high 4 megs, but maybe the existing gpio-flash-addr map can be a useful example.

 

QuoteReplyEditDelete

 

 

2009-05-12 09:48:51     Re: eoors while enabling JFFS2 and MTD

hari a (INDIA)

Message: 73994   

 

Mike:

 

I mean latch bits are GPIO used for higher order address lines selection.

 

Could you please tell me where can I find "gpio-flash-addr map " example?

 

Please guide me how to write custom driver.

 

Thanks

QuoteReplyEditDelete

 

 

2009-05-12 13:42:21     Re: eoors while enabling JFFS2 and MTD

Mike Frysinger (UNITED STATES)

Message: 73996   

 

using GPIO's to address parallel flash isnt supported in 2008R1.5 or earlier.  you can look at the driver in trunk at drivers/mtd/maps/gpio-addr-flash.c.  look at how some of the tiny boards use it for an example (tcm-bf537).

Attachments

    Outcomes