diff options
author | Magnus Damm <magnus.damm@gmail.com> | 2008-07-04 23:32:44 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 05:10:33 -0400 |
commit | 026953db56e6244c8c80be8e211e244ff6015992 (patch) | |
tree | b1ccf51211190bec89d26eb02b84cbda72c2c811 /arch | |
parent | 0fff76f2da9dd0cd1918822cdc99d0191f9b78cf (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | 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 e33340cafa01..f8d6d41893a3 100644 --- a/arch/sh/boards/renesas/ap325rxa/setup.c +++ b/arch/sh/boards/renesas/ap325rxa/setup.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/mtd/physmap.h> | 16 | #include <linux/mtd/physmap.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/i2c.h> | ||
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
19 | 20 | ||
20 | static struct resource smc9118_resources[] = { | 21 | static struct resource smc9118_resources[] = { |
@@ -83,14 +84,21 @@ static struct platform_device *ap325rxa_devices[] __initdata = { | |||
83 | &ap325rxa_nor_flash_device | 84 | &ap325rxa_nor_flash_device |
84 | }; | 85 | }; |
85 | 86 | ||
87 | static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { | ||
88 | }; | ||
89 | |||
86 | static int __init ap325rxa_devices_setup(void) | 90 | static int __init ap325rxa_devices_setup(void) |
87 | { | 91 | { |
92 | i2c_register_board_info(0, ap325rxa_i2c_devices, | ||
93 | ARRAY_SIZE(ap325rxa_i2c_devices)); | ||
94 | |||
88 | return platform_add_devices(ap325rxa_devices, | 95 | return platform_add_devices(ap325rxa_devices, |
89 | ARRAY_SIZE(ap325rxa_devices)); | 96 | ARRAY_SIZE(ap325rxa_devices)); |
90 | } | 97 | } |
91 | device_initcall(ap325rxa_devices_setup); | 98 | device_initcall(ap325rxa_devices_setup); |
92 | 99 | ||
93 | #define MSTPCR0 (0xA4150030) | 100 | #define MSTPCR0 (0xA4150030) |
101 | #define MSTPCR1 (0xA4150034) | ||
94 | #define MSTPCR2 (0xA4150038) | 102 | #define MSTPCR2 (0xA4150038) |
95 | 103 | ||
96 | static void __init ap325rxa_setup(char **cmdline_p) | 104 | static void __init ap325rxa_setup(char **cmdline_p) |
@@ -100,6 +108,9 @@ static void __init ap325rxa_setup(char **cmdline_p) | |||
100 | 108 | ||
101 | /* enable MERAM */ | 109 | /* enable MERAM */ |
102 | ctrl_outl(ctrl_inl(MSTPCR0) & ~0x00000001, MSTPCR0); /* bit 0 */ | 110 | ctrl_outl(ctrl_inl(MSTPCR0) & ~0x00000001, MSTPCR0); /* bit 0 */ |
111 | |||
112 | /* I2C */ | ||
113 | ctrl_outl(ctrl_inl(MSTPCR1) & ~0x00000200, MSTPCR1); | ||
103 | } | 114 | } |
104 | 115 | ||
105 | static struct sh_machine_vector mv_ap325rxa __initmv = { | 116 | static struct sh_machine_vector mv_ap325rxa __initmv = { |