Remove omap_add_i2c() and use the id_table names to register the devices. Signed-off-by: Teresa Gámez <t.gamez@xxxxxxxxx> --- arch/arm/mach-omap/include/mach/am33xx-devices.h | 9 ++++++--- arch/arm/mach-omap/include/mach/devices.h | 2 -- arch/arm/mach-omap/include/mach/omap3-devices.h | 9 ++++++--- arch/arm/mach-omap/include/mach/omap4-devices.h | 12 ++++++++---- arch/arm/mach-omap/omap_devices.c | 6 ------ 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/arch/arm/mach-omap/include/mach/am33xx-devices.h b/arch/arm/mach-omap/include/mach/am33xx-devices.h index 822caab..6a4d901 100644 --- a/arch/arm/mach-omap/include/mach/am33xx-devices.h +++ b/arch/arm/mach-omap/include/mach/am33xx-devices.h @@ -55,17 +55,20 @@ static inline struct device_d *am33xx_add_spi1(void) static inline struct device_d *am33xx_add_i2c0(void *pdata) { - return omap_add_i2c(0, AM33XX_I2C0_BASE, pdata); + return add_generic_device("i2c-am33xx", 0, NULL, AM33XX_I2C0_BASE, + SZ_4K, IORESOURCE_MEM, pdata); } static inline struct device_d *am33xx_add_i2c1(void *pdata) { - return omap_add_i2c(1, AM33XX_I2C1_BASE, pdata); + return add_generic_device("i2c-am33xx", 1, NULL, AM33XX_I2C1_BASE, + SZ_4K, IORESOURCE_MEM, pdata); } static inline struct device_d *am33xx_add_i2c2(void *pdata) { - return omap_add_i2c(2, AM33XX_I2C2_BASE, pdata); + return add_generic_device("i2c-am33xx", 2, NULL, AM33XX_I2C2_BASE, + SZ_4K, IORESOURCE_MEM, pdata); } #endif /* __MACH_OMAP3_DEVICES_H */ diff --git a/arch/arm/mach-omap/include/mach/devices.h b/arch/arm/mach-omap/include/mach/devices.h index adae01b..537213f 100644 --- a/arch/arm/mach-omap/include/mach/devices.h +++ b/arch/arm/mach-omap/include/mach/devices.h @@ -9,6 +9,4 @@ void omap_add_sram0(resource_size_t base, resource_size_t size); struct device_d *omap_add_uart(int id, unsigned long base); -struct device_d *omap_add_i2c(int id, unsigned long base, void *pdata); - #endif /* __MACH_OMAP_DEVICES_H */ diff --git a/arch/arm/mach-omap/include/mach/omap3-devices.h b/arch/arm/mach-omap/include/mach/omap3-devices.h index de67ea0..0809e95 100644 --- a/arch/arm/mach-omap/include/mach/omap3-devices.h +++ b/arch/arm/mach-omap/include/mach/omap3-devices.h @@ -77,17 +77,20 @@ static inline struct device_d *omap3_add_mmc3(struct omap_hsmmc_platform_data *p static inline struct device_d *omap3_add_i2c1(void *pdata) { - return omap_add_i2c(0, OMAP3_I2C1_BASE, pdata); + return add_generic_device("i2c-omap3", 0, NULL, OMAP3_I2C1_BASE, + SZ_4K, IORESOURCE_MEM, pdata); } static inline struct device_d *omap3_add_i2c2(void *pdata) { - return omap_add_i2c(1, OMAP3_I2C2_BASE, pdata); + return add_generic_device("i2c-omap3", 1, NULL, OMAP3_I2C2_BASE, + SZ_4K, IORESOURCE_MEM, pdata); } static inline struct device_d *omap3_add_i2c3(void *pdata) { - return omap_add_i2c(2, OMAP3_I2C3_BASE, pdata); + return add_generic_device("i2c-omap3", 2, NULL, OMAP3_I2C3_BASE, + SZ_4K, IORESOURCE_MEM, pdata); } static inline struct device_d *omap3_add_ehci(void *pdata) diff --git a/arch/arm/mach-omap/include/mach/omap4-devices.h b/arch/arm/mach-omap/include/mach/omap4-devices.h index 561d9ce..76c9789 100644 --- a/arch/arm/mach-omap/include/mach/omap4-devices.h +++ b/arch/arm/mach-omap/include/mach/omap4-devices.h @@ -60,22 +60,26 @@ static inline struct device_d *omap44xx_add_mmc5(struct omap_hsmmc_platform_data static inline struct device_d *omap44xx_add_i2c1(void *pdata) { - return omap_add_i2c(0, OMAP44XX_I2C1_BASE, pdata); + return add_generic_device("i2c-omap4", 0, NULL, OMAP44XX_I2C1_BASE, + SZ_4K, IORESOURCE_MEM, pdata); } static inline struct device_d *omap44xx_add_i2c2(void *pdata) { - return omap_add_i2c(1, OMAP44XX_I2C2_BASE, pdata); + return add_generic_device("i2c-omap4", 1, NULL, OMAP44XX_I2C2_BASE, + SZ_4K, IORESOURCE_MEM, pdata); } static inline struct device_d *omap44xx_add_i2c3(void *pdata) { - return omap_add_i2c(2, OMAP44XX_I2C3_BASE, pdata); + return add_generic_device("i2c-omap4", 2, NULL, OMAP44XX_I2C3_BASE, + SZ_4K, IORESOURCE_MEM, pdata); } static inline struct device_d *omap44xx_add_i2c4(void *pdata) { - return omap_add_i2c(3, OMAP44XX_I2C4_BASE, pdata); + return add_generic_device("i2c-omap4", 3, NULL, OMAP44XX_I2C4_BASE, + SZ_4K, IORESOURCE_MEM, pdata); } static inline struct device_d *omap44xx_add_ehci(void *pdata) diff --git a/arch/arm/mach-omap/omap_devices.c b/arch/arm/mach-omap/omap_devices.c index 056cba5..30cfdd0 100644 --- a/arch/arm/mach-omap/omap_devices.c +++ b/arch/arm/mach-omap/omap_devices.c @@ -24,9 +24,3 @@ struct device_d *omap_add_uart(int id, unsigned long base) return add_ns16550_device(id, base, 1024, IORESOURCE_MEM_8BIT, &serial_plat); } - -struct device_d *omap_add_i2c(int id, unsigned long base, void *pdata) -{ - return add_generic_device("i2c-omap", id, NULL, base, SZ_4K, - IORESOURCE_MEM, pdata); -} -- 1.7.0.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox