* Flash Driver
@ 2001-08-13 22:09 Navin Boppuri
2001-08-13 22:28 ` Wolfgang Denk
0 siblings, 1 reply; 9+ messages in thread
From: Navin Boppuri @ 2001-08-13 22:09 UTC (permalink / raw)
To: Linuxppc-Embedded (E-mail)
Hello,
Can someone tell me how to set up and use the flash driver in the 2.4.x
Linux kernel. I see a CFI and non-CFI support for the AMD flash chips. I
am using an AMD flash chip on my board. Which one of the drivers do I
load? How are these initialized?
I have not been able to find any documentation on this. Any help is very
appreciated.
Thank you,
Navin.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Flash Driver
2001-08-13 22:09 Flash Driver Navin Boppuri
@ 2001-08-13 22:28 ` Wolfgang Denk
0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2001-08-13 22:28 UTC (permalink / raw)
To: Navin Boppuri; +Cc: Linuxppc-Embedded (E-mail)
In message <3A494DE356A49A40B37442E1E0D9F3B5063418@ptah.ad.newisys.com> you wrote:
>
> Can someone tell me how to set up and use the flash driver in the 2.4.x
> Linux kernel. I see a CFI and non-CFI support for the AMD flash chips. I
You mean the driver we maintain?
> am using an AMD flash chip on my board. Which one of the drivers do I
> load? How are these initialized?
For AMD chips, configure:
CONFIG_FLASH=y
CONFIG_AMD_FLASH=y
Add a "partition" scheme for your board to "drivers/char/flash_config.c";
see the comment in this file.
There is no more configuration needed (assuming you are booting from
PPCBoot, which will pass the necessary parameters to the Linux kernel
[physical start address and size of the flash memory]).
> I have not been able to find any documentation on this. Any help is very
> appreciated.
Just ask :-)
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
Q: How do you spell "onomatopoeia"?
A: The way it sounds.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Flash Driver
@ 2001-08-14 19:15 Navin Boppuri
0 siblings, 0 replies; 9+ messages in thread
From: Navin Boppuri @ 2001-08-14 19:15 UTC (permalink / raw)
To: Wolfgang Denk, Linuxppc-Embedded (E-mail)
Coool!! Now I have the flash driver registering itself and telling me
all about the number of partitions on my flash etc. etc. I have the
flash device in the /dev directory. Now, how do I use them? I remember
using them before using the dd command.
Thank you,
Navin.
-----Original Message-----
From: Wolfgang Denk [mailto:wd@denx.de]
Sent: Monday, August 13, 2001 5:29 PM
To: Navin Boppuri
Cc: Linuxppc-Embedded (E-mail)
Subject: Re: Flash Driver
In message <3A494DE356A49A40B37442E1E0D9F3B5063418@ptah.ad.newisys.com>
you wrote:
>
> Can someone tell me how to set up and use the flash driver in the
2.4.x
> Linux kernel. I see a CFI and non-CFI support for the AMD flash chips.
I
You mean the driver we maintain?
> am using an AMD flash chip on my board. Which one of the drivers do I
> load? How are these initialized?
For AMD chips, configure:
CONFIG_FLASH=y
CONFIG_AMD_FLASH=y
Add a "partition" scheme for your board to
"drivers/char/flash_config.c";
see the comment in this file.
There is no more configuration needed (assuming you are booting from
PPCBoot, which will pass the necessary parameters to the Linux kernel
[physical start address and size of the flash memory]).
> I have not been able to find any documentation on this. Any help is
very
> appreciated.
Just ask :-)
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
Q: How do you spell "onomatopoeia"?
A: The way it sounds.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Flash Driver
@ 2001-08-14 19:32 Wolfgang Denk
0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2001-08-14 19:32 UTC (permalink / raw)
To: Navin Boppuri; +Cc: Linuxppc-Embedded (E-mail)
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]
In message <3A494DE356A49A40B37442E1E0D9F3B506341C@ptah.ad.newisys.com> you wrote:
>
> Coool!! Now I have the flash driver registering itself and telling me
> all about the number of partitions on my flash etc. etc. I have the
> flash device in the /dev directory. Now, how do I use them? I remember
> using them before using the dd command.
That's one option. If your write() calls are the same or a multiple
of the erase block size, the driver performs auto-erase. You you can
just read / write it.
Attached below is a small patch against busybox to add flash_info and
flash_erase as busybox applets. [That's part of SELF, our Simple
Embedded Linux Framework; I just wish I'd find the time to complete
the documentation so I could put it all up for FTP...]
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
"He only drinks when he gets depressed." "Why does he get depressed?"
"Sometimes it's because he hasn't had a drink."
- Terry Pratchett, _Men at Arms_
[-- Attachment #2: busybox-0.51-flash.patch.gz --]
[-- Type: application/x-gzip , Size: 2921 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Flash Driver
@ 2001-08-14 19:40 Navin Boppuri
2001-08-14 19:54 ` Wolfgang Denk
0 siblings, 1 reply; 9+ messages in thread
From: Navin Boppuri @ 2001-08-14 19:40 UTC (permalink / raw)
To: Linuxppc-Embedded (E-mail)
Can I have the dd commands once again? I am not using busybox stuff.
Thank you.
-----Original Message-----
From: Wolfgang Denk [mailto:wd@denx.de]
Sent: Tuesday, August 14, 2001 2:32 PM
To: Navin Boppuri
Cc: Linuxppc-Embedded (E-mail)
Subject: Re: Flash Driver
In message <3A494DE356A49A40B37442E1E0D9F3B506341C@ptah.ad.newisys.com>
you wrote:
>
> Coool!! Now I have the flash driver registering itself and telling me
> all about the number of partitions on my flash etc. etc. I have the
> flash device in the /dev directory. Now, how do I use them? I remember
> using them before using the dd command.
That's one option. If your write() calls are the same or a multiple
of the erase block size, the driver performs auto-erase. You you can
just read / write it.
Attached below is a small patch against busybox to add flash_info and
flash_erase as busybox applets. [That's part of SELF, our Simple
Embedded Linux Framework; I just wish I'd find the time to complete
the documentation so I could put it all up for FTP...]
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
"He only drinks when he gets depressed." "Why does he get depressed?"
"Sometimes it's because he hasn't had a drink."
- Terry Pratchett, _Men at Arms_
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Flash Driver
2001-08-14 19:40 Navin Boppuri
@ 2001-08-14 19:54 ` Wolfgang Denk
0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2001-08-14 19:54 UTC (permalink / raw)
To: Navin Boppuri; +Cc: Linuxppc-Embedded (E-mail)
In message <3A494DE356A49A40B37442E1E0D9F3B506341D@ptah.ad.newisys.com> you wrote:
>
> Can I have the dd commands once again? I am not using busybox stuff.
dd if=some_file of=/dev/flashXY bs=ZZZk conv=sync
whith:
X = 'a' for the first, 'b' for the second flash bank, etc.
Y = number of the flash partition (1 = 1st, 2 = 2nd, etc.)
ZZZ = your erase block size
For instance, I can use
dd if=/tmp/ppcboot.bin of=/dev/flasha1 bs=128k conv=sync
to write a new PPCboot image to soem of our boards.
Be careful - /dev/flasha is the full 1st flash bank (unpartitioned).
The devices names are similar to those of harddisks.
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
Remember, there's a big difference between kneeling down and bending
over. - Frank Zappa
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* flash driver
@ 2008-07-07 19:16 liran raz
2008-07-08 6:34 ` Marco Stornelli
0 siblings, 1 reply; 9+ messages in thread
From: liran raz @ 2008-07-07 19:16 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2029 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 2242 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flash driver
2008-07-07 19:16 flash driver liran raz
@ 2008-07-08 6:34 ` Marco Stornelli
[not found] ` <e3b3ab5c0807081104w44565527m5602c9d6e85b5875@mail.gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Marco Stornelli @ 2008-07-08 6:34 UTC (permalink / raw)
To: liran raz; +Cc: linuxppc-embedded
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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-07-09 6:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-13 22:09 Flash Driver Navin Boppuri
2001-08-13 22:28 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2001-08-14 19:15 Navin Boppuri
2001-08-14 19:32 Wolfgang Denk
2001-08-14 19:40 Navin Boppuri
2001-08-14 19:54 ` Wolfgang Denk
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 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).