From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 RESEND 2/4] mtd/NAND: Add FSMC driver support
Date: Wed, 16 May 2012 11:54:50 -0500 [thread overview]
Message-ID: <4FB3DBDA.2070801@freescale.com> (raw)
In-Reply-To: <4dc294de330f527ba943deb9230fcccd46229064.1337169928.git.amit.virdi@st.com>
On 05/16/2012 07:06 AM, Amit Virdi wrote:
> + if ((bits_ecc + bits_data) <= 8) {
> + if (bits_data)
> + memset(dat, 0xff, 512);
> + return bits_data;
return bits_data + bits_ecc;
> + i = 0;
> + while (num_err--) {
> + change_bit(0, &err_idx[i]);
> + change_bit(1, &err_idx[i]);
Where is change_bit defined? I see __change_bit in
arch/arm/include/asm/bitops.h, but change_bit is defined as an extern
prototype. In Linux change_bit (without the __) is defined as an atomic
operation, which probably isn't appropriate here.
These two in particular could just be err_idx[i] ^= 3, right?
> + if (err_idx[i] < 512 * 8) {
> + change_bit(err_idx[i], dat);
> + i++;
> + }
Increment i unconditionally.
-Scott
next prev parent reply other threads:[~2012-05-16 16:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 12:06 [U-Boot] [PATCH V3 RESEND 0/4] mtd/NAND: Support for FSMC controller Amit Virdi
2012-05-16 12:06 ` [U-Boot] [PATCH V3 RESEND 1/4] ARM: Define change_bit routine Amit Virdi
2012-05-16 12:06 ` [U-Boot] [PATCH V3 RESEND 2/4] mtd/NAND: Add FSMC driver support Amit Virdi
2012-05-16 16:54 ` Scott Wood [this message]
2012-05-17 12:19 ` Amit Virdi
2012-05-16 12:06 ` [U-Boot] [PATCH V3 RESEND 3/4] SPEAr: Configure FSMC driver for NAND interface Amit Virdi
2012-05-16 12:06 ` [U-Boot] [PATCH V3 RESEND 4/4] mtd/NAND: Remove obsolete SPEAr specific NAND drivers Amit Virdi
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=4FB3DBDA.2070801@freescale.com \
--to=scottwood@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox