From: Magnus Damm Date: Tue, 25 Mar 2008 08:20:24 +0000 (+0900) Subject: sh: Add I2C support to MigoR X-Git-Tag: v2.6.26-rc1~1135^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0c6111ecccb33b1a7d79b6daf64c0cc4391ff3fa;p=linux-2.6-omap-h63xx.git sh: Add I2C support to MigoR Enable the sh7722 I2C controller on the MigoR board. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt --- diff --git a/arch/sh/boards/renesas/migor/setup.c b/arch/sh/boards/renesas/migor/setup.c index bc7a4cec127..ac8d4151dc8 100644 --- a/arch/sh/boards/renesas/migor/setup.c +++ b/arch/sh/boards/renesas/migor/setup.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -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 = {