From: David Woodhouse <dwmw2@infradead.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: jwboyer@gmail.com, linux-mtd@lists.infradead.org,
Corinna Schultz <cschultz@linux.vnet.ibm.com>
Subject: Re: [PATCH 1/2] mtd: Fix cfi_send_gen_cmd the handling of x16 devices in x8 mode
Date: Sat, 01 Nov 2008 10:43:02 +0000 [thread overview]
Message-ID: <1225536182.16774.166.camel@macbook.infradead.org> (raw)
In-Reply-To: <m163n7hh8i.fsf_-_@frodo.ebiederm.org>
On Sat, 2008-11-01 at 03:29 -0700, Eric W. Biederman wrote:
> @@ -1808,9 +1808,7 @@ static inline u32 jedec_read_mfr(struct map_info *map, uint32_t base,
> * several first banks can contain 0x7f instead of actual ID
> */
> do {
> - uint32_t ofs = cfi_build_cmd_addr(0 + (bank << 8),
> - cfi_interleave(cfi),
> - cfi->device_type);
> + uint32_t ofs = cfi_build_cmd_addr(0 + (bank << 8), map, cfi);
> mask = (1 << (cfi->device_type * 8)) - 1;
> result = map_read(map, base + ofs);
> bank++;
I think this one is still broken by your patch -- it's the exception to
your observation that we only ever use addresses ending in 00, 55 or aa.
>
> + /* Modify the unlock address if we are in compatiblity mode.
> + * For 16bit devices on 8 bit busses
> + * and 32bit devices on 16 bit busses
> + * set the low bit of the alternating bit sequence of the address.
> + */
> + if (((type * interleave) > bankwidth) && (cmd_addr & 2))
> + addr |= (type >> 1)*interleave;
Perhaps '&& ((cmd_addr & 0xff) == 0xaa)' is the answer?
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
next prev parent reply other threads:[~2008-11-01 10:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 23:53 ST M29W320D incorrectly configured Corinna Schultz
2008-10-30 20:33 ` cfi_cmdset_0002.c possible BUG (was Re: ST M29W320D incorrectly configured) Corinna Schultz
2008-10-31 14:38 ` ST M29W320D incorrectly configured David Woodhouse
2008-10-31 22:50 ` Corinna Schultz
2008-11-01 4:44 ` Eric W. Biederman
2008-11-01 7:18 ` David Woodhouse
2008-11-01 6:33 ` Eric W. Biederman
2008-11-01 7:33 ` David Woodhouse
2008-11-01 8:36 ` Eric W. Biederman
2008-11-01 8:49 ` David Woodhouse
2008-11-01 10:23 ` Eric W. Biederman
2008-11-01 10:29 ` [PATCH 1/2] mtd: Fix cfi_send_gen_cmd the handling of x16 devices in x8 mode Eric W. Biederman
2008-11-01 10:31 ` [PATCH 2/2] mtd: Simplify cfi_send_gen_cmd Eric W. Biederman
2008-11-01 10:43 ` David Woodhouse [this message]
2008-11-01 10:58 ` [PATCH 1/2] mtd: Fix cfi_send_gen_cmd the handling of x16 devices in x8 mode David Woodhouse
2008-11-01 11:26 ` Eric W. Biederman
2008-11-01 11:19 ` [PATCH] mtd: Fix cfi_send_gen_cmd the handling of x16 devices in x8 mode v4 Eric W. Biederman
2008-11-01 7:04 ` ST M29W320D incorrectly configured Eric W. Biederman
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=1225536182.16774.166.camel@macbook.infradead.org \
--to=dwmw2@infradead.org \
--cc=cschultz@linux.vnet.ibm.com \
--cc=ebiederm@xmission.com \
--cc=jwboyer@gmail.com \
--cc=linux-mtd@lists.infradead.org \
/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