Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Magnus Damm and committed by
Paul Mundt
0c6111ec ef1b2327

+10
+10
arch/sh/boards/renesas/migor/setup.c
··· 13 13 #include <linux/input.h> 14 14 #include <linux/mtd/physmap.h> 15 15 #include <linux/mtd/nand.h> 16 + #include <linux/i2c.h> 16 17 #include <asm/machvec.h> 17 18 #include <asm/io.h> 18 19 #include <asm/sh_keysc.h> ··· 197 196 &migor_nand_flash_device, 198 197 }; 199 198 199 + static struct i2c_board_info __initdata migor_i2c_devices[] = { 200 + }; 201 + 200 202 static int __init migor_devices_setup(void) 201 203 { 204 + i2c_register_board_info(0, migor_i2c_devices, 205 + ARRAY_SIZE(migor_i2c_devices)); 206 + 202 207 return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices)); 203 208 } 204 209 __initcall(migor_devices_setup); ··· 226 219 ctrl_outw(ctrl_inw(PORT_PXCR) & 0x0fff, PORT_PXCR); 227 220 ctrl_outl((ctrl_inl(BSC_CS6ABCR) & ~0x00000600) | 0x00000200, 228 221 BSC_CS6ABCR); 222 + 223 + /* I2C */ 224 + ctrl_outl(ctrl_inl(MSTPCR1) & ~0x00000200, MSTPCR1); 229 225 } 230 226 231 227 static struct sh_machine_vector mv_migor __initmv = {