Sonic Zhang | 18 Nov 12:02 2013
Picon

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

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

Use default GPIO operations.

Signed-off-by: Sonic Zhang <sonic.zhang <at> 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
 <at>  <at>  -80,33 +80,8  <at>  <at> 
 /*
  * 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;"); \
-				} \
(Continue reading)

Sonic Zhang | 18 Nov 08:12 2013
Picon

[PATCH 1/4] blackfin: i2c: Missing the patch to define GPIO I2C pins.

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

Signed-off-by: Sonic Zhang <sonic.zhang <at> analog.com>
---
 include/configs/bf533-stamp.h | 48 +++++--------------------------------------
 1 file changed, 5 insertions(+), 43 deletions(-)

diff --git a/include/configs/bf533-stamp.h b/include/configs/bf533-stamp.h
index a22c868..26a140e 100644
--- a/include/configs/bf533-stamp.h
+++ b/include/configs/bf533-stamp.h
 <at>  <at>  -14,6 +14,7  <at>  <at> 
 #define CONFIG_BFIN_CPU             bf533-0.3
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS

+
 /*
  * Clock Settings
  *	CCLK = (CLKIN * VCO_MULT) / CCLK_DIV
 <at>  <at>  -37,6 +38,7  <at>  <at> 
 /* Values can range from 1-15						*/
 #define CONFIG_SCLK_DIV			6 /* note: 1.2 boards can go faster */

+
 /*
  * Memory Settings
  */
 <at>  <at>  -72,42 +74,6  <at>  <at> 
 /* #define CONFIG_ETHADDR	02:80:ad:20:31:b8 */

(Continue reading)

Masahiro Yamada | 18 Nov 05:22 2013

Many Blackfin boards are broken

Hello Sonic and other Blackfin board maintainers.

I cannot build many of Blackfin boards.

(1)
gpio.c:780: error: ‘PORTA_FER’ undeclared here (not in a function)
gpio.c:781: error: ‘PORTB_FER’ undeclared here (not in a function)
gpio.c:782: error: ‘PORTC_FER’ undeclared here (not in a function)
gpio.c:783: error: ‘PORTD_FER’ undeclared here (not in a function)
gpio.c:784: error: ‘PORTE_FER’ undeclared here (not in a function)

I confirmed this error message for:
bf506f-ezkit, bf525-ucr2, bf537-minotaur, bf537-srv1, blackstamp,
dnp5370.

(2)
Compiling cm-bf548 board failed with the following message:
gpio.c:61:3: error: #error no gpio arrays defined

(3)
Compiling bf533-stamp failed with the following message:
soft_i2c.c:155: error: ‘pFIO_FLAG_S’ undeclared (first use in this function)
soft_i2c.c:155: error: (Each undeclared identifier is reported only once
soft_i2c.c:155: error: for each function it appears in.)
soft_i2c.c:155: error: ‘pFIO_FLAG_C’ undeclared (first use in this function)
soft_i2c.c:158: error: ‘pFIO_DIR’ undeclared (first use in this function)
soft_i2c.c:160: error: ‘pFIO_INEN’ undeclared (first use in this function)
soft_i2c.c:182: error: ‘pFIO_FLAG_S’ undeclared (first use in this function)
soft_i2c.c:182: error: ‘pFIO_FLAG_C’ undeclared (first use in this function)
soft_i2c.c:183: error: ‘pFIO_DIR’ undeclared (first use in this function)
(Continue reading)

Sonic Zhang | 14 May 08:20 2013
Picon

Pull request v2: u-boot-blackfin

Hi Tom,

Please pull the following patches from u-boot-blackfin into your tree.
In this second pull request:
- CONFIG_CMD_SOFTSWITCH document is added to the README file.
- The tools/patman folder is synced with upstream master.
- 3 missing patches were sent to the mailing list.

Thanks

The following changes since commit bbd0f7e3ba66d288a2f146f1c7797801e04598ae:

  Move FDT_RAMDISK_OVERHEAD from fdt.h to libfdt_env.h (2013-05-10
19:04:50 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-blackfin.git master

for you to fetch changes up to da34aae5fba36c1f1989fdd41fffa723f300eaad:

  bfin: Move gpio support for bf54x and bf60x into the generic driver
folder. (2013-05-13 16:30:27 +0800)

----------------------------------------------------------------
Bob Liu (3):
      blackfin: reduce size of u-boot.ldr in bf548-ezkit default config.
      blackfin: add baudrate to bdinfo
      blackfin: bf609: add softswitch config command

(Continue reading)

Sonic Zhang | 13 May 10:00 2013
Picon

[PATCH v2 1/2] blackfin: bf609: implement soft switch

From: Sonic Zhang <sonic.zhang@...>

Set up soft switch pins properly in board init code.

Signed-off-by: Sonic Zhang <sonic.zhang@...>
Signed-off-by: Scott Jiang <scott.jiang@...>
Signed-off-by: Bob Liu <lliubbo@...>
Signed-off-by: Sonic Zhang <sonic.adi@...>
---
Changes in v2: None

 board/bf609-ezkit/soft_switch.c | 180 ++++++++++++++++++++++++++++++++++++++++
 board/bf609-ezkit/soft_switch.h |  71 ++++++++++++++++
 2 files changed, 251 insertions(+)
 create mode 100644 board/bf609-ezkit/soft_switch.c
 create mode 100644 board/bf609-ezkit/soft_switch.h

diff --git a/board/bf609-ezkit/soft_switch.c b/board/bf609-ezkit/soft_switch.c
new file mode 100644
index 0000000..2e1404f
--- /dev/null
+++ b/board/bf609-ezkit/soft_switch.c
 <at>  <at>  -0,0 +1,180  <at>  <at> 
+/*
+ * U-boot - main board file
+ *
+ * Copyright (c) 2008-2011 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
(Continue reading)

Sonic Zhang | 13 May 09:59 2013

[PATCH v2 1/2] blackfin: bf609: implement soft switch

Set up soft switch pins properly in board init code.

Signed-off-by: Sonic Zhang <sonic.zhang@...>
Signed-off-by: Scott Jiang <scott.jiang@...>
Signed-off-by: Bob Liu <lliubbo@...>
---
Changes in v2: None

 board/bf609-ezkit/soft_switch.c | 180 ++++++++++++++++++++++++++++++++++++++++
 board/bf609-ezkit/soft_switch.h |  71 ++++++++++++++++
 2 files changed, 251 insertions(+)
 create mode 100644 board/bf609-ezkit/soft_switch.c
 create mode 100644 board/bf609-ezkit/soft_switch.h

diff --git a/board/bf609-ezkit/soft_switch.c b/board/bf609-ezkit/soft_switch.c
new file mode 100644
index 0000000..2e1404f
--- /dev/null
+++ b/board/bf609-ezkit/soft_switch.c
 <at>  <at>  -0,0 +1,180  <at>  <at> 
+/*
+ * U-boot - main board file
+ *
+ * Copyright (c) 2008-2011 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include <common.h>
+#include <asm/blackfin.h>
(Continue reading)

Sonic Zhang | 13 May 06:20 2013
Picon

[PATCH v1 1/3] blackfin: Enable early print via the generic serial API.

From: Sonic Zhang <sonic.zhang@...>

Remove blackfin specific implementation of the generic serial API when
early print macro is defined.

In BFIN_BOOT_BYPASS mode, don't call generic serial_puts, because
early print in bypass mode is running before code binary is relocated
to the link address.

Signed-off-by: Sonic Zhang <sonic.zhang@...>
---
 arch/blackfin/cpu/serial.c        |   71 ++++++++++++------------------------
 arch/blackfin/cpu/serial.h        |   10 +++---
 include/configs/bfin_adi_common.h |    3 --
 3 files changed, 29 insertions(+), 55 deletions(-)

diff --git a/arch/blackfin/cpu/serial.c b/arch/blackfin/cpu/serial.c
index 36d2a5c..89290d6 100644
--- a/arch/blackfin/cpu/serial.c
+++ b/arch/blackfin/cpu/serial.c
 <at>  <at>  -197,13 +197,16  <at>  <at>  static void uart_loop(uint32_t uart_base, int state)

 static inline void __serial_set_baud(uint32_t uart_base, uint32_t baud)
 {
+#ifdef CONFIG_DEBUG_EARLY_SERIAL
+	serial_early_set_baud(uart_base, baud);
+#else
 	uint16_t divisor = (get_uart_clk() + (baud * 8)) / (baud * 16)
 			- ANOMALY_05000230;

(Continue reading)

Sonic Zhang | 9 May 05:13 2013
Picon

Pull request: u-boot-blackfin

Hi Tom,

Please pull the following patches from u-boot-blackfin into your tree.

Thanks

Sonic

The following changes since commit fe8e4dbad1d31c452af3fbabba21e72b210381b3:

  nds32: Use sections header to obtain link symbols (2013-05-08 12:38:10 +0800)

are available in the git repository at:

  git://git.denx.de/u-boot-blackfin.git master

for you to fetch changes up to 2ac75146988bdcf8c30aee9c286af7f2f93b474e:

  bfin: Move gpio support for bf54x and bf60x into the generic driver
folder. (2013-05-09 10:53:47 +0800)

----------------------------------------------------------------
Bob Liu (3):
      blackfin: reduce size of u-boot.ldr in bf548-ezkit default config.
      blackfin: add baudrate to bdinfo
      blackfin: bf609: add softswitch config command

Marek Vasut (1):
      blackfin: The buf variable in bfin_mac.c is not used and produces warning,

(Continue reading)

Sonic Zhang | 2 May 07:55 2013
Picon

[PATCH v1] bfin: Move gpio support for bf54x and bf60x into the generic driver folder.

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

The gpio spec for bf54x and bf60x differ a lot from the old gpio driver for bf5xx.
A lot of machine macros are used to accomodate both code in one gpio driver.
This patch split the old gpio driver and move new gpio2 support to the generic
gpio driver folder.

- To enable gpio2 driver, macro CONFIG_ADI_GPIO2 should be defined in the board's
config header file.
- The gpio2 driver supports bf54x, bf60x and future ADI processors, while the
older gpio driver supports bf50x, bf51x, bf52x, bf53x and bf561.
- All blackfin specific gpio function names are replaced by the generic gpio APIs.

Signed-off-by: Sonic Zhang <sonic.zhang <at> analog.com>
---
 arch/blackfin/cpu/Makefile          |    2 +-
 arch/blackfin/cpu/gpio.c            |  145 ++----------
 arch/blackfin/include/asm/gpio.h    |   62 +----
 arch/blackfin/include/asm/portmux.h |    5 -
 drivers/gpio/Makefile               |    1 +
 drivers/gpio/adi_gpio2.c            |  440 +++++++++++++++++++++++++++++++++++
 include/configs/bf548-ezkit.h       |    2 +
 include/configs/bf609-ezkit.h       |    2 +
 include/configs/bfin_adi_common.h   |    4 +-
 9 files changed, 479 insertions(+), 184 deletions(-)
 create mode 100644 drivers/gpio/adi_gpio2.c

diff --git a/arch/blackfin/cpu/Makefile b/arch/blackfin/cpu/Makefile
index 929fc8b..1421cb2 100644
--- a/arch/blackfin/cpu/Makefile
(Continue reading)

Sonic Zhang | 27 Apr 13:04 2013
Picon

[PATCH v1] mmc: bfin: Ensure MMR writing is done before next command.

From: Sonic Zhang <sonic.zhang@...>

- Ensure MMR writing is done before next command.
- Invalidate the buffer before starting to read.

Signed-off-by: Sonic Zhang <sonic.zhang@...>
---
 drivers/mmc/bfin_sdh.c |   30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/bfin_sdh.c b/drivers/mmc/bfin_sdh.c
index 0f98b96..028cb58 100644
--- a/drivers/mmc/bfin_sdh.c
+++ b/drivers/mmc/bfin_sdh.c
 <at>  <at>  -136,6 +136,9  <at>  <at>  static int sdh_setup_data(struct mmc *mmc, struct mmc_data *data)
 	/* Don't support write yet. */
 	if (data->flags & MMC_DATA_WRITE)
 		return UNUSABLE_ERR;
+	blackfin_dcache_flush_invalidate_range(data->dest,
+			data->dest + data_size);
+	SSYNC();
 #ifndef RSI_BLKSZ
 	data_ctl |= ((ffs(data_size) - 1) << 4);
 #else
 <at>  <at>  -143,21 +146,22  <at>  <at>  static int sdh_setup_data(struct mmc *mmc, struct mmc_data *data)
 #endif
 	data_ctl |= DTX_DIR;
 	bfin_write_SDH_DATA_CTL(data_ctl);
+	SSYNC();
 	dma_cfg = WDSIZE_32 | PSIZE_32 | RESTART | WNR | DMAEN;
(Continue reading)

Sonic Zhang | 11 Apr 11:48 2013
Picon

[PATCH v1] blackfin: Add comments for watchdog event initialization.

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

- Add comments for watchdog event initialization.
- Make sure the writting operation to MMRs are finished.

Signed-off-by: Sonic Zhang <sonic.zhang <at> analog.com>
---
 arch/blackfin/cpu/initcode.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/blackfin/cpu/initcode.c b/arch/blackfin/cpu/initcode.c
index 5fc06e1..ffaf101 100644
--- a/arch/blackfin/cpu/initcode.c
+++ b/arch/blackfin/cpu/initcode.c
 <at>  <at>  -458,15 +458,23  <at>  <at>  program_early_devices(ADI_BOOT_DATA *bs, uint *sdivB, uint *divB, uint *vcoB)
 	if (CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_BYPASS) {
 		serial_putc('e');
 #ifdef __ADSPBF60x__
+		/* Reset system event controller */
 		bfin_write_SEC_GCTL(0x2);
+		bfin_write_SEC_CCTL(0x2);
 		SSYNC();
+
+		/* Enable fault event input and system reset action in fault
+		 * controller. Route watchdog timeout event to fault interface.
+		 */
 		bfin_write_SEC_FCTL(0xc1);
+		/* Enable watchdog interrupt source */
 		bfin_write_SEC_SCTL(2, bfin_read_SEC_SCTL(2) | 0x6);
-
(Continue reading)


Gmane