* [U-Boot] BDI3000 - Unprotect flash sectors
@ 2013-01-11 7:41 Waibel Georg
2013-01-11 9:31 ` Stefan Roese
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Waibel Georg @ 2013-01-11 7:41 UTC (permalink / raw)
To: u-boot
Hello,
i'm not sure if this is the right place for this question...however, here it is:
i'm using a BDI3000 to program uboot to the flash (Spansion S29GL512P) on a MPC5200B base board. Erasing / Programming works fine as long as the flash sectors are not protected (via PPB bit). On a protected sector the erase command fails (what makes sense). I thought I can use the unlock command to unprotect the sectors, but this command seems not to work:
> unlock 0xfff00000 1000
Unlocking flash at 0xfff00000
# Invalid parameter for flash programming
Any ideas what I'm doing wrong?
Flash configuration:
[FLASH]
CHIPTYPE MIRRORX16
CHIPSIZE 0x04000000
BUSWIDTH 16
WORKSPACE 0x00000000
Regards
Georg Waibel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] BDI3000 - Unprotect flash sectors
2013-01-11 7:41 [U-Boot] BDI3000 - Unprotect flash sectors Waibel Georg
@ 2013-01-11 9:31 ` Stefan Roese
2013-01-14 8:03 ` Waibel Georg
2013-01-11 13:24 ` Marek Vasut
2013-01-12 4:04 ` Sinan Akman
2 siblings, 1 reply; 5+ messages in thread
From: Stefan Roese @ 2013-01-11 9:31 UTC (permalink / raw)
To: u-boot
Hi Georg,
On 01/11/2013 08:41 AM, Waibel Georg wrote:
> i'm not sure if this is the right place for this question...however,
> here it is:
>
> i'm using a BDI3000 to program uboot to the flash (Spansion S29GL512P)
> on a MPC5200B base board. Erasing / Programming works fine as long as
> the flash sectors are not protected (via PPB bit). On a protected
> sector the erase command fails (what makes sense). I thought I can
> use the unlock command to unprotect the sectors, but this command
> seems not to work:
>> unlock 0xfff00000 1000
> Unlocking flash at 0xfff00000
> # Invalid parameter for flash programming
>
> Any ideas what I'm doing wrong?
>
> Flash configuration:
> [FLASH]
> CHIPTYPE MIRRORX16
> CHIPSIZE 0x04000000
> BUSWIDTH 16
> WORKSPACE 0x00000000
Yes, the BDI doesn't support the unlocking of the Advanced Locking Bits
(PPB) of these Spansion (and other manufacturers) type chips. You need
to manually unlock the sectors in the telnet BDI session by writing the
unlocking sequence to the sector(s). Or use U-Boot to do this (if possible).
Please note that some patches to better support this PPB locking have
been applied to mainline just now. And I also have some patches to
support this PPB (un)-locking in Linux a short while ago which are still
pending:
http://lists.infradead.org/pipermail/linux-mtd/2012-December/045295.html
Hope this helps.
Thanks,
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] BDI3000 - Unprotect flash sectors
2013-01-11 7:41 [U-Boot] BDI3000 - Unprotect flash sectors Waibel Georg
2013-01-11 9:31 ` Stefan Roese
@ 2013-01-11 13:24 ` Marek Vasut
2013-01-12 4:04 ` Sinan Akman
2 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2013-01-11 13:24 UTC (permalink / raw)
To: u-boot
Dear Waibel Georg,
CCing Wolfgang, he's the expert on both IMO.
> Hello,
>
> i'm not sure if this is the right place for this question...however, here
> it is:
>
> i'm using a BDI3000 to program uboot to the flash (Spansion S29GL512P) on a
MPC5200B base board. Erasing / Programming works fine as long as the flash
sectors are not protected (via PPB bit). On a protected sector the erase command
fails (what makes sense). I thought I can use the unlock command to unprotect
the sectors, but this command seems not to work:
> > unlock 0xfff00000 1000
>
> Unlocking flash at 0xfff00000
> # Invalid parameter for flash programming
>
> Any ideas what I'm doing wrong?
>
> Flash configuration:
> [FLASH]
> CHIPTYPE MIRRORX16
> CHIPSIZE 0x04000000
> BUSWIDTH 16
> WORKSPACE 0x00000000
>
> Regards
> Georg Waibel
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] BDI3000 - Unprotect flash sectors
2013-01-11 7:41 [U-Boot] BDI3000 - Unprotect flash sectors Waibel Georg
2013-01-11 9:31 ` Stefan Roese
2013-01-11 13:24 ` Marek Vasut
@ 2013-01-12 4:04 ` Sinan Akman
2 siblings, 0 replies; 5+ messages in thread
From: Sinan Akman @ 2013-01-12 4:04 UTC (permalink / raw)
To: u-boot
On 01/11/2013 02:41 AM, Waibel Georg wrote:
> Hello,
>
> i'm not sure if this is the right place for this question...however, here it is:
>
> i'm using a BDI3000 to program uboot to the flash (Spansion S29GL512P) on a MPC5200B base board. Erasing / Programming works fine as long as the flash sectors are not protected (via PPB bit). On a protected sector the erase command fails (what makes sense). I thought I can use the unlock command to unprotect the sectors, but this command seems not to work:
>> unlock 0xfff00000 1000
Hi Georg, do you get the same error if you create an
ERASE list and have UNLOCK added as the mode for those
sectors that need to be unlocked ? Issue then ERASE or
UNLOCK without any parameter in the telnet session and
see if that makes any difference. Also, make sure that
address 0xfff00000 is the correct sector address.
Failing that, please try using the CFI interface of
your flash. Check in your flash memory data sheet for
all the CFI commands. Try to unlock a sector and then
read back the status register to see what the reported
error is. Use MD and MM commands to issue the CFI
commands to your flash.
Hope this helps
-- sinan
> Unlocking flash at 0xfff00000
> # Invalid parameter for flash programming
>
> Any ideas what I'm doing wrong?
>
> Flash configuration:
> [FLASH]
> CHIPTYPE MIRRORX16
> CHIPSIZE 0x04000000
> BUSWIDTH 16
> WORKSPACE 0x00000000
>
> Regards
> Georg Waibel
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] BDI3000 - Unprotect flash sectors
2013-01-11 9:31 ` Stefan Roese
@ 2013-01-14 8:03 ` Waibel Georg
0 siblings, 0 replies; 5+ messages in thread
From: Waibel Georg @ 2013-01-14 8:03 UTC (permalink / raw)
To: u-boot
Hi,
using BDI telnet session to issue the unprotect command works fine. Here some hints that have to be considered:
- use command mmh to do a 16 bit access on a 16 bit wide flash
- on a 16 bit wide flash the LSB address line is usually not connected (A0 of flash is connected to A1 of the host on a little endian machine). Thus the addresses required to enter flash command mode (see flash data sheet) have to be adapted (shift left by 1, 0x555 becomes 0xAAA, 0x2AA becomes 0x554)
Regards
Georg
-----Urspr?ngliche Nachricht-----
Von: Stefan Roese [mailto:sr at denx.de]
Gesendet: Freitag, 11. Januar 2013 10:31
An: Waibel Georg
Cc: 'u-boot at lists.denx.de'
Betreff: Re: [U-Boot] BDI3000 - Unprotect flash sectors
Hi Georg,
On 01/11/2013 08:41 AM, Waibel Georg wrote:
> i'm not sure if this is the right place for this question...however,
> here it is:
>
> i'm using a BDI3000 to program uboot to the flash (Spansion S29GL512P)
> on a MPC5200B base board. Erasing / Programming works fine as long as
> the flash sectors are not protected (via PPB bit). On a protected
> sector the erase command fails (what makes sense). I thought I can use
> the unlock command to unprotect the sectors, but this command seems
> not to work:
>> unlock 0xfff00000 1000
> Unlocking flash at 0xfff00000
> # Invalid parameter for flash programming
>
> Any ideas what I'm doing wrong?
>
> Flash configuration:
> [FLASH]
> CHIPTYPE MIRRORX16
> CHIPSIZE 0x04000000
> BUSWIDTH 16
> WORKSPACE 0x00000000
Yes, the BDI doesn't support the unlocking of the Advanced Locking Bits
(PPB) of these Spansion (and other manufacturers) type chips. You need to manually unlock the sectors in the telnet BDI session by writing the unlocking sequence to the sector(s). Or use U-Boot to do this (if possible).
Please note that some patches to better support this PPB locking have been applied to mainline just now. And I also have some patches to support this PPB (un)-locking in Linux a short while ago which are still
pending:
http://lists.infradead.org/pipermail/linux-mtd/2012-December/045295.html
Hope this helps.
Thanks,
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-14 8:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11 7:41 [U-Boot] BDI3000 - Unprotect flash sectors Waibel Georg
2013-01-11 9:31 ` Stefan Roese
2013-01-14 8:03 ` Waibel Georg
2013-01-11 13:24 ` Marek Vasut
2013-01-12 4:04 ` Sinan Akman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox