public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] cfi_flash.c patches
@ 2005-08-19  4:27 Sangmoon Kim
  2005-08-19 18:36 ` Tolunay Orkun
  2006-02-28 16:34 ` [U-Boot-Users] [PATCH] cfi_flash.c patches Wolfgang Denk
  0 siblings, 2 replies; 32+ messages in thread
From: Sangmoon Kim @ 2005-08-19  4:27 UTC (permalink / raw)
  To: u-boot

Hi,
The two patches attached are for drivers/cfi_flash.c.

cfi_flash-protect.patch adds CFG_FLASH_PROTECT_CLEAR
because for some flash memories(such as 28F320C3)
all banks are protected after reset.

cfi_flash-buffer.patch makes write_buff not to call 
flash_write_cfibuffer if buffer_size is1.
Because for flash memories with buffer_size 1,
buffer write is not supported.

Regards,
Sangmoon Kim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cfi_flash-buffer.patch
Type: application/octet-stream
Size: 1358 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20050819/16713e20/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cfi_flash-protect.patch
Type: application/octet-stream
Size: 1158 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20050819/16713e20/attachment-0001.obj 

^ permalink raw reply	[flat|nested] 32+ messages in thread
* [U-Boot-Users] [PATCH] cfi_flash.c patches
@ 2005-08-19 18:47 Woodruff, Richard
  2005-08-19 20:16 ` Tolunay Orkun
  0 siblings, 1 reply; 32+ messages in thread
From: Woodruff, Richard @ 2005-08-19 18:47 UTC (permalink / raw)
  To: u-boot

Tolunay,

Several Intel chips do provide hardware level protection locks which get
cleared at reset.

It is useful to use this hardware feature at boot to help protect flash
sectors from upper level code during normal operation.  The u-boot
software lock is nice, but doesn't extend beyond u-boot code while the
hardware lock does.

The difference in behavior between chips is the issue here.  Perhaps it
is better to add another compile time flag which allows the hardware
features to be used on such chips.

Your point is one _hardware_ features behavior should be valued over
another's.  Having them both via flags is probably the way to go.

Regards,
Richard W.

> -----Original Message-----
> From: u-boot-users-admin at lists.sourceforge.net [mailto:u-boot-users-
> admin at lists.sourceforge.net] On Behalf Of Tolunay Orkun
> Sent: Friday, August 19, 2005 1:37 PM
> To: Sangmoon Kim
> Cc: u-boot; Wolfgang Denk
> Subject: Re: [U-Boot-Users] [PATCH] cfi_flash.c patches
> 
> Dear Sangmoon,
> 
> I've examined your patch for clearing the protection of flash sectors
> automatically during flash init. As a matter of fact a similar patch
was
> also proposed by someone else and I had commented on it as well.
> 
> I think this is wrong approach. These sectors are protected for a
reason
> (to prevent accidental writes - forgetting to enable protection).
> 
> You should enable CFG_FLASH_PROTECTION in your board config file. If
you
> don't do this U-Boot will do software protection of sectors (which is
> really for those flash chips with no hardware protection capability)
and
> "protect off" will not issue unlock commands as you may have
witnessed.
> 
> CFG_FLASH_PROTECTION will enable the "protect  off" command to disable
> protection properly on these sectors as it should.
> 
> IMHO, No patch is needed here! Perhaps we need to add a couple of
> comment lines in README (DULG?) for documentation purposes. Wolfgang,
> can you comment here.
> 
> Best regards,
> Tolunay
> 
> Sangmoon Kim wrote:
> > Hi,
> > The two patches attached are for drivers/cfi_flash.c.
> >
> > cfi_flash-protect.patch adds CFG_FLASH_PROTECT_CLEAR
> > because for some flash memories(such as 28F320C3)
> > all banks are protected after reset.
> >
> > cfi_flash-buffer.patch makes write_buff not to call
> > flash_write_cfibuffer if buffer_size is1.
> > Because for flash memories with buffer_size 1,
> > buffer write is not supported.
> >
> > Regards,
> > Sangmoon Kim
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing
& QA
> Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users

^ permalink raw reply	[flat|nested] 32+ messages in thread
* [U-Boot-Users] [PATCH] cfi_flash.c patches
@ 2005-08-19 20:22 Woodruff, Richard
  0 siblings, 0 replies; 32+ messages in thread
From: Woodruff, Richard @ 2005-08-19 20:22 UTC (permalink / raw)
  To: u-boot

> I do not know of any Intel flash that would unlock sectors on "Reset".
> Can you be specific? Even so it is not relevant to the problem of this
> specific flash which does 100% opposite (intentionally and for a very
> good reason)

28F256L18. If I issue lock commands they take and further writes are not
allowed with out an unlock sequence.  If I power cycle the board all
previous lock information is no longer there.

> I do know early Intel flash would unlock all flashs sectors as you
> unlock one so all previous locks would have to be redone. U-Boot has
> code to fix this. I think you are confusing with this type of Intel
flash.

I think this is something else also.  I'll scan the rest of your
comments in a bit.

Regards,
Richard W.

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2006-02-28 16:34 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-19  4:27 [U-Boot-Users] [PATCH] cfi_flash.c patches Sangmoon Kim
2005-08-19 18:36 ` Tolunay Orkun
2005-08-22  5:37   ` Sangmoon Kim
2005-08-22  6:31     ` Tolunay Orkun
2005-08-22  7:13       ` Sangmoon Kim
2005-08-22 15:37         ` Tolunay Orkun
2005-08-22 16:17           ` Wolfgang Denk
2005-08-22 16:49             ` Tolunay Orkun
2005-08-22 20:49               ` Wolfgang Denk
2005-08-22 16:41           ` Scott McNutt
2005-08-23  1:53           ` Sangmoon Kim
2005-08-22  7:58       ` Wolfgang Denk
2005-08-22 17:02         ` Tolunay Orkun
2005-08-22 20:53           ` Wolfgang Denk
2005-08-22 22:05             ` Tolunay Orkun
2005-08-22 22:46               ` Wolfgang Denk
2005-08-23  7:14                 ` Yuli Barcohen
2005-08-23  8:39                   ` Sangmoon Kim
2005-08-23 14:47                 ` Brian Waite
2005-08-23 20:24                   ` Wolfgang Denk
2005-08-24  5:58                     ` Yuli Barcohen
2005-08-24 16:00                     ` Detlev Zundel
2005-08-24 21:52                       ` Tolunay Orkun
2005-08-24 23:12                         ` Wolfgang Denk
2005-08-25 14:37                           ` Brian Waite
2005-08-25 16:37                           ` Tolunay Orkun
2005-08-26 14:12                             ` U-Boot policy on flash protection (was [U-Boot-Users] [PATCH] cfi_flash.c patches) Detlev Zundel
2005-08-26 14:45                               ` Wolfgang Denk
2006-02-28 16:34 ` [U-Boot-Users] [PATCH] cfi_flash.c patches Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2005-08-19 18:47 Woodruff, Richard
2005-08-19 20:16 ` Tolunay Orkun
2005-08-19 20:22 Woodruff, Richard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox