From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Jochen Friedrich <jochen@scram.de>
Cc: Arnd Bergmann <arnd@arndb.de>,
linuxppc-dev@ozlabs.org,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH/RFC] [POWERPC] CPM1: implement GPIO LIB API
Date: Thu, 17 Jan 2008 16:06:10 +0300 [thread overview]
Message-ID: <20080117130610.GA13408@localhost.localdomain> (raw)
In-Reply-To: <478F4514.7030906@scram.de>
Hi Jochen,
Thanks for the patch.
On Thu, Jan 17, 2008 at 01:07:48PM +0100, Jochen Friedrich wrote:
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> ---
> arch/powerpc/platforms/8xx/Kconfig | 2 +
> arch/powerpc/sysdev/commproc.c | 162
> +++++++++++++++++++++++++++++++++++-
> 2 files changed, 163 insertions(+), 1 deletions(-)
Something happened wrt long lines, your editor seem to wrap them. :-(
> diff --git a/arch/powerpc/platforms/8xx/Kconfig
> b/arch/powerpc/platforms/8xx/Kconfig
> index 91fbe42..08e927c 100644
> --- a/arch/powerpc/platforms/8xx/Kconfig
> +++ b/arch/powerpc/platforms/8xx/Kconfig
[...]
> diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c
> index 621bc6c..be78e65 100644
> --- a/arch/powerpc/sysdev/commproc.c
> +++ b/arch/powerpc/sysdev/commproc.c
[...]
> +int cpm1_gpiochip_add16(struct device_node *np)
> +{
> + return of_mm_gpiochip_add(np, &cpm1_gc16);
> +}
(1)
> +int cpm1_gpiochip_add32(struct device_node *np)
> +{
> + return of_mm_gpiochip_add(np, &cpm1_gc32);
> +}
(2)
> +static int cpm_init_par_io(void)
> +{
> + struct device_node *np;
> +
> + for_each_compatible_node(np, NULL, "fsl,cpm1-pario-bank16")
> + cpm1_gpiochip_add16(np);
> +
> + for_each_compatible_node(np, NULL, "fsl,cpm1-pario-bank32")
> + cpm1_gpiochip_add32(np);
> + return 0;
> +}
> +arch_initcall(cpm_init_par_io);
I was unable to use arch_initcall() because lack of kmalloc() that
early (needed for of_mm_gpiochip_add() and GPIO LIB in general). So,
does it really work here?
Though, I tried arch_initcall() in the board file, and well... link
order matters a lot, so arch_initcall could indeed work in the
arch/powerpc/sysdev/. I should try that for QE. :-)
If it works, you'd better make (1) and (2) static, or just remove
them completely, since there are no users outside of this file.
Thanks!
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2008-01-17 12:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-17 12:07 [PATCH/RFC] [POWERPC] CPM1: implement GPIO LIB API Jochen Friedrich
2008-01-17 13:06 ` Anton Vorontsov [this message]
2008-01-17 13:47 ` Grant Likely
2008-01-17 14:42 ` Jochen Friedrich
2008-01-17 18:48 ` Scott Wood
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=20080117130610.GA13408@localhost.localdomain \
--to=avorontsov@ru.mvista.com \
--cc=arnd@arndb.de \
--cc=david@gibson.dropbear.id.au \
--cc=jochen@scram.de \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).