From: Eugene Surovegin <ebs@ebshome.net>
To: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Cc: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@teamlog.com>,
linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH] IBM GPIO driver for PowerPC 4xx is back from the dead
Date: Fri, 29 Sep 2006 09:46:09 -0700 [thread overview]
Message-ID: <20060929164609.GB17656@gate.ebshome.net> (raw)
In-Reply-To: <200609291106.20987.arnd.bergmann@de.ibm.com>
On Fri, Sep 29, 2006 at 11:06:19AM +0200, Arnd Bergmann wrote:
>
> > +{
> > + u32 cfg_reg;
> > +
> > + if (device != 0)
> > + return -ENXIO;
> > +
> > +#ifdef CONFIG_40x
> > +#ifdef DCRN_CHCR0
> > + /*
> > + * PPC405 uses CPC0_CR0 to select multiplexed GPIO pins.
> > + */
> > + cfg_reg = mfdcr(DCRN_CHCR0);
> > + cfg_reg = (cfg_reg & ~mask) | (data & mask);
> > + mtdcr(DCRN_CHCR0, cfg_reg);
> > +#endif
> > +#elif CONFIG_440GP
> > + /*
> > + * PPC440GP uses CPC0_GPIO to select multiplexed GPIO pins.
> > + */
> > + cfg_reg = mfdcr(DCRN_CPC0_GPIO);
> > + cfg_reg = (cfg_reg & ~mask) | (data & mask);
> > + mtdcr(DCRN_CPC0_GPIO, cfg_reg);
> > +#elif CONFIG_440GX
> > + /*
> > + * PPC440GX uses SDR0_PFC0 to select multiplexed GPIO pins
> > + */
> > + cfg_reg = SDR_READ(DCRN_SDR_PFC0);
> > + cfg_reg = (cfg_reg & ~mask) | (data & mask);
> > + SDR_WRITE(DCRN_SDR_PFC0, cfg_reg);
> > +#else
> > +#error This driver is only supported on PPC40x and PPC440 CPUs
> > +#endif
>
> This prevents building a single kernel for multiple 440 version.
> Please use a run-time check, or better get the necessary information
> from the device tree.
440 kernels _are_ built for each particular 440 chip separately, and
not all these defines are even available simultaneously.
So, frankly, I don't understand your complain here. We don't support
single kernel image running on different 440s. Also, last time I
checked, 440 port wasn't using device tree as well.
--
Eugene
next prev parent reply other threads:[~2006-09-29 16:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-29 8:29 [PATCH] IBM GPIO driver for PowerPC 4xx is back from the dead Jean-Baptiste Maneyrol
2006-09-29 9:06 ` Arnd Bergmann
2006-09-29 16:46 ` Eugene Surovegin [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-09-29 7:46 Jean-Baptiste Maneyrol
2006-09-29 16:42 ` Eugene Surovegin
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=20060929164609.GB17656@gate.ebshome.net \
--to=ebs@ebshome.net \
--cc=arnd.bergmann@de.ibm.com \
--cc=jean-baptiste.maneyrol@teamlog.com \
--cc=linuxppc-embedded@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).