aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/cavium-octeon/octeon-platform.c
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2010-01-07 14:54:21 -0500
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 06:53:05 -0500
commitd95770544604299402e481771a964b0f10d46978 (patch)
tree4cbb1ff15bbd73cfb9b1e69fbb9035b96cd20a8d /arch/mips/cavium-octeon/octeon-platform.c
parent85660f43a308cc601b243c1f4dc18a63545c5cfa (diff)
MIPS: Octeon: Register some devices on the I2C bus.
Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org To: linux-i2c@vger.kernel.org To: ben-linux@fluff.org To: khali@linux-fr.org Cc: Rade Bozic <rade.bozic.ext@nsn.com> Patchwork: http://patchwork.linux-mips.org/patch/845/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/cavium-octeon/octeon-platform.c')
-rw-r--r--arch/mips/cavium-octeon/octeon-platform.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index 784c1c874018..62ac30eef5e8 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -9,6 +9,7 @@
9 9
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/irq.h> 11#include <linux/irq.h>
12#include <linux/i2c.h>
12#include <linux/module.h> 13#include <linux/module.h>
13#include <linux/platform_device.h> 14#include <linux/platform_device.h>
14 15
@@ -159,6 +160,18 @@ out:
159} 160}
160device_initcall(octeon_rng_device_init); 161device_initcall(octeon_rng_device_init);
161 162
163static struct i2c_board_info __initdata octeon_i2c_devices[] = {
164 {
165 I2C_BOARD_INFO("ds1337", 0x68),
166 },
167};
168
169static int __init octeon_i2c_devices_init(void)
170{
171 return i2c_register_board_info(0, octeon_i2c_devices,
172 ARRAY_SIZE(octeon_i2c_devices));
173}
174arch_initcall(octeon_i2c_devices_init);
162 175
163#define OCTEON_I2C_IO_BASE 0x1180000001000ull 176#define OCTEON_I2C_IO_BASE 0x1180000001000ull
164#define OCTEON_I2C_IO_UNIT_OFFSET 0x200 177#define OCTEON_I2C_IO_UNIT_OFFSET 0x200