From 605882cef2e433790a67a39d9e5b01a7c72d7082 Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Fri, 13 Aug 2010 11:36:50 +0900 Subject: [PATCH] s5p: gpio-i2c: move from SoC to i2c driver Signed-off-by: Minkyu Kang --- arch/arm/cpu/armv7/s5pc1xx/Makefile | 1 - drivers/i2c/Makefile | 1 + arch/arm/cpu/armv7/s5pc1xx/i2c-gpio.c => drivers/i2c/s5p_gpio_i2c.c | 4 ++++ include/configs/s5pc1xx_universal.h | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) rename arch/arm/cpu/armv7/s5pc1xx/i2c-gpio.c => drivers/i2c/s5p_gpio_i2c.c (97%) diff --git a/arch/arm/cpu/armv7/s5pc1xx/Makefile b/arch/arm/cpu/armv7/s5pc1xx/Makefile index 6ce30b8..20cff4e 100644 --- a/arch/arm/cpu/armv7/s5pc1xx/Makefile +++ b/arch/arm/cpu/armv7/s5pc1xx/Makefile @@ -37,7 +37,6 @@ COBJS-y += sromc.o COBJS-y += timer.o COBJS-$(CONFIG_CMD_SLEEP) += sleep.o COBJS-$(CONFIG_CMD_SLEEP) += sleep_asm.o -COBJS-$(CONFIG_SOFT_I2C) += i2c-gpio.o COBJS-$(CONFIG_CMD_USBDOWN) += usb-hs-otg.o usb_downloader.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index 621e400..78e4a78 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -40,6 +40,7 @@ COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o COBJS-$(CONFIG_SPEAR_I2C) += spr_i2c.o COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o +COBJS-$(CONFIG_S5P_GPIO_I2C) += s5p_gpio_i2c.o COBJS-$(CONFIG_DRIVER_S5PC1XX_I2C) += s5pc1xx_i2c.o COBJS := $(COBJS-y) diff --git a/arch/arm/cpu/armv7/s5pc1xx/i2c-gpio.c b/drivers/i2c/s5p_gpio_i2c.c similarity index 97% rename from arch/arm/cpu/armv7/s5pc1xx/i2c-gpio.c rename to drivers/i2c/s5p_gpio_i2c.c index 7998d82..55e4233 100644 --- a/arch/arm/cpu/armv7/s5pc1xx/i2c-gpio.c +++ b/drivers/i2c/s5p_gpio_i2c.c @@ -27,6 +27,8 @@ #include #include +#ifdef CONFIG_SOFT_I2C + static struct i2c_gpio_bus *i2c_gpio; void i2c_gpio_init(struct i2c_gpio_bus *bus, int len, int index) @@ -108,3 +110,5 @@ void i2c_gpio_dir(int dir) i2c_gpio[bus_index].bus->sda_pin); } } + +#endif /* CONFIG_SOFT_I2C */ diff --git a/include/configs/s5pc1xx_universal.h b/include/configs/s5pc1xx_universal.h index c5d0ede..0a8fe5a 100644 --- a/include/configs/s5pc1xx_universal.h +++ b/include/configs/s5pc1xx_universal.h @@ -367,6 +367,7 @@ #define CONFIG_SYS_I2C_0 1 #else #include +#define CONFIG_S5P_GPIO_I2C 1 #define CONFIG_SOFT_I2C 1 #define CONFIG_SYS_I2C_INIT_BOARD #define CONFIG_SYS_I2C_SPEED 50000 -- 2.7.4