public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Steve Kranz <skranz@ridgerun.com>
To: Anton Todorov <a.todorov@emness.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: MTD on MBX860
Date: Tue, 10 Jul 2001 06:49:37 -0600	[thread overview]
Message-ID: <3B4AF9E1.92E1A0FD@ridgerun.com> (raw)
In-Reply-To: 01071015225100.01159@ronin

> I am using linuxppc_2_4 (2.4.6) with current mtd
> support from cvs tree.  The board is with JEDEC AMD
> 29F016 x4 flash chips (8M Flash space).  Map file which
> I use for this board is attached (I use rpxlite.c and
> tqm8xxl.c (for partitioning) as reference).  The
> problem I found is that mtd says:
>
> "mtd: Failed. Cannot handle unsymetric banking"

Did you mean AMD29F160 (instead of AMD29F016)? If so,
I have a data sheet on my desk here that shows block sizes of:

  #1  8K
  #2  4K
  #3  4K
  #4  16K
  #5  32K
   ....
  #35 32K

--------------

Anton Todorov wrote:

> Hi,
>
> I am using linuxppc_2_4 (2.4.6) with current mtd support from cvs tree.
> The board is with JEDEC AMD 29F016 x4 flash chips (8M Flash space).
> Map file which I use for this board is attached (I use rpxlite.c and
> tqm8xxl.c (for partitioning) as reference).
> The problem I found is that mtd says:
>
> "mtd: Failed. Cannot handle unsymetric banking"
>
> I enabled some debug info in jedec.c (uncommenting some printks and add some)
> and found that it is looking for banked and find bank[0] is 8M bank[1] is 0M
> - realy unsymetric :)
> but I think it is linear flash.
> I worarounded it commentig one condition:
>
> --- jedec.c.orig        Tue Jul 10 10:06:41 2001
> +++ jedec.c     Tue Jul 10 10:07:41 2001
> @@ -159,7 +159,7 @@
>        are empty banks. Note, the last bank does not count here, only the
>        first banks are important. Holes on non-bank boundaries can not exist
>        due to the way the detection algorithm works. */
> -   if (priv.size < my_bank_size)
> +/*   if (priv.size < my_bank_size) */
>        my_bank_size = priv.size;
>     priv.is_banked = 0;
>     //printk("priv.size is %x, my_bank_size is %x\n",priv.size,my_bank_size);
>
> but I think it is not the right action ...
>
> now flash and partitioning(I think ) is working:
> fromm booting kernel:
> <>
> Motorola MBX flash device: 800000 at fe000000
>         MTD Part: MBX flash 4*[AMD Am29F016]
> MTD->erasesize is 40000
> MTD->size is 800000
> mtd: Giving out device 0 to MBX flash
> Creating 3 MTD partitions on "MBX flash":
> 0x00000000-0x00080000 : "MBX flash BOOT partition"
> mtd: Giving out device 1 to MBX flash BOOT partition
> 0x00080000-0x00600000 : "MBX flash DATA partition"
> mtd: Giving out device 2 to MBX flash DATA partition
> 0x00600000-0x00800000 : "MBX flash APPLICATION partition"
> mtd: Giving out device 3 to MBX flash APPLICATION partition
> <>
> sh-2.03# ./mtd_debug info /dev/mtd0
> mtd.type = MTD_NORFLASH
> mtd.flags = MTD_CAP_NORFLASH
> mtd.size = 8388608 (8M)
> mtd.erasesize = 262144 (256K)
> mtd.oobblock = 0
> mtd.oobsize = 0
> mtd.ecctype = MTD_ECC_NONE
> regions = 0
>
> sh-2.03# ./mtd_debug info /dev/mtd1
> mtd.type = MTD_NORFLASH
> mtd.flags = MTD_CAP_NORFLASH
> mtd.size = 524288 (512K)
> mtd.erasesize = 262144 (256K)
> mtd.oobblock = 0
> mtd.oobsize = 0
> mtd.ecctype = MTD_ECC_NONE
> regions = 0
>
> sh-2.03# ./mtd_debug info /dev/mtd2
> mtd.type = MTD_NORFLASH
> mtd.flags = MTD_CAP_NORFLASH
> mtd.size = 5767168 (5M)
> mtd.erasesize = 262144 (256K)
> mtd.oobblock = 0
> mtd.oobsize = 0
> mtd.ecctype = MTD_ECC_NONE
> regions = 0
>
> sh-2.03# ./mtd_debug info /dev/mtd3
> mtd.type = MTD_NORFLASH
> mtd.flags = MTD_CAP_NORFLASH
> mtd.size = 2097152 (2M)
> mtd.erasesize = 262144 (256K)
> mtd.oobblock = 0
> mtd.oobsize = 0
> mtd.ecctype = MTD_ECC_NONE
> regions = 0
>
> I managed to mount /dev/mtdblock3 as jffs and can create and delete files
> there.
>
> My question is why jedec driver find it as banked?
> maybe it is my fault in mbx860.c map file?
> My patch is not the right solution curently I will add some ifdefs
> to comment patched line when I am using MBX board.
> also I found that the einfo utility is not working on this board
> it says:
> <>
> sh-2.03# ./einfo /dev/mtd0
> Device /dev/mtd0 has 0 erase regions
> <>
> but mtd_debug util is working ass seen above.
> I have RPX Classic board with CFI AMD flash and same binary is working.
>
> comments?
>
> Best Regards,
> Anton Todorov
> Emness Technology
>
>   ------------------------------------------------------------------------
>                Name: mbx860.c
>    mbx860.c    Type: text/x-c
>            Encoding: base64

  reply	other threads:[~2001-07-10 12:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-10 17:22 MTD on MBX860 Anton Todorov
2001-07-10 12:49 ` Steve Kranz [this message]
2001-07-10 18:13   ` Anton Todorov
2001-07-10 13:25 ` Help: MTD & SmartMedia Steve Kranz
2001-07-11 10:10   ` David Woodhouse
2001-11-08 12:27 ` MTD on MBX860 David Woodhouse
2001-11-08 17:12   ` Anton Todorov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B4AF9E1.92E1A0FD@ridgerun.com \
    --to=skranz@ridgerun.com \
    --cc=a.todorov@emness.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox