summaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorMagnus Damm <magnus.damm@gmail.com>2008-03-25 17:20:24 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-04-18 09:50:06 -0700
commit0c6111ecccb33b1a7d79b6daf64c0cc4391ff3fa (patch)
treef116f3716f0c5c588962716c249051279883a70a /arch/sh
parentef1b2327d27901596d896820722bb2cefa2d1f64 (diff)
downloadlinux-0c6111ecccb33b1a7d79b6daf64c0cc4391ff3fa.tar.gz
linux-0c6111ecccb33b1a7d79b6daf64c0cc4391ff3fa.tar.bz2
linux-0c6111ecccb33b1a7d79b6daf64c0cc4391ff3fa.zip
sh: Add I2C support to MigoR
Enable the sh7722 I2C controller on the MigoR board. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/boards/renesas/migor/setup.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sh/boards/renesas/migor/setup.c b/arch/sh/boards/renesas/migor/setup.c
index bc7a4cec1277..ac8d4151dc8a 100644
--- a/arch/sh/boards/renesas/migor/setup.c
+++ b/arch/sh/boards/renesas/migor/setup.c
@@ -13,6 +13,7 @@
#include <linux/input.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/nand.h>
+#include <linux/i2c.h>
#include <asm/machvec.h>
#include <asm/io.h>
#include <asm/sh_keysc.h>
@@ -196,8 +197,14 @@ static struct platform_device *migor_devices[] __initdata = {
&migor_nand_flash_device,
};
+static struct i2c_board_info __initdata migor_i2c_devices[] = {
+};
+
static int __init migor_devices_setup(void)
{
+ i2c_register_board_info(0, migor_i2c_devices,
+ ARRAY_SIZE(migor_i2c_devices));
+
return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices));
}
__initcall(migor_devices_setup);
@@ -219,6 +226,9 @@ static void __init migor_setup(char **cmdline_p)
ctrl_outw(ctrl_inw(PORT_PXCR) & 0x0fff, PORT_PXCR);
ctrl_outl((ctrl_inl(BSC_CS6ABCR) & ~0x00000600) | 0x00000200,
BSC_CS6ABCR);
+
+ /* I2C */
+ ctrl_outl(ctrl_inl(MSTPCR1) & ~0x00000200, MSTPCR1);
}
static struct sh_machine_vector mv_migor __initmv = {