mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Renaud Barbier <renaud.barbier@ge.com>
To: barebox@lists.infradead.org
Subject: [PATCH 6/6] ppc: p2020rdb i2c support
Date: Fri, 31 Aug 2012 15:10:35 +0100	[thread overview]
Message-ID: <1346422235-3949-7-git-send-email-renaud.barbier@ge.com> (raw)
In-Reply-To: <1346335217-9686-1-git-send-email-renaud.barbier@ge.com>

Support for both i2c busses on the p2020rdb board is added and the
configuration file is updated to add the I2C driver and commands.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
---
 arch/ppc/boards/freescale-p2020rdb/p2020rdb.c |   12 +++++++++++-
 arch/ppc/configs/p2020rdb_defconfig           |    3 +++
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
index 23d752d..94b5935 100644
--- a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
+++ b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
@@ -26,6 +26,7 @@
 #include <driver.h>
 #include <ns16550.h>
 #include <types.h>
+#include <i2c/i2c.h>
 #include <partition.h>
 #include <memory.h>
 #include <asm/cache.h>
@@ -62,6 +63,11 @@
 #define SYSCLK_50	50000000
 #define SYSCLK_100	100000000
 
+/* I2C busses. */
+struct i2c_platform_data i2cplat = {
+	.bitrate = 400000,
+};
+
 /* Ethernet. Use eTSEC3 */
 static struct gfar_info_struct gfar_info[] = {
 	{
@@ -71,11 +77,15 @@ static struct gfar_info_struct gfar_info[] = {
 	},
 };
 
-
 static int devices_init(void)
 {
 	add_cfi_flash_device(DEVICE_ID_DYNAMIC, CFG_FLASH_BASE, 16 << 20, 0);
 
+	add_generic_device("i2c-fsl", 0, NULL, I2C1_BASE_ADDR,
+			0x100, IORESOURCE_MEM, &i2cplat);
+	add_generic_device("i2c-fsl", 1, NULL, I2C2_BASE_ADDR,
+			0x100, IORESOURCE_MEM, &i2cplat);
+
 	/* eTSEC3 */
 	fsl_eth_init(3, &gfar_info[0]);
 
diff --git a/arch/ppc/configs/p2020rdb_defconfig b/arch/ppc/configs/p2020rdb_defconfig
index d025a40..7690327 100644
--- a/arch/ppc/configs/p2020rdb_defconfig
+++ b/arch/ppc/configs/p2020rdb_defconfig
@@ -27,3 +27,6 @@ CONFIG_NET_PING=y
 CONFIG_NET_TFTP=y
 CONFIG_PING=y
 CONFIG_TFTP=y
+CONFIG_I2C=y
+CONFIG_I2C_IMX=y
+CONFIG_CMD_I2C=y
-- 
1.7.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2012-08-31 14:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 14:00 [PATCH 0/5] IMX i2c driver update for the PPC 85xx Renaud Barbier
2012-08-30 14:00 ` [PATCH 1/5] mpc85xx: i2c frequency Renaud Barbier
2012-08-30 14:00 ` [PATCH 2/5] ppc/asm/fsl_i2c.h is removed Renaud Barbier
2012-08-30 14:00 ` [PATCH 3/5] mpc85xx: header update Renaud Barbier
2012-08-31  7:16   ` Sascha Hauer
2012-08-30 14:00 ` [PATCH 4/5] i2c: adapt the i2c-imx driver to mpc85xx machines Renaud Barbier
2012-08-31  7:24   ` Sascha Hauer
2012-08-30 14:00 ` [PATCH 5/5] ppc: p2020rdb i2c support Renaud Barbier
2012-08-31 14:10 ` [PATCH V2 0/6 ] IMX i2c driver update for the PPC 85xx Renaud Barbier
2012-09-03  7:39   ` Sascha Hauer
2012-08-31 14:10 ` [PATCH 1/6] mpc85xx: i2c frequency Renaud Barbier
2012-08-31 14:10 ` [PATCH 2/6] ppc/asm/fsl_i2c.h is removed Renaud Barbier
2012-08-31 14:10 ` [PATCH 3/6] mpc85xx: header update Renaud Barbier
2012-08-31 14:10 ` [PATCH 4/6] IMX driver: replace imx -> fsl Renaud Barbier
2012-08-31 14:10 ` [PATCH 5/6] i2c: adapt the i2c-imx driver to mpc85xx machines Renaud Barbier
2012-08-31 14:10 ` Renaud Barbier [this message]

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=1346422235-3949-7-git-send-email-renaud.barbier@ge.com \
    --to=renaud.barbier@ge.com \
    --cc=barebox@lists.infradead.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