All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Wei-r63237 <Wei.Zhang@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Fixed cfi flash read uchar bug.
Date: Thu, 4 Jan 2007 10:07:18 +0800	[thread overview]
Message-ID: <46B96294322F7D458F9648B60E15112C03EE48@zch01exm26.fsl.freescale.net> (raw)
In-Reply-To: <4590BB87.2010603@freescale.com>

Hi, Wolfgang,

Any feedback about this mail?

Thanks!

Zhang Wei 

> -----Original Message-----
> From: u-boot-users-bounces at lists.sourceforge.net 
> [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf 
> Of Zhang Wei
> Sent: Tuesday, December 26, 2006 2:05 PM
> To: Wolfgang Denk
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] [PATCH] Fixed cfi flash read uchar bug.
> 
> Hi, Wolfgang,
> 
> 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.
> > Can you please point out which specific part of the Linux 
> MTD code you
> > mean? And which version of the code?
> >   
> The reference codes is in Linux Kernel 2.6.19.
> 
> drivers/mtd/chips/cfi_probe.c: cfi_chip_setup() calls:
>     int num_erase_regions = cfi_read_query(map, base + (0x10 + 
> 28)*ofs_factor);
> include/linux/mtd/cfi.h: cfi_read_query() calls:
>     map_word val = map_read(map, addr);
> include/linux/mtd/map.h defines:
>     #define map_read(map, ofs) inline_map_read(map, ofs)
> include/linux/mtd/map.h: function inline_map_read() body:
> static inline map_word inline_map_read(struct map_info *map, unsigned 
> long ofs)
> {
>     map_word r;
> 
>     if (map_bankwidth_is_1(map))
>         r.x[0] = __raw_readb(map->virt + ofs);
>     else if (map_bankwidth_is_2(map))
>         r.x[0] = __raw_readw(map->virt + ofs);
>     else if (map_bankwidth_is_4(map))
>         r.x[0] = __raw_readl(map->virt + ofs);
> #if BITS_PER_LONG >= 64
>     else if (map_bankwidth_is_8(map))
>         r.x[0] = __raw_readq(map->virt + ofs);
> #endif
>     else if (map_bankwidth_is_large(map))
>         memcpy_fromio(r.x, map->virt+ofs, map->bankwidth);
> 
>     return r;
> }
> And the 'map_word' definition in include/linux/mtd/map.h is below:
> typedef union {
>     unsigned long x[MAX_MAP_LONGS];
> } map_word;
> 
> > I have to admit that I don't really understand this. I would not be
> > surprised that some statement like this can be found in some chip
> > errata, but I would like to know this for certain first.
> >   
> I only find one clue from 'Spinsion S29GL064M90TFIR6' specification, 
> which is the comment 'Data bits DQ15?DQ8 are don?t care. ' 
> for 'RESET' 
> command. And the comment has not found in some other AMD, 
> Spinsion chips 
> specifications.
> > For me this is an indication that the problem is  actually  
> somewhere
> > else,  and while your modification might actually fix the 
> symptoms, I
> > doubt that it is the correct fix - or the correct  problem. 
>  If  your
> > explanation was right, this should not depend on compiler versions.
> >   
> 
> This is a real weird issue. The compiler is also a factor. Chris's 
> different compilers get the different results. In fact, the same gcc 
> with different size codes will also get different results.
> 
> Thanks!
> 
> Best Regards,
> Zhang Wei
> 
> 
> --------------------------------------------------------------
> -----------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the 
> chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
&CID=DEVDEV
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 

  reply	other threads:[~2007-01-04  2:07 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 [this message]
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
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=46B96294322F7D458F9648B60E15112C03EE48@zch01exm26.fsl.freescale.net \
    --to=wei.zhang@freescale.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.