Skip to contentSkip to conversation

blackfin: soft-i2c: No need to define blackfin specific soft i2c operations.

PATCH New Sonic Zhang 2 participants 2 messages Nov 18, 2013 – Nov 21, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blackfin: soft-i2c: No need to define blackfin specific soft i2c operations.

From: Sonic Zhang <[email protected]>

Use default GPIO operations.

---
 include/configs/bf533-stamp.h | 29 ++---------------------------
 1 file changed, 2 insertions(+), 27 deletions(-)
include/configs/bf533-stamp.h +2 -27
index a22c868..f5b9658 100644
@@ -80,33 +80,8 @@
 /*
  * Software (bit-bang) I2C driver configuration
  */
-#define PF_SCL			PF3
-#define PF_SDA			PF2
-#define I2C_INIT		(*pFIO_DIR |=  PF_SCL); asm("ssync;")
-#define I2C_ACTIVE		(*pFIO_DIR |=  PF_SDA); \
-				*pFIO_INEN &= ~PF_SDA; asm("ssync;")
-#define I2C_TRISTATE		(*pFIO_DIR &= ~PF_SDA); \
-				*pFIO_INEN |= PF_SDA; asm("ssync;")
-#define I2C_READ		((volatile)(*pFIO_FLAG_D & PF_SDA) != 0); \
-				asm("ssync;")
-#define I2C_SDA(bit)	if (bit) { \
-				*pFIO_FLAG_S = PF_SDA; \
-				asm("ssync;"); \
-				} \
-			else	{ \
-				*pFIO_FLAG_C = PF_SDA; \
-				asm("ssync;"); \
-				}
-#define I2C_SCL(bit)	if (bit) { \
-				*pFIO_FLAG_S = PF_SCL; \
-				asm("ssync;"); \
-				} \
-			else	{ \
-				*pFIO_FLAG_C = PF_SCL; \
-				asm("ssync;"); \
-				}
-#define I2C_DELAY		udelay(5)	/* 1/4 I2C clock duration */
-
+#define CONFIG_SOFT_I2C_GPIO_SCL	GPIO_PF3
+#define CONFIG_SOFT_I2C_GPIO_SDA	GPIO_PF2
 
 /*
  * Flash Settings
Signature · 1 line
1.8.2.3
#1 lore raw

PATCH 1/1 blackfin: soft-i2c: No need to define blackfin specific soft i2c operations.

Hello Sonic

About the subject of your patches

Quoted 1 line

blackfin: soft-i2c: No need to define blackfin specific soft i2c operations.

U-Boot wiki page [http://www.denx.de/wiki/U-Boot/Patches]
says like this:

- Don't use periods to end the summary line
(e.g., don't do "Add support for X.")

Best Regards
Masahiro Yamada