sh: enable I2C on the ap325rxa board

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, July 28, 2008 - 10:07 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=026953...
Commit:     026953db56e6244c8c80be8e211e244ff6015992
Parent:     0fff76f2da9dd0cd1918822cdc99d0191f9b78cf
Author:     Magnus Damm <magnus.damm@gmail.com>
AuthorDate: Sat Jul 5 12:32:44 2008 +0900
Committer:  Paul Mundt <lethal@linux-sh.org>
CommitDate: Mon Jul 28 18:10:33 2008 +0900

    sh: enable I2C on the ap325rxa board
    
    This patch enables I2C on the sh7723-based ap325rxa board.
    
    Signed-off-by: Magnus Damm <damm@igel.co.jp>
    Signed-off-by: Paul Mundt <lethal@linux-sh.org>
---
 arch/sh/boards/renesas/ap325rxa/setup.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/sh/boards/renesas/ap325rxa/setup.c b/arch/sh/boards/renesas/ap325rxa/setup.c
index e33340c..f8d6d41 100644
--- a/arch/sh/boards/renesas/ap325rxa/setup.c
+++ b/arch/sh/boards/renesas/ap325rxa/setup.c
@@ -15,6 +15,7 @@
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
 #include <linux/delay.h>
+#include <linux/i2c.h>
 #include <asm/io.h>
 
 static struct resource smc9118_resources[] = {
@@ -83,14 +84,21 @@ static struct platform_device *ap325rxa_devices[] __initdata = {
 	&ap325rxa_nor_flash_device
 };
 
+static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
+};
+
 static int __init ap325rxa_devices_setup(void)
 {
+	i2c_register_board_info(0, ap325rxa_i2c_devices,
+				ARRAY_SIZE(ap325rxa_i2c_devices));
+ 
 	return platform_add_devices(ap325rxa_devices,
 				ARRAY_SIZE(ap325rxa_devices));
 }
 device_initcall(ap325rxa_devices_setup);
 
 #define MSTPCR0		(0xA4150030)
+#define MSTPCR1		(0xA4150034)
 #define MSTPCR2		(0xA4150038)
 
 static void __init ap325rxa_setup(char **cmdline_p)
@@ -100,6 +108,9 @@ static void __init ap325rxa_setup(char **cmdline_p)
 
 	/* enable MERAM */
 	ctrl_outl(ctrl_inl(MSTPCR0) & ~0x00000001, MSTPCR0);	/* bit 0 */
+
+	/* I2C */
+	ctrl_outl(ctrl_inl(MSTPCR1) & ~0x00000200, MSTPCR1);
 }
 
 static struct sh_machine_vector mv_ap325rxa __initmv = {
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sh: enable I2C on the ap325rxa board, Linux Kernel Mailing ..., (Mon Jul 28, 10:07 am)