Sonic Zhang | 13 May 2013 10:00
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 2013 09:59
Favicon

[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 2013 06:20
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 2013 05:13
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 | 27 Apr 2013 13:04
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 | 1 Apr 2013 11:02
Picon

[PATCH v1] bf609: add SPI register base address

From: Scott Jiang <scott.jiang.linux@...>

- BF609 spi driver depend on this.

Signed-off-by: Scott Jiang <scott.jiang.linux@...>
Signed-off-by: Sonic Zhang <sonic.zhang@...>
---
 arch/blackfin/include/asm/mach-bf609/BF609_def.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/blackfin/include/asm/mach-bf609/BF609_def.h b/arch/blackfin/include/asm/mach-bf609/BF609_def.h
index 4d3b003..02b81d3 100644
--- a/arch/blackfin/include/asm/mach-bf609/BF609_def.h
+++ b/arch/blackfin/include/asm/mach-bf609/BF609_def.h
 <at>  <at>  -128,6 +128,9  <at>  <at> 
 #define EMAC0_MACCFG      0xFFC20000 /* EMAC0 MAC Configuration Register */
 #define EMAC1_MACCFG      0xFFC22000 /* EMAC1 MAC Configuration Register */

+#define SPI0_REGBASE      0xFFC40400 /* SPI0 Base Address */
+#define SPI1_REGBASE      0xFFC40500 /* SPI1 Base Address */
+
 #define DMA10_DSCPTR_NXT  0xFFC05000 /* DMA10 Pointer to Next Initial Desc */
 #define DMA10_ADDRSTART   0xFFC05004 /* DMA10 Start Address of Current Buf */
 #define DMA10_CFG         0xFFC05008 /* DMA10 Configuration Register */
--

-- 
1.7.0.4
Sonic Zhang | 14 Mar 2013 08:29
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 | 13 Mar 2013 03:58
Picon

Re: [U-Boot] [PATCH v1] DOS_PBR block type is also valid dos block type.

Hi Stephen,

On Tue, Mar 12, 2013 at 11:09 AM, Stephen Warren <swarren@...> wrote:
> On 03/11/2013 08:57 PM, Sonic Zhang wrote:
>> Hi Stephen,
>>
>>
>> On Tue, Mar 12, 2013 at 1:28 AM, Stephen Warren <swarren@...> wrote:
>>> On 03/11/2013 03:56 AM, sonic.adi@... wrote:
>>>> From: Sonic Zhang <sonic.zhang@...>
>>>>
>>>> - Should return 0 for both DOS_MBR and DOS_PBR block types in test_part_dos().
>>>
>>> What problem does this solve?
>>>
>>> I don't believe this change is correct. The purpose of test_part_dos()
>>> is to determine whether a block device contains an MS-DOS partition table.
>>>
>>> Such a partition table is present in an MBR, but not a PBR. A PBR
>>> contains a *FAT file-system, and does not include a partition table.
>>
>> The SD card formated by windows 7 into one FAT partition can't be
>> initialized correct in u-boot function init_part() after you reuses
>> function test_block_type() in function test_part_dos(). So, files on
>> that partition can't be displayed when run command "fatls mmc 0".
>>
>> The only difference in your change is to mark dos partition with flag
>> DOS_PBR invalid.
>
> I did test a raw FAT filesystem on an SD card without any partition
(Continue reading)

Sonic Zhang | 4 Mar 2013 08:20
Picon

[PATCH v1 1/2] bfin: Remove spi dma function in bf5xx.

From: Scott Jiang <scott.jiang.linux@...>

BF5xx rx dma causes spi flash random read error.
Accually spi controller has problems both on tx and rx dma.
So remove spi dma support in u-boot.

Signed-off-by: Scott Jiang <scott.jiang.linux@...>
Signed-off-by: Sonic Zhang <sonic.zhang@...>
---
 drivers/spi/bfin_spi.c |  103 +-----------------------------------------------
 1 files changed, 1 insertions(+), 102 deletions(-)

diff --git a/drivers/spi/bfin_spi.c b/drivers/spi/bfin_spi.c
index e080bec..fff384a 100644
--- a/drivers/spi/bfin_spi.c
+++ b/drivers/spi/bfin_spi.c
 <at>  <at>  -13,7 +13,6  <at>  <at> 
 #include <spi.h>

 #include <asm/blackfin.h>
-#include <asm/dma.h>
 #include <asm/gpio.h>
 #include <asm/portmux.h>
 #include <asm/mach-common/bits/spi.h>
 <at>  <at>  -244,106 +243,10  <at>  <at>  void spi_release_bus(struct spi_slave *slave)
 	SSYNC();
 }

-#ifdef __ADSPBF54x__
-# define SPI_DMA_BASE DMA4_NEXT_DESC_PTR
(Continue reading)

Zhang, Sonic | 4 Mar 2013 04:00
Favicon

Re: Blackfin toolchain?

Hi Simon,

You can download the 2012R2-RC2 toolchain at https://blackfin.uclinux.org/gf/project/toolchain/frs

Regards,

Sonic

>-----Original Message-----
>From: sjg@...
[mailto:sjg@...] On Behalf Of Simon Glass
>Sent: Sunday, March 03, 2013 2:07 PM
>To: Zhang, Sonic
>Subject: Blackfin toolchain?
>
>Hi Sonic,
>
>Do you have a toolchain that I could use to build blackfin please?
>
>Mine either spits out debugging (one I got from Mike Frysinger), or errors about -
>fstack-usage (built with buildroot).
>
>Regards,
>Simon
Sonic Zhang | 27 Feb 2013 10:06
Picon

[PATCH v1 1/2] blackfin: Set correct early debug serial baudrate.

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

Calculate the early uart clock from the system clock registers set by
the bootrom other than the predefine uboot clock macros.

Split the early baudrate setting function and the normal baudrate
setting one.

Signed-off-by: Sonic Zhang <sonic.zhang@...>
---
 arch/blackfin/cpu/initcode.c      |   43 +++++++--------------
 arch/blackfin/cpu/serial.c        |   12 +++++-
 arch/blackfin/cpu/serial1.h       |   43 ++++++++-------------
 arch/blackfin/cpu/serial4.h       |   27 ++++---------
 arch/blackfin/include/asm/clock.h |   74 +++++++++++++++++++++++++++++++++++++
 arch/blackfin/lib/clocks.c        |   12 +-----
 6 files changed, 123 insertions(+), 88 deletions(-)
 create mode 100644 arch/blackfin/include/asm/clock.h

diff --git a/arch/blackfin/cpu/initcode.c b/arch/blackfin/cpu/initcode.c
index e8ea0ba..5c12726 100644
--- a/arch/blackfin/cpu/initcode.c
+++ b/arch/blackfin/cpu/initcode.c
 <at>  <at>  -194,15 +194,8  <at>  <at>  static inline void serial_init(void)
 #endif

 	if (BFIN_DEBUG_EARLY_SERIAL) {
-		int enabled = serial_early_enabled(uart_base);
-
 		serial_early_init(uart_base);
(Continue reading)


Gmane