From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [RFC][PATCH] fsl_soc: add support for fsl_spi
Date: Fri, 27 Jul 2007 15:12:42 +0400 [thread overview]
Message-ID: <20070727111242.GA11463@localhost.localdomain> (raw)
In-Reply-To: <20070726164508.GB28491@ld0162-tx32.am.freescale.net>
On Thu, Jul 26, 2007 at 11:45:08AM -0500, Scott Wood wrote:
> On Thu, Jul 26, 2007 at 05:56:55PM +0400, Anton Vorontsov wrote:
> > +void (*fsl_spi_activate_cs)(u8 cs, u8 polarity) = NULL;
> > +EXPORT_SYMBOL(fsl_spi_activate_cs);
> > +void (*fsl_spi_deactivate_cs)(u8 cs, u8 polarity) = NULL;
> > +EXPORT_SYMBOL(fsl_spi_deactivate_cs);
>
> What are these for? It looks like you're using them to set pins,
> but that should be done in the firmware (and if the firmware sucks, then
> do it in the platform code at bootup).
Nope, this is not to set [initial state of] pins. SPI layer needs
this to trigger MMC's chipselect, it's wired as usual GPIO pin, which
should be asserted (and then deasserted) by software at proper time.
Every board may have different implementation of
activate_cs/deactivate_cs, in mpc8323_rdb case it's implemented using
par_io_data_set().
(1)
Kumar Gala suggested to not use arch_initcall, but call fsl_spi_init()
explicitly by board file. So these global *_cs functions will go away.
> > +static int __init fsl_spi_of_init(void)
> > +{
> > + struct device_node *np;
> > + unsigned int i;
> > +
> > + for (np = NULL, i = 1;
> > + (np = of_find_compatible_node(np, "spi", "fsl_spi")) != NULL;
> > + i++) {
>
> s/fsl_spi/fsl,mpc8323-spi/, please.
Will do for mpc832x_rdb. Should I also prepare patch to change all
instances of "fsl_spi" in the arch/powerpc/boot/dts/*?
> Why not make the fsl spi driver an of_platform device?
Well, I guess this is rhetoric question. Is fsl_soc.c's
OF<->platform_devices bindings officially deprecated?
If they're, I'll surely volunteer to convert it to of_platform.
But then (1) should be solved another way, yet don't know how.
> -Scott
Thanks!
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2007-07-27 11:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 13:56 [RFC][PATCH] fsl_soc: add support for fsl_spi Anton Vorontsov
2007-07-26 16:45 ` Scott Wood
2007-07-26 17:05 ` Vitaly Bordug
2007-07-26 17:37 ` Scott Wood
2007-07-27 7:52 ` Kumar Gala
2007-07-27 11:12 ` Anton Vorontsov [this message]
2007-07-27 8:54 ` Kumar Gala
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=20070727111242.GA11463@localhost.localdomain \
--to=avorontsov@ru.mvista.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).