From: Grant Likely <grant.likely@secretlab.ca>
To: Wolfgang Denk <wd@denx.de>
Cc: linuxppc-dev@ozlabs.org, Piotr Ziecik <kosmo@semihalf.com>,
linux-i2c@vger.kernel.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@denx.de>
On Wed, May 6, 2009 at 2:15 PM, Wolfgang Denk <wd@denx.de> wrote:
> From: Piotr Ziecik <kosmo@semihalf.com>
>
> - 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@semihalf.com>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: <linux-i2c@vger.kernel.org>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: John Rigby <jcrigby@gmail.com>
> ---
> =A0arch/powerpc/platforms/512x/mpc5121_ads.c =A0 =A0| =A0 =A02 ++
> =A0arch/powerpc/platforms/512x/mpc512x.h =A0 =A0 =A0 =A0| =A0 =A01 +
> =A0arch/powerpc/platforms/512x/mpc512x_shared.c | =A0 24 ++++++++++++++++=
++++++++
> =A0drivers/i2c/busses/Kconfig =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =
=A09 +++++----
> =A04 files changed, 32 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/pla=
tforms/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)
> =A0 =A0 =A0 =A0for_each_compatible_node(np, "pci", "fsl,mpc5121-pci")
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mpc83xx_add_bridge(np);
> =A0#endif
> +
> + =A0 =A0 =A0 mpc512x_init_i2c();
> =A0}
>
> =A0static void __init mpc5121_ads_init_IRQ(void)
> diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platfor=
ms/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 @@
> =A0#define __MPC512X_H__
> =A0extern unsigned long mpc512x_find_ips_freq(struct device_node *node);
> =A0extern void __init mpc512x_init_IRQ(void);
> +extern void __init mpc512x_init_i2c(void);
> =A0void __init mpc512x_declare_of_platform_devices(void);
> =A0#endif =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* __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)
> =A0 =A0 =A0 =A0ipic_set_default_priority();
> =A0}
>
> +void __init mpc512x_init_i2c(void)
> +{
> + =A0 =A0 =A0 struct device_node *np;
> + =A0 =A0 =A0 void __iomem *i2cctl;
> +
> + =A0 =A0 =A0 /* Enable I2C interrupts */
> + =A0 =A0 =A0 np =3D of_find_compatible_node(NULL, NULL, "fsl,mpc5121-i2c=
-ctrl");
> + =A0 =A0 =A0 if (np) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 i2cctl =3D of_iomap(np, 0);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (i2cctl) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /*
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* Set interrupt enable b=
its:
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* =A0- I2C-0: bit 24,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* =A0- I2C-1: bit 26,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* =A0- I2C-2: bit 28.
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*/
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 out_be32(i2cctl, 0x15000000=
);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 iounmap(i2cctl);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 of_node_put(np);
> + =A0 =A0 =A0 }
> +}
> +
> =A0/*
> =A0* Nodes to do bus probe on, soc and localbus
> =A0*/
> 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
> =A0 =A0 =A0 =A0 =A0instead.
>
> =A0config I2C_MPC
> - =A0 =A0 =A0 tristate "MPC107/824x/85xx/52xx/86xx"
> + =A0 =A0 =A0 tristate "MPC107/824x/85xx/512x/52xx/86xx"
> =A0 =A0 =A0 =A0depends on PPC32
> =A0 =A0 =A0 =A0help
> =A0 =A0 =A0 =A0 =A0If you say yes to this option, support will be include=
d for the
> - =A0 =A0 =A0 =A0 built-in I2C interface on the MPC107/Tsi107/MPC8240/MPC=
8245 and
> - =A0 =A0 =A0 =A0 MPC85xx/MPC8641 family processors. The driver may also =
work on 52xx
> - =A0 =A0 =A0 =A0 family processors, though interrupts are known not to w=
ork.
> + =A0 =A0 =A0 =A0 built-in I2C interface on the MPC107/Tsi107/MPC8240/MPC=
8245,
> + =A0 =A0 =A0 =A0 MPC85xx/MPC8641 and MPC512x family processors. The driv=
er may
> + =A0 =A0 =A0 =A0 also work on 52xx family processors, though interrupts =
are known
> + =A0 =A0 =A0 =A0 not to work.
>
> =A0 =A0 =A0 =A0 =A0This driver can also be built as a module. =A0If so, t=
he module
> =A0 =A0 =A0 =A0 =A0will be called i2c-mpc.
> --
> 1.6.0.6
>
>
--=20
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: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 20:15 [PATCH 00/16] Add support for MPC512x Wolfgang Denk
2009-05-06 20:15 ` [PATCH 01/12] fs_enet: Use defines to set driver tunables Wolfgang Denk
2009-05-06 20:35 ` Grant Likely
2009-05-06 22:02 ` Wolfgang Denk
2009-05-06 22:41 ` Grant Likely
2009-05-06 20:15 ` [PATCH 02/12] fs_enet: Add MPC5121 FEC support Wolfgang Denk
2009-05-06 20:33 ` Grant Likely
2009-05-06 21:08 ` Scott Wood
2009-05-06 22:01 ` Wolfgang Denk
2009-05-06 22:29 ` Grant Likely
2009-05-06 22:41 ` Wolfgang Denk
2009-05-07 14:09 ` Grant Likely
2009-05-08 2:02 ` John Rigby
2009-05-08 7:52 ` David Miller
2009-05-11 6:56 ` David Jander
2009-05-07 8:14 ` David Jander
2009-05-07 13:05 ` Kumar Gala
2009-05-06 20:40 ` David Miller
2009-05-06 22:06 ` Wolfgang Denk
2009-05-06 20:41 ` Scott Wood
2009-05-06 22:09 ` Wolfgang Denk
2009-05-06 22:39 ` Grant Likely
2009-05-14 12:38 ` Piotr Zięcik
2009-05-14 14:00 ` Grant Likely
2009-05-18 22:17 ` Benjamin Herrenschmidt
2009-05-19 11:26 ` Piotr Zięcik
2009-05-19 21:56 ` Benjamin Herrenschmidt
2009-05-21 8:34 ` Piotr Zięcik
2009-05-21 15:36 ` Grant Likely
2009-05-06 20:15 ` [PATCH 03/12] fs_enet: Add FEC TX Alignment workaround for MPC5121 Wolfgang Denk
2009-05-06 20:37 ` Grant Likely
2009-05-06 22:12 ` Wolfgang Denk
2009-05-06 22:42 ` Grant Likely
2009-05-08 2:36 ` John Rigby
2009-05-06 20:15 ` [PATCH 04/12] mpc5121: Added reset module registers representation Wolfgang Denk
2009-05-06 20:29 ` Scott Wood
2009-05-06 21:57 ` Wolfgang Denk
2009-05-06 20:39 ` Grant Likely
2009-05-06 22:14 ` Wolfgang Denk
2009-05-06 20:15 ` [PATCH 05/12] mpc5121ads: Added Reset Module node to DTS Wolfgang Denk
2009-05-06 20:40 ` Grant Likely
2009-05-06 22:16 ` Wolfgang Denk
2009-05-06 22:46 ` Grant Likely
2009-05-06 20:15 ` [PATCH 06/12] mpc5121: Added NAND Flash Controller driver Wolfgang Denk
2009-05-06 20:59 ` Grant Likely
2009-05-08 2:22 ` John Rigby
2009-05-08 3:07 ` Grant Likely
2009-05-07 8:08 ` David Jander
2009-05-08 3:30 ` John Rigby
2009-05-13 8:41 ` Piotr Zięcik
2009-05-06 20:15 ` [PATCH 07/12] mpc5121ads: Clean up and fix NAND description in mpc5121ads DTS Wolfgang Denk
2009-05-06 21:00 ` Grant Likely
2009-05-06 20:15 ` [PATCH 08/12] mpc5121: Added I2C support Wolfgang Denk
2009-05-06 21:01 ` Grant Likely [this message]
2009-05-06 22:19 ` Wolfgang Denk
2009-05-06 22:51 ` Grant Likely
2009-05-07 2:41 ` Grant Likely
2009-05-07 6:36 ` Wolfgang Grandegger
2009-05-18 13:57 ` Piotr Zięcik
2009-05-18 14:11 ` Grant Likely
2009-05-18 14:29 ` Wolfgang Grandegger
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
2009-05-06 20:15 ` [PATCH 09/12] mpc5121ads: Added I2C RTC node to mpc5121ads DTS Wolfgang Denk
2009-05-06 21:02 ` Grant Likely
2009-05-07 6:45 ` Wolfgang Grandegger
2009-05-06 20:15 ` [PATCH 10/12] mpc5121: Add MPC5121 Real time clock driver Wolfgang Denk
2009-05-06 21:03 ` Grant Likely
2009-05-06 21:06 ` Wolfram Sang
2009-05-06 22:40 ` Grant Likely
2009-05-08 2:41 ` [rtc-linux] " John Rigby
2009-05-08 15:53 ` Grant Likely
2009-05-08 16:09 ` Alessandro Zummo
2009-05-08 19:18 ` Wolfgang Denk
2009-05-08 16:10 ` Alessandro Zummo
2009-05-06 20:15 ` [PATCH 11/12] mpc5121: Added MPC512x DMA driver Wolfgang Denk
2009-05-06 21:07 ` Grant Likely
2009-05-08 2:49 ` John Rigby
2009-05-19 1:37 ` Hongjun Chen
2009-05-19 8:03 ` Piotr Zięcik
2009-05-20 0:39 ` Hongjun Chen
2009-05-06 20:15 ` [PATCH 12/12] mpc5121: Added default config for MPC5121 Wolfgang Denk
2009-05-06 21:08 ` Grant Likely
2009-05-06 22:23 ` Wolfgang Denk
2009-05-06 22:48 ` 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@secretlab.ca \
--cc=kosmo@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=wd@denx.de \
/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).