From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 8/8] mtd: vf610_nfc: enable ONFI detection
Date: Mon, 20 Apr 2015 18:17:31 -0500 [thread overview]
Message-ID: <1429571851.4352.45.camel@freescale.com> (raw)
In-Reply-To: <1428504281-30214-9-git-send-email-stefan@agner.ch>
On Wed, 2015-04-08 at 16:44 +0200, Stefan Agner wrote:
> + case ALT_BUF_ONFI:
> + /* Reverse byte since the controller uses big endianness */
> + c = nfc->column % 4;
> + c = nfc->column - c + (3 - c);
These two lines can be simplified to "c = nfc->column ^ 3;"
Doesn't this driver run on some big-endian targets, in which case you
wouldn't want to reverse? I think you should instead be using in_be32()
and then extracting the byte within the word after it's been put into
cpu byte order.
> + tmp = *((u8 *)(nfc->regs + NFC_MAIN_AREA(0) + c));
> + break;
> + default:
> + tmp = *((u8 *)(nfc->regs + NFC_MAIN_AREA(0) + c));
> + break;
Why is the byte order different here? I guess you've been writing data
backwards onto the NAND chip? Won't that mess up factory bad block
markers?
-Scott
next prev parent reply other threads:[~2015-04-20 23:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 14:44 [U-Boot] [PATCH v2 0/8] mtd: vf610_nfc: various fixes and improvements Stefan Agner
2015-04-08 14:44 ` [U-Boot] [PATCH v2 1/8] mtd: vf610_nfc: remove caching of page in buffer Stefan Agner
2015-04-08 14:44 ` [U-Boot] [PATCH v2 2/8] mtd: vf610_nfc: remove read on SEQIN Stefan Agner
2015-04-08 14:44 ` [U-Boot] [PATCH v2 3/8] mtd: vf610_nfc: allow bitflips in an empty page Stefan Agner
2015-04-08 14:44 ` [U-Boot] [PATCH v2 4/8] mtd: vf610_nfc: implement OOB only read Stefan Agner
2015-04-08 14:44 ` [U-Boot] [PATCH v2 5/8] mtd: vf610_nfc: use in-band bad block table Stefan Agner
2015-04-08 14:44 ` [U-Boot] [PATCH v2 6/8] mtd: vf610_nfc: add Freescale NFC controller configs to Kconfig Stefan Agner
2015-04-08 14:44 ` [U-Boot] [PATCH v2 7/8] mtd: vf610_nfc: add 32-error correction option for HW ECC Stefan Agner
2015-04-08 14:44 ` [U-Boot] [PATCH v2 8/8] mtd: vf610_nfc: enable ONFI detection Stefan Agner
2015-04-20 23:17 ` Scott Wood [this message]
2015-05-08 15:49 ` Stefan Agner
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=1429571851.4352.45.camel@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