linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Marco Stornelli <marco.stornelli@coritel.it>
To: liran raz <liranrazlinux@gmail.com>
Cc: LinuxPPC-Embedded <linuxppc-embedded@ozlabs.org>
Subject: Re: flash driver
Date: Wed, 09 Jul 2008 09:00:16 +0200	[thread overview]
Message-ID: <48746200.6020602@coritel.it> (raw)
In-Reply-To: <e3b3ab5c0807081106l50914537xc41f777669655c52@mail.gmail.com>

liran raz ha scritto:
> I've set in *.dts:
> localbus@f0010100 {
>  compatible = "fsl,mpc8272-localbus",
>  "fsl,pq2-localbus";
>  #address-cells = <2>;
>  #size-cells = <1>;
>  reg = <f0010100 40>;
>  ==> from here "mine"
>  ranges = <0 0 fc000000 04000000>;
>  flash@0,0 {
>  compatible = "cfi-flash";
>  reg = <0 0 4000000>;
>  bank-width = <4>;
>  device-width = <2>;
> };
> I still see this message:
> of-flash: probe of fc000000.flash failed with error -16
> (when I try to read from /dev/mtd0 (major 90 minor 0)
> it seems to read the flash content, write - fails).
> Liran.
> 
> 
> On Tue, Jul 8, 2008 at 2:04 PM, liran raz <liranrazlinux@gmail.com> wrote:
> 
>>
>> On Tue, Jul 8, 2008 at 2:34 AM, Marco Stornelli <
>> marco.stornelli@coritel.it> wrote:
>>
>>> liran raz ha scritto:
>>>
>>>> hi,
>>>> I'm trying to setup the kernel's (linux-2.6.24) flash driver.
>>>> Our flash is combined of 2 chips of S29GLN (spanion)
>>>> 2 X 16 bits data chips connected to 32 bits data bus.
>>>> This flash is compatible with the AMD CFI.
>>>> I've configured the kernel to:
>>>> 1. Detect flash chips by common flash interface (CFI) probe.
>>>> 2. Support for AMD/Fujitsu flash chips
>>>> (The flash starts at absolute address 0xfc000000
>>>> & size is 0x4000000)
>>>> When the kernel starts I see the messages attached below,
>>>> which I think indicate that something might be wrong with
>>>> the detection of the flsah.
>>>> 1. Is this correct ? - something is wrong with the flash detection?
>>>> 2. Which device I need to use in order to read/write to
>>>> the flash? (I don't see any /flash device under /dev/ only:
>>>> /dev/mtd0 .. /dev/mtd3 & /dev/mtdblock0 .. /dev/mtdblock3)
>>>>
>>>> Debug messages (DEBUG_CFI is defined):
>>>> physmap platform flash device: 04000000 at fc000000
>>>> Number of erase regions: 1
>>>> Primary Vendor Command Set: 0002 (AMD/Fujitsu Standard)
>>>> Primary Algorithm Table at 0040
>>>> Alternative Vendor Command Set: 0000 (None)
>>>> No Alternate Algorithm Table
>>>> Vcc Minimum:  2.7 V
>>>> Vcc Maximum:  3.6 V
>>>> No Vpp line
>>>> Typical byte/word write timeout: 128 \uffffs
>>>> Maximum byte/word write timeout: 1024 \uffffs
>>>> Typical full buffer write timeout: 128 \uffffs
>>>> Maximum full buffer write timeout: 4096 \uffffs
>>>> Typical block erase timeout: 1024 ms
>>>> Maximum block erase timeout: 16384 ms
>>>> Chip erase not supported
>>>> Device size: 0x2000000 bytes (32 MiB)
>>>> Flash Device Interface description: 0x0002
>>>>  - supports x8 and x16 via BYTE# with asynchronous interface
>>>> Max. bytes in buffer write: 0x20
>>>> Number of Erase Block Regions: 1
>>>>  Erase Region #0: BlockSize 0x20000 bytes, 256 blocks
>>>> physmap-flash.0: Found 2 x16 devices at 0x0 in 32-bit bank
>>>>  Amd/Fujitsu Extended Query Table at 0x0040
>>>> physmap-flash.0: CFI does not contain boot bank location. Assuming top.
>>>> number of CFI chips: 1
>>>> cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
>>>> of-flash: probe of fc000000.flash failed with error -16
>>>>
>>>> Thanks,
>>>> Liran.
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Linuxppc-embedded mailing list
>>>> Linuxppc-embedded@ozlabs.org
>>>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>>>
>>>> of-flash: probe of fc000000.flash failed with error -16
>>> You have to write some code in dts file like the phys address and other
>>> stuff. The other messages could be normal, don't worry.
>>>
>>> --
>>> Marco Stornelli
>>> Embedded Software Engineer
>>> CoRiTeL - Consorzio di Ricerca sulle Telecomunicazioni
>>> http://www.coritel.it
>>>
>>> marco.stornelli@coritel.it
>>> +39 06 72582838
>>>
>>
> 

First of all, check out the error -16 to see what exactly happens, in 
addition, check out the chip select configuration and the kernel 
configuration, for example you have to select "Flash device in physical 
memory map based on OF description".

-- 
Marco Stornelli
Embedded Software Engineer
CoRiTeL - Consorzio di Ricerca sulle Telecomunicazioni
http://www.coritel.it

marco.stornelli@coritel.it
+39 06 72582838

  parent reply	other threads:[~2008-07-09  6:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-07 19:16 flash driver liran raz
2008-07-08  6:34 ` Marco Stornelli
     [not found]   ` <e3b3ab5c0807081104w44565527m5602c9d6e85b5875@mail.gmail.com>
     [not found]     ` <e3b3ab5c0807081106l50914537xc41f777669655c52@mail.gmail.com>
2008-07-09  7:00       ` Marco Stornelli [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-08-14 19:40 Flash Driver Navin Boppuri
2001-08-14 19:54 ` Wolfgang Denk
2001-08-14 19:32 Wolfgang Denk
2001-08-14 19:15 Navin Boppuri
2001-08-13 22:09 Navin Boppuri
2001-08-13 22:28 ` Wolfgang Denk

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=48746200.6020602@coritel.it \
    --to=marco.stornelli@coritel.it \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=liranrazlinux@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).