[U-Boot] [PATCH 3/4] blackfin: rename bfin-twi_i2c driver to adi_i2c

Sonic Zhang sonic.adi at gmail.com
Tue Jan 28 06:53:35 CET 2014


From: Sonic Zhang <sonic.zhang at analog.com>

The ADI twi peripheral is not binding to Blackfin processor only. 
Change to a generic name.

Signed-off-by: Sonic Zhang <sonic.zhang at analog.com>
---
 arch/blackfin/include/asm/twi.h           | 15 +++++++++++++++
 drivers/i2c/Makefile                      |  2 +-
 drivers/i2c/{bfin-twi_i2c.c => adi_i2c.c} |  3 +--
 include/configs/bct-brettl2.h             |  2 +-
 include/configs/bf518f-ezbrd.h            |  2 +-
 include/configs/bf526-ezbrd.h             |  2 +-
 include/configs/bf527-ad7160-eval.h       |  2 +-
 include/configs/bf527-ezkit.h             |  2 +-
 include/configs/bf527-sdp.h               |  2 +-
 include/configs/bf537-minotaur.h          |  2 +-
 include/configs/bf537-pnav.h              |  2 +-
 include/configs/bf537-srv1.h              |  2 +-
 include/configs/bf537-stamp.h             |  2 +-
 include/configs/bf538f-ezkit.h            |  2 +-
 include/configs/bf548-ezkit.h             |  2 +-
 include/configs/bf609-ezkit.h             |  2 +-
 include/configs/br4.h                     |  2 +-
 include/configs/cm-bf527.h                |  2 +-
 include/configs/cm-bf537e.h               |  2 +-
 include/configs/cm-bf537u.h               |  2 +-
 include/configs/cm-bf548.h                |  2 +-
 include/configs/pr1.h                     |  2 +-
 include/configs/tcm-bf518.h               |  2 +-
 include/configs/tcm-bf537.h               |  2 +-
 24 files changed, 38 insertions(+), 24 deletions(-)
 create mode 100644 arch/blackfin/include/asm/twi.h
 rename drivers/i2c/{bfin-twi_i2c.c => adi_i2c.c} (99%)

diff --git a/arch/blackfin/include/asm/twi.h b/arch/blackfin/include/asm/twi.h
new file mode 100644
index 0000000..922cdbd
--- /dev/null
+++ b/arch/blackfin/include/asm/twi.h
@@ -0,0 +1,15 @@
+/*
+ * i2c.c - driver for Blackfin on-chip TWI/I2C
+ *
+ * Copyright (c) 2006-2010 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef __ARCH_TWI_H
+#define __ARCH_TWI_H
+
+#include <asm/blackfin.h>
+#include <asm/mach-common/bits/twi.h>
+
+#endif
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index fa3a875..4bf4d2e 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-obj-$(CONFIG_BFIN_TWI_I2C) += bfin-twi_i2c.o
+obj-$(CONFIG_ADI_I2C) += adi_i2c.o
 obj-$(CONFIG_DRIVER_DAVINCI_I2C) += davinci_i2c.o
 obj-$(CONFIG_DW_I2C) += designware_i2c.o
 obj-$(CONFIG_I2C_MVTWSI) += mvtwsi.o
diff --git a/drivers/i2c/bfin-twi_i2c.c b/drivers/i2c/adi_i2c.c
similarity index 99%
rename from drivers/i2c/bfin-twi_i2c.c
rename to drivers/i2c/adi_i2c.c
index cfab064..743aa25 100644
--- a/drivers/i2c/bfin-twi_i2c.c
+++ b/drivers/i2c/adi_i2c.c
@@ -9,9 +9,8 @@
 #include <common.h>
 #include <i2c.h>
 
-#include <asm/blackfin.h>
 #include <asm/clock.h>
-#include <asm/mach-common/bits/twi.h>
+#include <asm/twi.h>
 
 /* Every register is 32bit aligned, but only 16bits in size */
 #define ureg(name) u16 name; u16 __pad_##name;
diff --git a/include/configs/bct-brettl2.h b/include/configs/bct-brettl2.h
index 5b09b45..93a713b 100644
--- a/include/configs/bct-brettl2.h
+++ b/include/configs/bct-brettl2.h
@@ -121,7 +121,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/bf518f-ezbrd.h b/include/configs/bf518f-ezbrd.h
index a97972b..4b94ba5 100644
--- a/include/configs/bf518f-ezbrd.h
+++ b/include/configs/bf518f-ezbrd.h
@@ -134,7 +134,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/bf526-ezbrd.h b/include/configs/bf526-ezbrd.h
index 0031093..54f26f4 100644
--- a/include/configs/bf526-ezbrd.h
+++ b/include/configs/bf526-ezbrd.h
@@ -131,7 +131,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/bf527-ad7160-eval.h b/include/configs/bf527-ad7160-eval.h
index fa05103..ca6b0d5 100644
--- a/include/configs/bf527-ad7160-eval.h
+++ b/include/configs/bf527-ad7160-eval.h
@@ -119,7 +119,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/bf527-ezkit.h b/include/configs/bf527-ezkit.h
index db1b613..7ec5b02 100644
--- a/include/configs/bf527-ezkit.h
+++ b/include/configs/bf527-ezkit.h
@@ -134,7 +134,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/bf527-sdp.h b/include/configs/bf527-sdp.h
index c0e8b5a..96629d4 100644
--- a/include/configs/bf527-sdp.h
+++ b/include/configs/bf527-sdp.h
@@ -103,7 +103,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/bf537-minotaur.h b/include/configs/bf537-minotaur.h
index 156eeab..2b2f79c 100644
--- a/include/configs/bf537-minotaur.h
+++ b/include/configs/bf537-minotaur.h
@@ -120,7 +120,7 @@
 /*
  * I2C settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 #define CONFIG_SYS_I2C_SPEED		50000
 #define CONFIG_SYS_I2C_SLAVE		0
diff --git a/include/configs/bf537-pnav.h b/include/configs/bf537-pnav.h
index 3aa3d50..c81572c 100644
--- a/include/configs/bf537-pnav.h
+++ b/include/configs/bf537-pnav.h
@@ -142,7 +142,7 @@
 /*
  * I2C settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/bf537-srv1.h b/include/configs/bf537-srv1.h
index e12d761..08bc030 100644
--- a/include/configs/bf537-srv1.h
+++ b/include/configs/bf537-srv1.h
@@ -120,7 +120,7 @@
 /*
  * I2C settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 #define CONFIG_SYS_I2C_SPEED		50000
 #define CONFIG_SYS_I2C_SLAVE		0
diff --git a/include/configs/bf537-stamp.h b/include/configs/bf537-stamp.h
index 02945be..f32359a 100644
--- a/include/configs/bf537-stamp.h
+++ b/include/configs/bf537-stamp.h
@@ -128,7 +128,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/bf538f-ezkit.h b/include/configs/bf538f-ezkit.h
index ffb0caf..e0bcd40 100644
--- a/include/configs/bf538f-ezkit.h
+++ b/include/configs/bf538f-ezkit.h
@@ -125,7 +125,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/bf548-ezkit.h b/include/configs/bf548-ezkit.h
index da5f029..c54d2fa 100644
--- a/include/configs/bf548-ezkit.h
+++ b/include/configs/bf548-ezkit.h
@@ -134,7 +134,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/bf609-ezkit.h b/include/configs/bf609-ezkit.h
index 1a43e1b..6156ddb 100644
--- a/include/configs/bf609-ezkit.h
+++ b/include/configs/bf609-ezkit.h
@@ -80,7 +80,7 @@
 #define CONFIG_MII
 
 /* i2c Settings */
-#define CONFIG_BFIN_TWI_I2C
+#define CONFIG_ADI_I2C
 #define CONFIG_HARD_I2C
 
 /*
diff --git a/include/configs/br4.h b/include/configs/br4.h
index ef3752d..f220eb5 100644
--- a/include/configs/br4.h
+++ b/include/configs/br4.h
@@ -102,7 +102,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C
+#define CONFIG_ADI_I2C
 #define CONFIG_HARD_I2C
 
 
diff --git a/include/configs/cm-bf527.h b/include/configs/cm-bf527.h
index b15a1eb..c4f2f1f 100644
--- a/include/configs/cm-bf527.h
+++ b/include/configs/cm-bf527.h
@@ -113,7 +113,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/cm-bf537e.h b/include/configs/cm-bf537e.h
index 2838012..de839c4 100644
--- a/include/configs/cm-bf537e.h
+++ b/include/configs/cm-bf537e.h
@@ -122,7 +122,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/cm-bf537u.h b/include/configs/cm-bf537u.h
index da4cc67..9d65e7b 100644
--- a/include/configs/cm-bf537u.h
+++ b/include/configs/cm-bf537u.h
@@ -120,7 +120,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/cm-bf548.h b/include/configs/cm-bf548.h
index 7f27eda..7c9d1cd 100644
--- a/include/configs/cm-bf548.h
+++ b/include/configs/cm-bf548.h
@@ -104,7 +104,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/pr1.h b/include/configs/pr1.h
index 03d4269..37f3fab 100644
--- a/include/configs/pr1.h
+++ b/include/configs/pr1.h
@@ -102,7 +102,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C
+#define CONFIG_ADI_I2C
 #define CONFIG_HARD_I2C
 
 
diff --git a/include/configs/tcm-bf518.h b/include/configs/tcm-bf518.h
index 241f210..8d835b4 100644
--- a/include/configs/tcm-bf518.h
+++ b/include/configs/tcm-bf518.h
@@ -103,7 +103,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
diff --git a/include/configs/tcm-bf537.h b/include/configs/tcm-bf537.h
index 58bcdc8..7d1ee77 100644
--- a/include/configs/tcm-bf537.h
+++ b/include/configs/tcm-bf537.h
@@ -122,7 +122,7 @@
 /*
  * I2C Settings
  */
-#define CONFIG_BFIN_TWI_I2C	1
+#define CONFIG_ADI_I2C		1
 #define CONFIG_HARD_I2C		1
 
 
-- 
1.8.2.3




More information about the U-Boot mailing list