From: "Thomas Gleixner" <tglx@linutronix.de>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org, Marc Singer <elf@buici.com>
Subject: Re: [PATCH] MTD Maps driver for Sharp LH7a40x
Date: Sat, 19 Jun 2004 11:51:53 +0200 [thread overview]
Message-ID: <200406191151.53437.tglx@linutronix.de> (raw)
In-Reply-To: <20040619102322.A24396@flint.arm.linux.org.uk>
On Saturday 19 June 2004 11:23, Russell King - ARM Linux wrote:
>
> ATAG is only ARM because Linux doesn't like binary interfaces - and
> that's one of the reasons I don't want to see it expanding more and
> more. See the "IDE support for lh7a40x" on the linux-arm-kernel list
> for a discussion on this topic.
Ok, sounds reasonable. I did not follow this thread, as the topic was out of
my primary interest.
> > For chips which need Vpp setting for programming and erasing this is
> > rather impossible. Same applies to NAND drivers, as the NAND interface
> > can hardly be specified board independent on the commandline.
>
> You may want to take a look at how integrator-flash.c handles this
> aspect. The handling of VPP and write enables is platform specific
> and requires some code to do it, so obviously we can't encode that
> into an ATAG or command line argument.
>
> Note how integrator-flash.c is used on the Integrator/AP, Integrator/CP
> and Versatile/PB platforms, and notice the way the platform support code
> is separate in arch/arm/mach-integrator/integrator_*.c and
> arch/arm/mach-versatile/core.c. I think this is a good model for
> what you're trying to achieve.
Yep. I was not aware of this. But it would have been my first choice too to
put this into the board support files / directories which are available /
neccecary for embedded systems anyway.
> Also note that the size of the flash doesn't have to exactly match the
> size of flash fitted to the device - it just has to be of sufficient
> size to cover the largest flash which may be fitted to your device.
> (or, if you have a way to discover the fitted flash size without too
> much hastle, then you could use that.)
I know. For NAND we use the chip ID to do that anyway.
> Eww, no thanks. We've recently killed that in the PXA tree. hardware.h
> is included by 99% of the kernel include files which means any modification
> to it or included files causes the whole kernel to rebuild - which takes
> long enough on x86 with gcc 3 already.
> The timer init is a mess and Deepak's been cleaning that up, so please
> don't use the current structure as a justification.
> I think you're better off using integrator-flash.c as is, and just
> supplying the relevent platform device structure and associated code.
I just said that ist possible, but weird. You're definitly right to make this
go away.
So a final conclusion would be:
1. Add commandline parsing for flashbase,size,buswidth which covers the case
where no special code is neccecary to access the chips.
2. Use the already existing platform model, which can be retrieved from your
work in arch/arm/mach-xxxx
3. Extend the generic NAND driver to provide a simple mechanism to make 2.)
work for NAND too
4. Obsolete the board specific mapping drivers in drivers/mtd/maps and
drivers/mtd/nand when this is done.
Did I miss(understand) anything ?
--
Thomas
_____________________________________________________________________
From slash dot org
"When customers are visiting, engineers are not allowed to wear ties.
That way the customer can tell who is the engineer and who is the
salesman (and therefore whom to believe.). Ties cut off blood flow
to the brain, making it easier for the salesmen to do their jobs."
_____________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de
next prev parent reply other threads:[~2004-06-19 9:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-13 21:43 [PATCH] MTD Maps driver for Sharp LH7a40x Marc Singer
2004-06-14 0:07 ` Thomas Gleixner
2004-06-14 0:54 ` Marc Singer
2004-06-19 0:05 ` Jun Sun
2004-06-19 0:16 ` Thomas Gleixner
2004-06-19 0:38 ` Marc Singer
2004-06-19 8:19 ` Thomas Gleixner
2004-06-19 9:23 ` Russell King - ARM Linux
2004-06-19 9:51 ` Thomas Gleixner [this message]
2004-06-19 11:01 ` Russell King - ARM Linux
[not found] <083AB380E3924D4795740AAE9A27DCAB7B89B3@cgy2000.interalia.ca>
2004-06-19 17:03 ` David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2004-06-12 16:47 Marc Singer
2004-06-13 19:34 ` Thomas Gleixner
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=200406191151.53437.tglx@linutronix.de \
--to=tglx@linutronix.de \
--cc=dwmw2@infradead.org \
--cc=elf@buici.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
/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