From: David Woodhouse <dwmw2@infradead.org>
To: Jan Rovins <jrovins@ss7-link.com>
Cc: mtd@infradead.org, Steve Ferri <sferri@ss7-link.com>
Subject: Re: MTD on a Motorola MPCN765 ?
Date: Tue, 17 Apr 2001 15:45:11 +0100 [thread overview]
Message-ID: <25732.987518711@redhat.com> (raw)
In-Reply-To: <F1BD619B2A58D41197990050DA2C08E40258D8@SLINK12>
jrovins@ss7-link.com said:
> I tried some guesses at AMD CFI configuration, but it looks like our
> board has exotic flash chips & geometry that are not currently
> supported in MTD. (Time to roll up my sleeves & start hacking code)
> The MPCN765 has a 16MB bank of flash that is 64 bits wide (Ugh!) and
> is comprised of four 16 bit devices.
Hmmm. This isn't currently supported, but it should be on 64-bit platforms.
In a few places, we currently assume that __u32 is big enough to hold the
largest word for accessing flash - when building commands, etc.
If we change that to 'unsigned long' and put all the 64-bit stuff inside
"#ifdef BITS_PER_LONG >= 64" we should be OK.
jrovins@ss7-link.com said:
> Right now I am looking for some general guidance as to which direction
> to proceed. my gut feel is to do a board specific Mapping
> implementation, because of the strange geometry. The other alternative
> would be to expand the generic AMD/CFI stuff so that it could
> accommodate our board's flash geometry.
You need both - you'll need to provide a board-specific mapping driver, and
you also need to extend the generic code a little so it can cope with
64-bit busses.
Roughly:
1. Provide cfi64_to_cpu and cpu_to_cfi64 in include/linux/mtd/cfi_endian.h
2. Add the necessary 64-bit parts to the inline routines in cfi.h -
cfi_write(), cfi_read(), cfi_read_query(), cfi_build_cmd(), etc.,
and make them use 'unsigned long' instead of __u32 for holding
a bus word.
Also add the CFIDEV_BUSWIDTH_8 definitions. You can leave out
CFIDEV_INTERLEAVE_8 for now unless you're feeling virtuous.
3. Fix up the CFI command set drivers to use unsigned long too, and add the
64-bit cases where appropriate.
Remember to surround all 64-bit stuff with #ifdef CFIDEV_BUSWIDTH_8 (which
in turn is dependent on BITS_PER_LONG >= 64).
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
prev parent reply other threads:[~2001-04-17 14:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-12 23:11 MTD on a Motorola MPCN765 ? Jan Rovins
2001-04-17 14:45 ` David Woodhouse [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=25732.987518711@redhat.com \
--to=dwmw2@infradead.org \
--cc=jrovins@ss7-link.com \
--cc=mtd@infradead.org \
--cc=sferri@ss7-link.com \
/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.