From: Sonic Zhang <sonic.adi@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4 v2] blackfin: soft-i2c: No need to define blackfin specific soft i2c operations
Date: Mon, 25 Nov 2013 14:27:13 +0800 [thread overview]
Message-ID: <1385360833-26879-4-git-send-email-sonic.adi@gmail.com> (raw)
In-Reply-To: <1385360833-26879-1-git-send-email-sonic.adi@gmail.com>
From: Sonic Zhang <sonic.zhang@analog.com>
Use default GPIO operations.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
include/configs/bf533-stamp.h | 29 ++---------------------------
1 file changed, 2 insertions(+), 27 deletions(-)
diff --git a/include/configs/bf533-stamp.h b/include/configs/bf533-stamp.h
index a22c868..f5b9658 100644
--- a/include/configs/bf533-stamp.h
+++ b/include/configs/bf533-stamp.h
@@ -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
--
1.7.9.5
next prev parent reply other threads:[~2013-11-25 6:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 6:27 [U-Boot] [PATCH 1/4 v2] blackfin: Use ADI_GPIO2 driver other than the default ADI_GPIO1 Sonic Zhang
2013-11-25 6:27 ` [U-Boot] [PATCH 2/4 v2] blackfin: If none ADI_GPIOX macro is defined, use ADI_GPIO1 as default Sonic Zhang
2013-11-25 6:27 ` [U-Boot] [PATCH 3/4 v2] blackfin: Add missing macro CONFIG_BFIN_SERIAL Sonic Zhang
2013-11-25 6:27 ` Sonic Zhang [this message]
2013-11-25 6:51 ` [U-Boot] [PATCH 4/4 v2] blackfin: soft-i2c: No need to define blackfin specific soft i2c operations Heiko Schocher
2013-11-25 7:07 ` Zhang, Sonic
2013-11-25 7:15 ` Heiko Schocher
2013-11-25 7:15 ` Heiko Schocher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385360833-26879-4-git-send-email-sonic.adi@gmail.com \
--to=sonic.adi@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox