From: Anatolij Gustschin <agust-ynQEQJNshbs@public.gmane.org>
To: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Cc: dzu-ynQEQJNshbs@public.gmane.org,
wd-ynQEQJNshbs@public.gmane.org,
Piotr Ziecik <kosmo-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>,
Anatolij Gustschin <agust-ynQEQJNshbs@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
John Rigby <jcrigby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 04/11] i2c-mpc: Add MPC5121 I2C bus support
Date: Tue, 19 Jan 2010 21:24:06 +0100 [thread overview]
Message-ID: <1263932653-3634-5-git-send-email-agust@denx.de> (raw)
In-Reply-To: <1263932653-3634-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
From: Piotr Ziecik <kosmo-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>
- Update Kconfig for i2c-mpc driver.
- Enable I2C interrupts on MPC5121.
Signed-off-by: Piotr Ziecik <kosmo-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>
Signed-off-by: Wolfgang Denk <wd-ynQEQJNshbs@public.gmane.org>
Signed-off-by: Anatolij Gustschin <agust-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>
---
drivers/i2c/busses/Kconfig | 9 +++++----
drivers/i2c/busses/i2c-mpc.c | 23 +++++++++++++++++++++++
2 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 5f318ce..f481f30 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -418,13 +418,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.
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index f627001..84eeb25 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -540,6 +540,29 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
}
}
+ if (of_device_is_compatible(op->node, "fsl,mpc5121-i2c")) {
+ 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);
+ }
+ }
+
dev_set_drvdata(&op->dev, i2c);
i2c->adap = mpc_ops;
--
1.5.6.3
next prev parent reply other threads:[~2010-01-19 20:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-19 20:24 [PATCH 0/11] Update support for MPC512x Anatolij Gustschin
[not found] ` <1263932653-3634-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
2010-01-19 20:24 ` Anatolij Gustschin [this message]
[not found] ` <1263932653-3634-5-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
2010-01-21 17:12 ` [PATCH 04/11] i2c-mpc: Add MPC5121 I2C bus support Grant Likely
[not found] ` <fa686aa41001210912r5fd2a5a4g8a072e0c41ee4107-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-22 12:15 ` Wolfgang Grandegger
2010-01-20 11:22 ` [PATCH 0/11] Update support for MPC512x Wolfram Sang
[not found] ` <20100120112232.GD5041-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-01-26 8:06 ` Anatolij Gustschin
2010-01-26 12:16 ` Wolfram Sang
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=1263932653-3634-5-git-send-email-agust@denx.de \
--to=agust-ynqeqjnshbs@public.gmane.org \
--cc=dzu-ynQEQJNshbs@public.gmane.org \
--cc=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).