From: Tolunay Orkun <listmember@orkun.us>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Fixed cfi flash read uchar bug.
Date: Sun, 07 Jan 2007 04:12:07 -0600 [thread overview]
Message-ID: <45A0C777.1000508@orkun.us> (raw)
In-Reply-To: <200701051428.21262.sr@denx.de>
Stefan Roese wrote:
> On Thursday 04 January 2007 10:23, Wolfgang Denk wrote:
>>> Wolfgang Denk wrote:
>>>> Now this is what I want to understand. What exactly is the "potential
>>>> problem"?
>>> That's the issue in the flash 'Spinsion S29GL064M90TFIR6' with x16
>>> connection. After running flash_read_jedec_ids(), any follow CFI query
>>> command will get the data with high 8bit = 0xff, but the low 8bit is
>>> valid. And if we only read low 8bit, we'll get the 0xff too. In
>>> addition, the second follow CFI query command has no that issue. So, I
>>> read the full 16bit date and only take the valid low 8bit.
>> etc. etc.
>>
>> I didn't see any new facts in your current posting. My position has
>> not changed either: I don't see how your character-wise copy using
>> memcpy() would be different from accessing the flash through a uchar
>> pointer; also I still think that if the compiler version changes
>> behaviour then we don't really understand what's going on here.
>>
>> Maybe Tolunay or Stefan can comment now that both are back from their
>> Xmas breaks; they both know the CFI driver much better than me.
>
> What I noticed after looking at the flash access functions like
> flash_read_uchar() is that no access macros and even no volatile pointer
> access is used to read from the flash. This looks like a potential problem,
> that can show when using different compiler versions.
>
> Please find attached a small patch that adds fixes this potential problem for
> the 3 functions flash_read_uchar/ushort/long. Please give it a try and let me
> know if this changed the behavior somehow.
I think this is a good idea given GCC 4.x is agressive in optimizations.
I do not think converting these to use memcpy() is a good idea. I am
with Wolfgang on this.
I think we should commit Stefan's patch even if it might or might not
solve the problem Zhang is experiencing.
Best regards,
Tolunay
next prev parent reply other threads:[~2007-01-07 10:12 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-22 7:27 [U-Boot-Users] [PATCH] Fixed cfi flash read uchar bug wei.zhang at freescale.com
2006-12-22 10:00 ` Wolfgang Denk
2006-12-22 11:02 ` Zhang Wei
2006-12-22 14:11 ` Wolfgang Denk
2006-12-22 16:34 ` [U-Boot-Users] 答复: " Zhang Wei-r63237
2006-12-22 17:17 ` Wolfgang Denk
2006-12-25 7:03 ` Zhang Wei
2006-12-25 23:24 ` Wolfgang Denk
2006-12-26 6:04 ` Zhang Wei
2007-01-04 2:07 ` Zhang Wei-r63237
2007-01-04 8:17 ` Wolfgang Denk
2007-01-04 8:36 ` Zhang Wei-r63237
2007-01-04 9:23 ` Wolfgang Denk
2007-01-04 11:19 ` Stefan Roese
2007-01-05 13:27 ` Stefan Roese
2007-01-07 10:12 ` Tolunay Orkun [this message]
2007-01-07 10:40 ` Wolfgang Denk
2007-01-13 7:11 ` Tolunay Orkun
2007-01-13 17:53 ` Håvard Skinnemoen
2007-01-16 6:52 ` Stefan Roese
2007-01-25 4:38 ` Zhang Wei-r63237
2007-01-25 16:10 ` Timur Tabi
2007-01-25 20:33 ` Wolfgang Denk
2007-01-26 2:13 ` Zhang Wei-r63237
2007-01-29 11:29 ` Tolunay Orkun
2007-01-30 3:36 ` Wang Haiying-r54964
2007-01-31 9:01 ` Tolunay Orkun
2007-01-31 19:25 ` Haiying Wang
2007-02-01 5:26 ` Tolunay Orkun
2007-02-01 22:06 ` Haiying Wang
2007-02-01 22:52 ` Chris Fester
2007-02-09 17:47 ` [U-Boot-Users] [PATCH0/2] Re-do the patch for adding DO_SYNC in flash_write_cmd Haiying Wang
2007-02-09 19:42 ` Wolfgang Denk
2007-02-09 19:48 ` Haiying Wang
2007-02-10 1:04 ` Wolfgang Denk
2007-02-10 7:23 ` Tolunay Orkun
2007-02-10 7:40 ` Stefan Roese
2007-02-10 7:57 ` Tolunay Orkun
2007-02-10 8:07 ` Stefan Roese
2007-02-10 21:55 ` Wolfgang Denk
2007-02-10 21:54 ` Wolfgang Denk
2007-02-11 2:34 ` Timur Tabi
2007-02-11 10:23 ` Wolfgang Denk
2007-02-09 19:59 ` Haavard Skinnemoen
2007-02-10 1:02 ` Wolfgang Denk
2007-02-09 17:47 ` [U-Boot-Users] [PATCH 1/2] Add DO_SYNC at the end of flash_write_cmd Haiying Wang
2007-02-09 19:45 ` Wolfgang Denk
2007-02-09 17:47 ` [U-Boot-Users] [PATCH 2/2] Define DO_SYNC in each CPU's header file Haiying Wang
2007-02-09 19:46 ` Wolfgang Denk
2007-02-10 7:17 ` Tolunay Orkun
2007-01-08 2:41 ` [U-Boot-Users] [PATCH] Fixed cfi flash read uchar bug Zhang Wei-r63237
2006-12-22 17:07 ` Chris Fester
2006-12-22 17:24 ` Wolfgang Denk
2006-12-22 17:42 ` Chris Fester
2006-12-22 21:33 ` 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=45A0C777.1000508@orkun.us \
--to=listmember@orkun.us \
--cc=u-boot@lists.denx.de \
/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