Skip to contentSkip to conversation

blackfin: Use ADI_GPIO2 driver other than the default ADI_GPIO1

PATCH New Sonic Zhang 3 participants 8 messages Nov 25, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 blackfin: Use ADI_GPIO2 driver other than the default ADI_GPIO1

From: Sonic Zhang <[email protected]>

---
 include/configs/cm-bf548.h |    2 ++
 1 file changed, 2 insertions(+)
include/configs/cm-bf548.h +2 -0
index 3c9eeb5..7f27eda 100644
@@ -118,6 +118,8 @@
 #define CONFIG_BOOTCOMMAND	"run flashboot"
 #define FLASHBOOT_ENV_SETTINGS	"flashboot=bootm 0x20040000\0"
 
+#define CONFIG_ADI_GPIO2
+
 #ifndef __ADSPBF542__
 /* Don't waste time transferring a logo over the UART */
 # if (CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_UART)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 2/4 blackfin: If none ADI_GPIOX macro is defined, use ADI_GPIO1 as default

From: Sonic Zhang <[email protected]>

---
 arch/blackfin/cpu/gpio.c         |    2 +-
 arch/blackfin/include/asm/gpio.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/blackfin/cpu/gpio.c +1 -1
index 5e9c68a..86da706 100644
@@ -12,7 +12,7 @@
 #include <asm/gpio.h>
 #include <asm/portmux.h>
 
-#ifdef CONFIG_ADI_GPIO1
+#ifndef CONFIG_ADI_GPIO2
 #if ANOMALY_05000311 || ANOMALY_05000323
 enum {
 	AWA_data = SYSCR,
arch/blackfin/include/asm/gpio.h +1 -1
index 376ec02..6ebcf01 100644
@@ -72,7 +72,7 @@
 
 #ifndef __ASSEMBLY__
 
-#ifdef CONFIG_ADI_GPIO1
+#ifndef CONFIG_ADI_GPIO2
 void set_gpio_dir(unsigned, unsigned short);
 void set_gpio_inen(unsigned, unsigned short);
 void set_gpio_polar(unsigned, unsigned short);
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v2 3/4 blackfin: Add missing macro CONFIG_BFIN_SERIAL

In reply to Sonic Zhang

From: Sonic Zhang <[email protected]>

---
 include/configs/bf506f-ezkit.h   |    1 +
 include/configs/bf525-ucr2.h     |    1 +
 include/configs/bf537-minotaur.h |    1 +
 include/configs/bf537-srv1.h     |    1 +
 include/configs/blackstamp.h     |    1 +
 include/configs/dnp5370.h        |    1 +
 6 files changed, 6 insertions(+)
include/configs/bf506f-ezkit.h +1 -0
index 77b6735..5ad3ee7 100644
@@ -94,6 +94,7 @@
 #define CONFIG_DCACHE_OFF
 #define CONFIG_UART_CONSOLE	0
 #define CONFIG_BAUDRATE 115200
+#define CONFIG_BFIN_SERIAL
 
 #define CONFIG_CMD_MEMORY
 #undef CONFIG_GZIP
include/configs/bf525-ucr2.h +1 -0
index 1f65130..008f4b5 100644
@@ -85,6 +85,7 @@
 #define CONFIG_UART_CONSOLE	0
 
 #define CONFIG_BAUDRATE		115200
+#define CONFIG_BFIN_SERIAL
 #define CONFIG_BOOTARGS		"root=/dev/mtdblock0 rw"
 #define CONFIG_BOOTCOMMAND	"run sfboot"
 #define CONFIG_BOOTDELAY	5
include/configs/bf537-minotaur.h +1 -0
index feb9d73..156eeab 100644
@@ -136,6 +136,7 @@
 
 #define CONFIG_BAUDRATE		57600
 #define CONFIG_UART_CONSOLE	0
+#define CONFIG_BFIN_SERIAL
 
 #define CONFIG_PANIC_HANG	1
 #define CONFIG_RTC_BFIN		1
include/configs/bf537-srv1.h +1 -0
index 1de8ffe..e12d761 100644
@@ -136,6 +136,7 @@
 
 #define CONFIG_BAUDRATE		115200
 #define CONFIG_UART_CONSOLE	0
+#define CONFIG_BFIN_SERIAL
 
 #define CONFIG_PANIC_HANG	1
 #define CONFIG_RTC_BFIN		1
include/configs/blackstamp.h +1 -0
index 5b3aac7..7de4253 100644
@@ -195,6 +195,7 @@
 #define CONFIG_BAUDRATE		57600
 #define CONFIG_LOADS_ECHO	1
 #define CONFIG_UART_CONSOLE	0
+#define CONFIG_BFIN_SERIAL
 
 /*
  * I2C settings
include/configs/dnp5370.h +1 -0
index d0e72e3..4f2c742 100644
@@ -103,6 +103,7 @@
 #define CONFIG_DNP5370_EXT_WD_DISABLE 1
 
 #define CONFIG_UART_CONSOLE 0
+#define CONFIG_BFIN_SERIAL
 #define CONFIG_BAUDRATE     115200
 #define CONFIG_BOOTCOMMAND  "bootm 0x20030000"
 #define CONFIG_BOOTARGS     "console=ttyBF0,115200 root=/dev/mtdblock3 rootfstype=ext2"
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v2 4/4 blackfin: soft-i2c: No need to define blackfin specific soft i2c operations

In reply to Sonic Zhang

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.7.9.5
#4 lore raw

PATCH v2 4/4 blackfin: soft-i2c: No need to define blackfin specific soft i2c operations

Hello Sonic,

Am 25.11.2013 07:27, schrieb Sonic Zhang:

Quoted 8 lines

From: Sonic Zhang<[email protected]>

Use default GPIO operations.

---
  include/configs/bf533-stamp.h |   29 ++---------------------------
  1 file changed, 2 insertions(+), 27 deletions(-)

Is this the same patch you posted here:

http://patchwork.ozlabs.org/patch/292026/

?

I have the "old" patch on my ToDo list, but I can Ack the new patch, if it should go through the blackfin repo ... added Mike Frysinger to cc ...

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#5 lore raw

PATCH v2 4/4 blackfin: soft-i2c: No need to define blackfin specific soft i2c operations

Hi Heiko,

The second patch is to address Masahiro Yamada's concern on the title format. No change to the content.

Mike is no longer with ADI and Blackfin. If you prefer to go through the Blackfin repo, I can handle it.

Regards,

Sonic

Quoted 35 lines

-----Original Message-----
From: Heiko Schocher [mailto:hs at denx.de]
Sent: Monday, November 25, 2013 2:51 PM
To: Sonic Zhang
Cc: Masahiro Yamada; u-boot at lists.denx.de; adi-u-boot-devel at lists.sourceforge.net; Zhang, Sonic; Mike Frysinger
Subject: Re: [PATCH 4/4 v2] blackfin: soft-i2c: No need to define blackfin specific soft i2c operations

Hello Sonic,

Am 25.11.2013 07:27, schrieb Sonic Zhang:

Quoted 8 lines

From: Sonic Zhang<[email protected]>

Use default GPIO operations.

---
  include/configs/bf533-stamp.h |   29 ++---------------------------
  1 file changed, 2 insertions(+), 27 deletions(-)

Is this the same patch you posted here:

http://patchwork.ozlabs.org/patch/292026/

?

I have the "old" patch on my ToDo list, but I can Ack the new patch, if it should go through the blackfin repo ... added Mike Frysinger to cc ...

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

#6 lore raw

PATCH v2 4/4 blackfin: soft-i2c: No need to define blackfin specific soft i2c operations

Hello Sonic,

Am 25.11.2013 08:07, schrieb Zhang, Sonic:

Quoted 3 lines

Hi Heiko,

The second patch is to address Masahiro Yamada's concern on the title format. No change to the content.

Oh... you should note this after the "---" in your patch.

Quoted 1 line

Mike is no longer with ADI and Blackfin. If you prefer to go through the Blackfin repo, I can handle it.

Hmm... as you posted it in a patchserie now, I just Acked it ;-)

Oh, maybe you can update "doc/git-mailrc" ?

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#7 lore raw

PATCH v2 4/4 blackfin: soft-i2c: No need to define blackfin specific soft i2c operations

In reply to Sonic Zhang

Hello Sonic,

Am 25.11.2013 07:27, schrieb Sonic Zhang:

Quoted 8 lines

From: Sonic Zhang<[email protected]>

Use default GPIO operations.

---
  include/configs/bf533-stamp.h |   29 ++---------------------------
  1 file changed, 2 insertions(+), 27 deletions(-)

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany