From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] ppc4xx: Fix ECC Correction bug with SMC ordering for NDFC driver
Date: Tue, 25 Aug 2009 17:45:26 +0200 [thread overview]
Message-ID: <200908251745.26167.sr@denx.de> (raw)
In-Reply-To: <1250877582-16538-1-git-send-email-fkan@amcc.com>
On Friday 21 August 2009 19:59:42 Feng Kan wrote:
> Fix ECC Correction bug where the byte offset location were double
> flipped causing correction routine to toggle the wrong byte location
> in the ECC segment. The ndfc_calculate_ecc routine change the order
> of getting the ECC code.
> /* The NDFC uses Smart Media (SMC) bytes order */
> ecc_code[0] = p[2];
> ecc_code[1] = p[1];
> ecc_code[2] = p[3];
> But in the Correction algorithm when calculating the byte offset
> location, the s1 is used as the upper part of the address. Which
> again reverse the order making the final byte offset address
> location incorrect.
> byteoffs = (s1 << 0) & 0x80;
> .
> .
> byteoffs |= (s0 >> 4) & 0x08;
> The order is change to read it in straight and let the correction
> function to revert it to SMC order.
>
> Signed-off-by: Feng Kan <fkan@amcc.com>
> Acked-by: Victor Gallardo <vgallardo@amcc.com>
> Acked-by: Prodyut Hazarika <phazarika@amcc.com>
Applied to u-boot-ppc4xx/master. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
prev parent reply other threads:[~2009-08-25 15:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-21 17:59 [U-Boot] [PATCH 1/1] ppc4xx: Fix ECC Correction bug with SMC ordering for NDFC driver Feng Kan
2009-08-25 15:45 ` Stefan Roese [this message]
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=200908251745.26167.sr@denx.de \
--to=sr@denx.de \
--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