2 * linux/arch/arm/mach-omap2/devices.c
4 * OMAP2 platform device setup/initialization
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
12 #include <linux/config.h>
13 #include <linux/module.h>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/platform_device.h>
18 #include <asm/hardware.h>
20 #include <asm/mach-types.h>
21 #include <asm/mach/map.h>
23 #include <asm/arch/tc.h>
24 #include <asm/arch/board.h>
25 #include <asm/arch/mux.h>
26 #include <asm/arch/gpio.h>
28 extern void omap_nop_release(struct device *dev);
30 /*-------------------------------------------------------------------------*/
32 #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
34 #define OMAP2_I2C_BASE2 0x48072000
35 #define OMAP2_I2C_INT2 57
37 static struct resource i2c_resources2[] = {
39 .start = OMAP2_I2C_BASE2,
40 .end = OMAP2_I2C_BASE2 + 0x3f,
41 .flags = IORESOURCE_MEM,
44 .start = OMAP2_I2C_INT2,
45 .flags = IORESOURCE_IRQ,
49 static struct platform_device omap_i2c_device2 = {
53 .release = omap_nop_release,
55 .num_resources = ARRAY_SIZE(i2c_resources2),
56 .resource = i2c_resources2,
59 /* See also arch/arm/plat-omap/devices.c for first I2C on 24xx */
60 static void omap_init_i2c(void)
62 /* REVISIT: Second I2C not in use on H4? */
63 if (machine_is_omap_h4())
66 omap_cfg_reg(J15_24XX_I2C2_SCL);
67 omap_cfg_reg(H19_24XX_I2C2_SDA);
68 (void) platform_device_register(&omap_i2c_device2);
73 static void omap_init_i2c(void) {}
77 /*-------------------------------------------------------------------------*/
79 static int __init omap2_init_devices(void)
81 /* please keep these calls, and their implementations above,
82 * in alphabetical order so they're easier to sort through.
88 arch_initcall(omap2_init_devices);