From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Wolfgang Denk <wd-ynQEQJNshbs@public.gmane.org>
Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
Piotr Ziecik <kosmo-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
John Rigby <jcrigby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 08/12] mpc5121: Added I2C support.
Date: Wed, 6 May 2009 15:01:38 -0600 [thread overview]
Message-ID: <fa686aa40905061401k319313c5q89fd3e245c30808f@mail.gmail.com> (raw)
In-Reply-To: <1241640919-4650-9-git-send-email-wd-ynQEQJNshbs@public.gmane.org>
On Wed, May 6, 2009 at 2:15 PM, Wolfgang Denk <wd-ynQEQJNshbs@public.gmane.org> wrote:
> From: Piotr Ziecik <kosmo-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>
>
> - Enabled I2C interrupts on MPC5121.
> - Updated Kconfig for i2c-mpc driver.
I think this workaround belongs in the driver itself.
g.
>
> Signed-off-by: Piotr Ziecik <kosmo-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>
> Signed-off-by: Wolfgang Denk <wd-ynQEQJNshbs@public.gmane.org>
> Cc: <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
> Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> Cc: John Rigby <jcrigby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> arch/powerpc/platforms/512x/mpc5121_ads.c | 2 ++
> arch/powerpc/platforms/512x/mpc512x.h | 1 +
> arch/powerpc/platforms/512x/mpc512x_shared.c | 24 ++++++++++++++++++++++++
> drivers/i2c/busses/Kconfig | 9 +++++----
> 4 files changed, 32 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c
> index 441abc4..a8976b4 100644
> --- a/arch/powerpc/platforms/512x/mpc5121_ads.c
> +++ b/arch/powerpc/platforms/512x/mpc5121_ads.c
> @@ -42,6 +42,8 @@ static void __init mpc5121_ads_setup_arch(void)
> for_each_compatible_node(np, "pci", "fsl,mpc5121-pci")
> mpc83xx_add_bridge(np);
> #endif
> +
> + mpc512x_init_i2c();
> }
>
> static void __init mpc5121_ads_init_IRQ(void)
> diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h
> index 9c03693..f4db8a7 100644
> --- a/arch/powerpc/platforms/512x/mpc512x.h
> +++ b/arch/powerpc/platforms/512x/mpc512x.h
> @@ -13,5 +13,6 @@
> #define __MPC512X_H__
> extern unsigned long mpc512x_find_ips_freq(struct device_node *node);
> extern void __init mpc512x_init_IRQ(void);
> +extern void __init mpc512x_init_i2c(void);
> void __init mpc512x_declare_of_platform_devices(void);
> #endif /* __MPC512X_H__ */
> diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c
> index 7135d89..b776e45 100644
> --- a/arch/powerpc/platforms/512x/mpc512x_shared.c
> +++ b/arch/powerpc/platforms/512x/mpc512x_shared.c
> @@ -65,6 +65,30 @@ void __init mpc512x_init_IRQ(void)
> ipic_set_default_priority();
> }
>
> +void __init mpc512x_init_i2c(void)
> +{
> + struct device_node *np;
> + void __iomem *i2cctl;
> +
> + /* Enable I2C interrupts */
> + np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-i2c-ctrl");
> + if (np) {
> + i2cctl = of_iomap(np, 0);
> + if (i2cctl) {
> + /*
> + * Set interrupt enable bits:
> + * - I2C-0: bit 24,
> + * - I2C-1: bit 26,
> + * - I2C-2: bit 28.
> + */
> + out_be32(i2cctl, 0x15000000);
> + iounmap(i2cctl);
> + }
> +
> + of_node_put(np);
> + }
> +}
> +
> /*
> * Nodes to do bus probe on, soc and localbus
> */
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index a48c8ae..57ed637 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -391,13 +391,14 @@ config I2C_IXP2000
> instead.
>
> config I2C_MPC
> - tristate "MPC107/824x/85xx/52xx/86xx"
> + tristate "MPC107/824x/85xx/512x/52xx/86xx"
> depends on PPC32
> help
> If you say yes to this option, support will be included for the
> - built-in I2C interface on the MPC107/Tsi107/MPC8240/MPC8245 and
> - MPC85xx/MPC8641 family processors. The driver may also work on 52xx
> - family processors, though interrupts are known not to work.
> + built-in I2C interface on the MPC107/Tsi107/MPC8240/MPC8245,
> + MPC85xx/MPC8641 and MPC512x family processors. The driver may
> + also work on 52xx family processors, though interrupts are known
> + not to work.
>
> This driver can also be built as a module. If so, the module
> will be called i2c-mpc.
> --
> 1.6.0.6
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2009-05-06 21:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1241640919-4650-1-git-send-email-wd@denx.de>
[not found] ` <1241640919-4650-1-git-send-email-wd-ynQEQJNshbs@public.gmane.org>
2009-05-06 20:15 ` [PATCH 08/12] mpc5121: Added I2C support Wolfgang Denk
[not found] ` <1241640919-4650-9-git-send-email-wd-ynQEQJNshbs@public.gmane.org>
2009-05-06 21:01 ` Grant Likely [this message]
[not found] ` <fa686aa40905061401k319313c5q89fd3e245c30808f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-06 22:19 ` Wolfgang Denk
2009-05-06 22:51 ` Grant Likely
[not found] ` <fa686aa40905061551l8cf5940sf4d4cbf34331cf9a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-07 2:41 ` Grant Likely
[not found] ` <fa686aa40905061941p6fd4b03dt1097cf4d16bdd665-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-07 6:36 ` Wolfgang Grandegger
2009-05-18 13:57 ` Piotr Zięcik
2009-05-18 14:11 ` Grant Likely
[not found] ` <200905181557.11766.kosmo-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>
2009-05-18 14:29 ` Wolfgang Grandegger
[not found] ` <4A1170B0.5080203-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2009-05-19 7:47 ` Piotr Zięcik
2009-05-19 8:10 ` Wolfgang Grandegger
2009-05-08 2:12 ` John Rigby
2009-05-08 3:01 ` Grant Likely
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=fa686aa40905061401k319313c5q89fd3e245c30808f@mail.gmail.com \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=jcrigby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kosmo-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
--cc=wd-ynQEQJNshbs@public.gmane.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).