Skip to contentSkip to conversation

Blackfin updates for v2011.09

PATCH Applied Mike Frysinger 2 participants 32 messages Jun 28, 2011 – Aug 2, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

cover Blackfin updates for v2011.09

Many of these have been posted already, but some have not. We've pulled some updates from the Linux port, added support for multiple serial devs at the same time, and random tweaks/improvements all over.

Harald Krapfenbauer (2):
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: update network settings
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: enable mmc_spi support

Mike Frysinger (16):
Blackfin: uart: move debug buffers into local bss
Blackfin: uart: add multiple serial support
Blackfin: adi boards: enable multi serial support by default
Blackfin: dont reset SWRST on newer bf526 parts
Blackfin: add init.elf helper code
Blackfin: uart: fix printf warning
Blackfin: post: setup default CONFIG_SYS_POST_WORD_ADDR
Blackfin: gpio: optimize free path a little
Blackfin: sync MMR read/write helpers with Linux
Blackfin: portmux: allow header to be included in assembly files
Blackfin: drop unused dma.h header from start code
Blackfin: adi boards: enable pretty flash progress output
Blackfin: split out async setup
Blackfin: serial: convert to bfin_{read,write} helpers
Blackfin: update anomaly lists to latest public info
Blackfin: adi boards: also set stderr to nc with helper

 Makefile                                       |    3 +-
 arch/blackfin/cpu/.gitignore                   |    3 +
 arch/blackfin/cpu/Makefile                     |    7 +-
 arch/blackfin/cpu/cpu.c                        |   16 +-
 arch/blackfin/cpu/gpio.c                       |    2 +
 arch/blackfin/cpu/init.S                       |    9 +
 arch/blackfin/cpu/init.lds.S                   |   25 +++
 arch/blackfin/cpu/initcode.c                   |   61 ++-----
 arch/blackfin/cpu/initcode.h                   |   71 +++++++
 arch/blackfin/cpu/reset.c                      |    4 +-
 arch/blackfin/cpu/serial.c                     |  234 ++++++++++++++++++------
 arch/blackfin/cpu/serial.h                     |   60 ++++--
 arch/blackfin/cpu/start.S                      |    1 -
 arch/blackfin/include/asm/blackfin_local.h     |   88 +++++-----
 arch/blackfin/include/asm/config.h             |    3 +
 arch/blackfin/include/asm/gpio.h               |    3 +-
 arch/blackfin/include/asm/mach-bf506/anomaly.h |   25 ++-
 arch/blackfin/include/asm/mach-bf518/anomaly.h |   28 ++-
 arch/blackfin/include/asm/mach-bf527/anomaly.h |   38 +++--
 arch/blackfin/include/asm/mach-bf533/anomaly.h |   23 ++-
 arch/blackfin/include/asm/mach-bf537/anomaly.h |   37 +++--
 arch/blackfin/include/asm/mach-bf538/anomaly.h |   42 +++--
 arch/blackfin/include/asm/mach-bf548/anomaly.h |  227 +++++++++++++----------
 arch/blackfin/include/asm/mach-bf561/anomaly.h |  136 ++++++++------
 arch/blackfin/include/asm/portmux.h            |    4 +
 arch/blackfin/lib/board.c                      |    4 +
 board/cm-bf537e/cm-bf537e.c                    |   34 +++--
 board/cm-bf537u/cm-bf537u.c                    |   39 ++--
 board/tcm-bf537/tcm-bf537.c                    |   34 +++--
 common/serial.c                                |    3 +
 include/configs/bf537-stamp.h                  |    1 -
 include/configs/bfin_adi_common.h              |   12 +-
 include/configs/cm-bf537e.h                    |   20 ++-
 include/configs/cm-bf537u.h                    |   24 ++-
 include/configs/tcm-bf537.h                    |   20 ++-
 include/serial.h                               |    9 +
 36 files changed, 896 insertions(+), 454 deletions(-)
 create mode 100644 arch/blackfin/cpu/init.S
 create mode 100644 arch/blackfin/cpu/init.lds.S
 create mode 100644 arch/blackfin/cpu/initcode.h
Signature · 1 line
1.7.5.3
#1 lore raw

PATCH 1/18 Blackfin: uart: move debug buffers into local bss

There's no need for these saved buffers to be global symbols, or in the data section. So mark them static to move them into the bss.

---
 arch/blackfin/cpu/serial.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
arch/blackfin/cpu/serial.c +3 -8
index 650202e..b15c945 100644
@@ -49,9 +49,9 @@ DECLARE_GLOBAL_DATA_PTR;
 #include "serial.h"
 
 #ifdef CONFIG_DEBUG_SERIAL
-uint16_t cached_lsr[256];
-uint16_t cached_rbr[256];
-size_t cache_count;
+static uint16_t cached_lsr[256];
+static uint16_t cached_rbr[256];
+static size_t cache_count;
 
 /* The LSR is read-to-clear on some parts, so we have to make sure status
  * bits aren't inadvertently lost when doing various tests.  This also
@@ -112,11 +112,6 @@ int serial_init(void)
 	serial_initialize();
 	serial_setbrg();
 	uart_lsr_clear();
-#ifdef CONFIG_DEBUG_SERIAL
-	cache_count = 0;
-	memset(cached_lsr, 0x00, sizeof(cached_lsr));
-	memset(cached_rbr, 0x00, sizeof(cached_rbr));
-#endif
 	return 0;
 }
 
Signature · 1 line
1.7.5.3
#2 lore raw

PATCH 2/18 Blackfin: uart: add multiple serial support

In reply to Mike Frysinger

This brings CONFIG_SERIAL_MULTI support to the Blackfin on-chip UARTs. Ends up adding only ~512bytes per additional UART.

---
 arch/blackfin/cpu/initcode.c |   12 ++-
 arch/blackfin/cpu/serial.c   |  205 +++++++++++++++++++++++++++++++++---------
 arch/blackfin/cpu/serial.h   |   44 +++++++---
 arch/blackfin/lib/board.c    |    4 +
 common/serial.c              |    3 +
 include/serial.h             |    9 ++
 6 files changed, 222 insertions(+), 55 deletions(-)
arch/blackfin/cpu/initcode.c +9 -3
index 750add0..61dc5ab 100644
@@ -24,6 +24,8 @@
 __attribute__((always_inline))
 static inline void serial_init(void)
 {
+	uint32_t uart_base = UART_DLL;
+
 #ifdef __ADSPBF54x__
 # ifdef BFIN_BOOT_UART_USE_RTS
 #  define BFIN_UART_USE_RTS 1
@@ -65,13 +67,13 @@ static inline void serial_init(void)
 
 	if (BFIN_DEBUG_EARLY_SERIAL) {
 		int ucen = bfin_read16(&pUART->gctl) & UCEN;
-		serial_early_init();
+		serial_early_init(uart_base);
 
 		/* If the UART is off, that means we need to program
 		 * the baud rate ourselves initially.
 		 */
 		if (ucen != UCEN)
-			serial_early_set_baud(CONFIG_BAUDRATE);
+			serial_early_set_baud(uart_base, CONFIG_BAUDRATE);
 	}
 }
 
@@ -79,6 +81,8 @@ __attribute__((always_inline))
 static inline void serial_deinit(void)
 {
 #ifdef __ADSPBF54x__
+	uint32_t uart_base = UART_DLL;
+
 	if (BFIN_UART_USE_RTS && CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART) {
 		/* clear forced RTS rather than relying on auto RTS */
 		bfin_write16(&pUART->mcr, bfin_read16(&pUART->mcr) & ~FCPOL);
@@ -89,6 +93,8 @@ static inline void serial_deinit(void)
 __attribute__((always_inline))
 static inline void serial_putc(char c)
 {
+	uint32_t uart_base = UART_DLL;
+
 	if (!BFIN_DEBUG_EARLY_SERIAL)
 		return;
 
@@ -519,7 +525,7 @@ update_serial_clocks(ADI_BOOT_DATA *bs, uint sdivB, uint divB, uint vcoB)
 		unsigned int quotient;
 		for (quotient = 0; dividend > 0; ++quotient)
 			dividend -= divisor;
-		serial_early_put_div(quotient - ANOMALY_05000230);
+		serial_early_put_div(UART_DLL, quotient - ANOMALY_05000230);
 		serial_putc('c');
 	}
 
arch/blackfin/cpu/serial.c +164 -41

276 lines not on this page · raw message

arch/blackfin/cpu/serial.h +33 -11

90 lines not on this page · raw message

arch/blackfin/lib/board.c +4 -0
index 362b8c4..e00050c 100644
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <command.h>
 #include <stdio_dev.h>
+#include <serial.h>
 #include <environment.h>
 #include <malloc.h>
 #include <mmc.h>
@@ -265,6 +266,9 @@ void board_init_f(ulong bootflag)
 	init_baudrate();
 	serial_early_puts("Serial init\n");
 	serial_init();
+#ifdef CONFIG_SERIAL_MULTI
+	serial_initialize();
+#endif
 	serial_early_puts("Console init flash\n");
 	console_init_f();
 	serial_early_puts("End of early debugging\n");
common/serial.c +3 -0
index 8ebf9a5..7a69fc1 100644
@@ -173,6 +173,9 @@ void serial_initialize (void)
 	serial_register(&serial6_device);
 #endif
 #endif
+#if defined(CONFIG_SYS_BFIN_UART)
+	serial_register_bfin_uart();
+#endif
 	serial_assign (default_serial_console ()->name);
 }
 
include/serial.h +9 -0
index f21d961..4aa1cdc 100644
@@ -71,6 +71,15 @@ extern struct serial_device serial_ffuart_device;
 extern struct serial_device serial_btuart_device;
 extern struct serial_device serial_stuart_device;
 
+#if defined(CONFIG_SYS_BFIN_UART)
+extern void serial_register_bfin_uart(void);
+extern struct serial_device bfin_serial0_device;
+extern struct serial_device bfin_serial1_device;
+extern struct serial_device bfin_serial2_device;
+extern struct serial_device bfin_serial3_device;
+#endif
+
+extern void serial_register(struct serial_device *);
 extern void serial_initialize(void);
 extern void serial_stdio_init(void);
 extern int serial_assign(char * name);
Signature · 1 line
1.7.5.3
#3 lore raw

PATCH 3/18 Blackfin: adi boards: enable multi serial support by default

In reply to Mike Frysinger

Since this only adds less than 3KiB, enable for all ADI boards.

---
 include/configs/bfin_adi_common.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
include/configs/bfin_adi_common.h +4 -0
index 3312681..5d78403 100644
@@ -112,6 +112,10 @@
 #ifndef CONFIG_BAUDRATE
 # define CONFIG_BAUDRATE	57600
 #endif
+#ifndef CONFIG_DEBUG_EARLY_SERIAL
+# define CONFIG_SERIAL_MULTI
+# define CONFIG_SYS_BFIN_UART
+#endif
 
 /*
  * Debug Settings
Signature · 1 line
1.7.5.3
#4 lore raw

PATCH 4/18 Blackfin: dont reset SWRST on newer bf526 parts

In reply to Mike Frysinger

The bug in the BF526 rom when doing a software reset exists only in older silicon versions, so don't clear SWRST on newer parts.

---
 arch/blackfin/cpu/reset.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/blackfin/cpu/reset.c +3 -1
index e23dcc7..5567cd0 100644
@@ -51,7 +51,9 @@ static void bfin_reset(void)
 
 	/* The BF526 ROM will crash during reset */
 #if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__)
-	bfin_read_SWRST();
+	/* Seems to be fixed with newer parts though ... */
+	if (__SILICON_REVISION__ < 2 && bfin_revid() < 2)
+		bfin_read_SWRST();
 #endif
 
 	/* Wait for the SWRST write to complete.  Cannot rely on SSYNC
Signature · 1 line
1.7.5.3
#5 lore raw

PATCH v2 1/1 Blackfin: dont reset SWRST on newer bf526 parts

The bug in the BF526 rom when doing a software reset exists only in older silicon versions, so don't clear SWRST on newer parts.

---
v2
- skip 0.1 silicon as well since it seems to work

 arch/blackfin/cpu/reset.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/blackfin/cpu/reset.c +3 -1
index e23dcc7..ff39035 100644
@@ -51,7 +51,9 @@ static void bfin_reset(void)
 
 	/* The BF526 ROM will crash during reset */
 #if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__)
-	bfin_read_SWRST();
+	/* Seems to be fixed with newer parts though ... */
+	if (__SILICON_REVISION__ < 1 && bfin_revid() < 1)
+		bfin_read_SWRST();
 #endif
 
 	/* Wait for the SWRST write to complete.  Cannot rely on SSYNC
Signature · 1 line
1.7.6
#6 lore raw

PATCH 5/18 Blackfin: add init.elf helper code

In reply to Mike Frysinger

This creates a standalone ELF that executes just the Blackfin initcode. This is useful for people who want to program the low level aspects of the CPU (memory/clocks/etc...) and can easily be used with JTAG for quick booting while developing.

---
 Makefile                     |    3 ++-
 arch/blackfin/cpu/.gitignore |    3 +++
 arch/blackfin/cpu/Makefile   |    7 ++++++-
 arch/blackfin/cpu/init.S     |    9 +++++++++
 arch/blackfin/cpu/init.lds.S |   25 +++++++++++++++++++++++++
 5 files changed, 45 insertions(+), 2 deletions(-)
 create mode 100644 arch/blackfin/cpu/init.S
 create mode 100644 arch/blackfin/cpu/init.lds.S
Makefile +2 -1
index 3454db6..8dfb174 100644
@@ -1089,7 +1089,8 @@ clean:
 	       $(obj)board/voiceblue/eeprom 				  \
 	       $(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds  \
 	       $(obj)u-boot.lds						  \
-	       $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs]
+	       $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs]	  \
+	       $(obj)arch/blackfin/cpu/init.{lds,elf}
 	@rm -f $(obj)include/bmp_logo.h
 	@rm -f $(obj)lib/asm-offsets.s
 	@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,System.map}
arch/blackfin/cpu/.gitignore +3 -0
index 0ec9d56..ba986d8 100644
@@ -1 +1,4 @@
 bootrom-asm-offsets.[chs]
+
+init.lds
+init.elf
arch/blackfin/cpu/Makefile +6 -1
index df10f1b..5deaa9e 100644
@@ -13,7 +13,7 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(CPU).o
 
-EXTRA    :=
+EXTRA    := init.elf
 CEXTRA   := initcode.o
 SEXTRA   := start.o
 SOBJS    := interrupt.o cache.o
@@ -61,6 +61,11 @@ ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
 	fi
 endif
 
+$(obj)init.lds: init.lds.S
+	$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P $^ -o $@
+$(obj)init.elf: $(obj)init.lds $(obj)init.o $(obj)initcode.o
+	$(LD) $(LDFLAGS) -T $^ -o $@
+
 #########################################################################
 
 # defines $(obj).depend target
arch/blackfin/cpu/init.S new file +9 -0
new file mode 100644
index 0000000..f48c113
@@ -0,0 +1,9 @@
+#include <asm/blackfin.h>
+ENTRY(_start)
+	sp.l = LO(L1_SRAM_SCRATCH_END - 20);
+	sp.h = HI(L1_SRAM_SCRATCH_END - 20);
+	call _initcode;
+1:
+	emuexcpt;
+	jump 1b;
+END(_start)
arch/blackfin/cpu/init.lds.S new file +25 -0
new file mode 100644
index 0000000..602e7c8
@@ -0,0 +1,25 @@
+/*
+ * linker script for simple init.elf
+ *
+ * Copyright (c) 2005-2011 Analog Device Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include <config.h>
+#include <asm/blackfin.h>
+#undef ALIGN
+#undef ENTRY
+
+OUTPUT_ARCH(bfin)
+
+MEMORY
+{
+	l1_code : ORIGIN = L1_INST_SRAM, LENGTH = L1_INST_SRAM_SIZE
+}
+
+ENTRY(_start)
+SECTIONS
+{
+	.text.l1 : { *(.text .text.*) } >l1_code
+}
Signature · 1 line
1.7.5.3
#7 lore raw

PATCH 6/18 Blackfin: uart: fix printf warning

In reply to Mike Frysinger

The code uses %i to printf a size_t when it should use %zu, otherwise we get a warning from gcc about it.

---
 arch/blackfin/cpu/serial.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/blackfin/cpu/serial.c +1 -1
index 0252220..1124ffd 100644
@@ -142,7 +142,7 @@ static int uart_getc(uint32_t uart_base)
 		printf("\tDLL=0x%x DLH=0x%x\n", dll, dlh);
 		do {
 			--cache_count;
-			printf("\t%3i: RBR=0x%02x LSR=0x%02x\n", cache_count,
+			printf("\t%3zu: RBR=0x%02x LSR=0x%02x\n", cache_count,
 				cached_rbr[cache_count], cached_lsr[cache_count]);
 		} while (cache_count > 0);
 		return -1;
Signature · 1 line
1.7.5.3
#8 lore raw

PATCH 7/18 Blackfin: post: setup default CONFIG_SYS_POST_WORD_ADDR

In reply to Mike Frysinger

Set the default post word location to an L1 data location for all Blackfin parts so things "just work" for most people.

---
 arch/blackfin/include/asm/config.h |    3 +++
 include/configs/bf537-stamp.h      |    1 -
 2 files changed, 3 insertions(+), 1 deletions(-)
arch/blackfin/include/asm/config.h +3 -0
index 89814cd..bc3c252 100644
@@ -121,6 +121,9 @@
 #ifndef CONFIG_SYS_MEMTEST_END
 # define CONFIG_SYS_MEMTEST_END (CONFIG_STACKBASE - 8192 + 4)
 #endif
+#ifndef CONFIG_SYS_POST_WORD_ADDR
+# define CONFIG_SYS_POST_WORD_ADDR (L1_DATA_B_SRAM + L1_DATA_B_SRAM_SIZE - 4)
+#endif
 
 /* Check to make sure everything fits in external RAM */
 #if CONFIG_SYS_MAX_RAM_SIZE && \
include/configs/bf537-stamp.h +0 -1
index c31e914..da14a4f 100644
@@ -260,7 +260,6 @@
 #define FLASH_START_POST_BLOCK	11	/* Should > = 11 */
 #define FLASH_END_POST_BLOCK	71	/* Should < = 71 */
 #endif
-#define CONFIG_SYS_POST_WORD_ADDR	0xFF903FFC
 
 /* These are for board tests */
 #if 0
Signature · 1 line
1.7.5.3
#9 lore raw

PATCH 8/18 Blackfin: gpio: optimize free path a little

In reply to Mike Frysinger

When we aren't doing resource tracking, the gpio_free() function is a stub that simply returns, so pull this logic up a level and make it an inline stub in the header. Now we don't have to waste time at any of the call sites.

---
 arch/blackfin/cpu/gpio.c         |    2 ++
 arch/blackfin/include/asm/gpio.h |    3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)
arch/blackfin/cpu/gpio.c +2 -0
index cb96721..5674d42 100644
@@ -665,6 +665,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
 	return 0;
 }
 
+#ifdef CONFIG_BFIN_GPIO_TRACK
 void bfin_gpio_free(unsigned gpio)
 {
 	if (check_gpio(gpio) < 0)
@@ -679,6 +680,7 @@ void bfin_gpio_free(unsigned gpio)
 
 	set_label(gpio, "free");
 }
+#endif
 
 #ifdef BFIN_SPECIAL_GPIO_BANKS
 DECLARE_RESERVED_MAP(special_gpio, gpio_bank(MAX_RESOURCES));
arch/blackfin/include/asm/gpio.h +2 -1
index 9c0e5d1..224688f 100644
@@ -142,8 +142,10 @@ struct gpio_port_t {
 
 #ifdef CONFIG_BFIN_GPIO_TRACK
 void bfin_gpio_labels(void);
+void bfin_gpio_free(unsigned gpio);
 #else
 #define bfin_gpio_labels()
+#define bfin_gpio_free(gpio)
 #define bfin_gpio_request(gpio, label) bfin_gpio_request(gpio)
 #define bfin_special_gpio_request(gpio, label) bfin_special_gpio_request(gpio)
 #endif
@@ -154,7 +156,6 @@ int bfin_special_gpio_request(unsigned gpio, const char *label);
 #endif
 
 int bfin_gpio_request(unsigned gpio, const char *label);
-void bfin_gpio_free(unsigned gpio);
 int bfin_gpio_direction_input(unsigned gpio);
 int bfin_gpio_direction_output(unsigned gpio, int value);
 int bfin_gpio_get_value(unsigned gpio);
Signature · 1 line
1.7.5.3
#10 lore raw

PATCH 9/18 Blackfin: sync MMR read/write helpers with Linux

In reply to Mike Frysinger
---
 arch/blackfin/include/asm/blackfin_local.h |   88 +++++++++++++--------------
 1 files changed, 42 insertions(+), 46 deletions(-)
arch/blackfin/include/asm/blackfin_local.h +42 -46
index 48f793a..27034d3 100644
@@ -93,65 +93,61 @@ extern void blackfin_dcache_flush_invalidate_range(const void *, const void *);
 # define NOP_PAD_ANOMALY_05000198
 #endif
 
-#define bfin_read8(addr) ({ \
-	uint8_t __v; \
+#define _bfin_readX(addr, size, asm_size, asm_ext) ({ \
+	u32 __v; \
 	__asm__ __volatile__( \
 		NOP_PAD_ANOMALY_05000198 \
-		"%0 = b[%1] (z);" \
+		"%0 = " #asm_size "[%1]" #asm_ext ";" \
 		: "=d" (__v) \
 		: "a" (addr) \
 	); \
 	__v; })
-
-#define bfin_read16(addr) ({ \
-	uint16_t __v; \
-	__asm__ __volatile__( \
-		NOP_PAD_ANOMALY_05000198 \
-		"%0 = w[%1] (z);" \
-		: "=d" (__v) \
-		: "a" (addr) \
-	); \
-	__v; })
-
-#define bfin_read32(addr) ({ \
-	uint32_t __v; \
+#define _bfin_writeX(addr, val, size, asm_size) \
 	__asm__ __volatile__( \
 		NOP_PAD_ANOMALY_05000198 \
-		"%0 = [%1];" \
-		: "=d" (__v) \
-		: "a" (addr) \
-	); \
-	__v; })
-
-#define bfin_readPTR(addr) bfin_read32(addr)
-
-#define bfin_write8(addr, val) \
-	__asm__ __volatile__( \
-		NOP_PAD_ANOMALY_05000198 \
-		"b[%0] = %1;" \
-		: \
-		: "a" (addr), "d" (val) \
-		: "memory" \
-	)
-
-#define bfin_write16(addr, val) \
-	__asm__ __volatile__( \
-		NOP_PAD_ANOMALY_05000198 \
-		"w[%0] = %1;" \
+		#asm_size "[%0] = %1;" \
 		: \
-		: "a" (addr), "d" (val) \
+		: "a" (addr), "d" ((u##size)(val)) \
 		: "memory" \
 	)
 
-#define bfin_write32(addr, val) \
-	__asm__ __volatile__( \
-		NOP_PAD_ANOMALY_05000198 \
-		"[%0] = %1;" \
-		: \
-		: "a" (addr), "d" (val) \
-		: "memory" \
-	)
+#define bfin_read8(addr)  _bfin_readX(addr,  8, b, (z))
+#define bfin_read16(addr) _bfin_readX(addr, 16, w, (z))
+#define bfin_read32(addr) _bfin_readX(addr, 32,  ,    )
+#define bfin_write8(addr, val)  _bfin_writeX(addr, val,  8, b)
+#define bfin_write16(addr, val) _bfin_writeX(addr, val, 16, w)
+#define bfin_write32(addr, val) _bfin_writeX(addr, val, 32,  )
+
+#define bfin_read(addr) \
+({ \
+	sizeof(*(addr)) == 1 ? bfin_read8(addr)  : \
+	sizeof(*(addr)) == 2 ? bfin_read16(addr) : \
+	sizeof(*(addr)) == 4 ? bfin_read32(addr) : \
+	({ BUG(); 0; }); \
+})
+#define bfin_write(addr, val) \
+do { \
+	switch (sizeof(*(addr))) { \
+	case 1: bfin_write8(addr, val);  break; \
+	case 2: bfin_write16(addr, val); break; \
+	case 4: bfin_write32(addr, val); break; \
+	default: BUG(); \
+	} \
+} while (0)
+
+#define bfin_write_or(addr, bits) \
+do { \
+	typeof(addr) __addr = (addr); \
+	bfin_write(__addr, bfin_read(__addr) | (bits)); \
+} while (0)
+
+#define bfin_write_and(addr, bits) \
+do { \
+	typeof(addr) __addr = (addr); \
+	bfin_write(__addr, bfin_read(__addr) & (bits)); \
+} while (0)
 
+#define bfin_readPTR(addr) bfin_read32(addr)
 #define bfin_writePTR(addr, val) bfin_write32(addr, val)
 
 /* SSYNC implementation for C file */
Signature · 1 line
1.7.5.3
#11 lore raw

PATCH 10/18 Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: update network settings

In reply to Mike Frysinger

From: Harald Krapfenbauer <[email protected]>

These boards can have an addon card plugged onto them, so enable support for it.

---
 board/cm-bf537e/cm-bf537e.c |   34 ++++++++++++++++++++++------------
 board/cm-bf537u/cm-bf537u.c |   39 +++++++++++++++++++++------------------
 board/tcm-bf537/tcm-bf537.c |   34 ++++++++++++++++++++++------------
 include/configs/cm-bf537e.h |    3 +++
 include/configs/cm-bf537u.h |    8 ++++----
 include/configs/tcm-bf537.h |    4 +++-
 6 files changed, 75 insertions(+), 47 deletions(-)
board/cm-bf537e/cm-bf537e.c +22 -12
index 1e350dc..38dbc6e 100644
@@ -24,27 +24,37 @@ int checkboard(void)
 	return 0;
 }
 
-#ifdef CONFIG_BFIN_MAC
-static void board_init_enetaddr(uchar *mac_addr)
+static void board_init_enetaddr(char *var)
 {
-	puts("Warning: Generating 'random' MAC address\n");
-	bfin_gen_rand_mac(mac_addr);
-	eth_setenv_enetaddr("ethaddr", mac_addr);
+#ifdef CONFIG_NET_MULTI
+	uchar enetaddr[6];
+
+	if (eth_getenv_enetaddr(var, enetaddr))
+		return;
+
+	printf("Warning: %s: generating 'random' MAC address\n", var);
+	bfin_gen_rand_mac(enetaddr);
+	eth_setenv_enetaddr(var, enetaddr);
+#endif
 }
 
+#ifndef CONFIG_BFIN_MAC
+# define bfin_EMAC_initialize(x) 1
+#endif
+#ifndef CONFIG_SMC911X
+# define smc911x_initialize(n, x) 1
+#endif
 int board_eth_init(bd_t *bis)
 {
-	return bfin_EMAC_initialize(bis);
+	/* return ok if at least 1 eth device works */
+	return bfin_EMAC_initialize(bis) &
+	       smc911x_initialize(0, CONFIG_SMC911X_BASE);
 }
-#endif
 
 int misc_init_r(void)
 {
-#ifdef CONFIG_BFIN_MAC
-	uchar enetaddr[6];
-	if (!eth_getenv_enetaddr("ethaddr", enetaddr))
-		board_init_enetaddr(enetaddr);
-#endif
+	board_init_enetaddr("ethaddr");
+	board_init_enetaddr("eth1addr");
 
 	gpio_cfi_flash_init();
 
board/cm-bf537u/cm-bf537u.c +21 -18
index 4b7e864..a62ddd6 100644
@@ -24,34 +24,37 @@ int checkboard(void)
 	return 0;
 }
 
-#ifdef CONFIG_BFIN_MAC
-static void board_init_enetaddr(uchar *mac_addr)
+static void board_init_enetaddr(char *var)
 {
-	puts("Warning: Generating 'random' MAC address\n");
-	bfin_gen_rand_mac(mac_addr);
-	eth_setenv_enetaddr("ethaddr", mac_addr);
-}
+#ifdef CONFIG_NET_MULTI
+	uchar enetaddr[6];
 
-int board_eth_init(bd_t *bis)
-{
-	return bfin_EMAC_initialize(bis);
-}
+	if (eth_getenv_enetaddr(var, enetaddr))
+		return;
+
+	printf("Warning: %s: generating 'random' MAC address\n", var);
+	bfin_gen_rand_mac(enetaddr);
+	eth_setenv_enetaddr(var, enetaddr);
 #endif
+}
 
-#ifdef CONFIG_SMC911X
+#ifndef CONFIG_BFIN_MAC
+# define bfin_EMAC_initialize(x) 1
+#endif
+#ifndef CONFIG_SMC911X
+# define smc911x_initialize(n, x) 1
+#endif
 int board_eth_init(bd_t *bis)
 {
-	return smc911x_initialize(0, CONFIG_SMC911X_BASE);
+	/* return ok if at least 1 eth device works */
+	return bfin_EMAC_initialize(bis) &
+	       smc911x_initialize(0, CONFIG_SMC911X_BASE);
 }
-#endif
 
 int misc_init_r(void)
 {
-#ifdef CONFIG_BFIN_MAC
-	uchar enetaddr[6];
-	if (!eth_getenv_enetaddr("ethaddr", enetaddr))
-		board_init_enetaddr(enetaddr);
-#endif
+	board_init_enetaddr("ethaddr");
+	board_init_enetaddr("eth1addr");
 
 	gpio_cfi_flash_init();
 
board/tcm-bf537/tcm-bf537.c +22 -12
index 04d6bdb..004e0d9 100644
@@ -24,27 +24,37 @@ int checkboard(void)
 	return 0;
 }
 
-#ifdef CONFIG_BFIN_MAC
-static void board_init_enetaddr(uchar *mac_addr)
+static void board_init_enetaddr(char *var)
 {
-	puts("Warning: Generating 'random' MAC address\n");
-	bfin_gen_rand_mac(mac_addr);
-	eth_setenv_enetaddr("ethaddr", mac_addr);
+#ifdef CONFIG_NET_MULTI
+	uchar enetaddr[6];
+
+	if (eth_getenv_enetaddr(var, enetaddr))
+		return;
+
+	printf("Warning: %s: generating 'random' MAC address\n", var);
+	bfin_gen_rand_mac(enetaddr);
+	eth_setenv_enetaddr(var, enetaddr);
+#endif
 }
 
+#ifndef CONFIG_BFIN_MAC
+# define bfin_EMAC_initialize(x) 1
+#endif
+#ifndef CONFIG_SMC911X
+# define smc911x_initialize(n, x) 1
+#endif
 int board_eth_init(bd_t *bis)
 {
-	return bfin_EMAC_initialize(bis);
+	/* return ok if at least 1 eth device works */
+	return bfin_EMAC_initialize(bis) &
+	       smc911x_initialize(0, CONFIG_SMC911X_BASE);
 }
-#endif
 
 int misc_init_r(void)
 {
-#ifdef CONFIG_BFIN_MAC
-	uchar enetaddr[6];
-	if (!eth_getenv_enetaddr("ethaddr", enetaddr))
-		board_init_enetaddr(enetaddr);
-#endif
+	board_init_enetaddr("ethaddr");
+	board_init_enetaddr("eth1addr");
 
 	gpio_cfi_flash_init();
 
include/configs/cm-bf537e.h +3 -0
index 04bca6c..3ee7738 100644
@@ -65,6 +65,9 @@
 #ifndef __ADSPBF534__
 #define ADI_CMDS_NETWORK	1
 #define CONFIG_BFIN_MAC
+#define CONFIG_SMC911X		1
+#define CONFIG_SMC911X_BASE	0x20308000
+#define CONFIG_SMC911X_16_BIT
 #define CONFIG_NETCONSOLE	1
 #define CONFIG_NET_MULTI	1
 #endif
include/configs/cm-bf537u.h +4 -4
index af2fe89..c791926 100644
@@ -63,11 +63,11 @@
  */
 #ifndef __ADSPBF534__
 #define ADI_CMDS_NETWORK	1
-#define CONFIG_NET_MULTI
-/* The next 3 lines are for use with SMSC on EXT-BF5xx-USB-ETH2 */
-#define CONFIG_SMC911X	1
-#define CONFIG_SMC911X_BASE	0x24000000
+#define CONFIG_SMC911X		1
+#define CONFIG_SMC911X_BASE	0x20308000
 #define CONFIG_SMC911X_16_BIT
+#define CONFIG_NETCONSOLE	1
+#define CONFIG_NET_MULTI	1
 #endif
 #define CONFIG_HOSTNAME		cm-bf537u
 /* Uncomment next line to use fixed MAC address */
include/configs/tcm-bf537.h +3 -1
index 9a6100e..f2c5b98 100644
@@ -62,10 +62,12 @@
 /*
  * Network Settings
  */
-/* TCM-BF537E has no PHY on it, but EXT-BF5xx-USB/Ethernet board has */
 #ifndef __ADSPBF534__
 #define ADI_CMDS_NETWORK	1
 #define CONFIG_BFIN_MAC
+#define CONFIG_SMC911X		1
+#define CONFIG_SMC911X_BASE	0x20308000
+#define CONFIG_SMC911X_16_BIT
 #define CONFIG_NETCONSOLE	1
 #define CONFIG_NET_MULTI	1
 #endif
Signature · 1 line
1.7.5.3
#12 lore raw

PATCH 11/18 Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: enable mmc_spi support

In reply to Mike Frysinger

From: Harald Krapfenbauer <[email protected]>

These boards have an mmc/sd slot on them connected over SPI, so enable the driver.

---
 include/configs/cm-bf537e.h |   17 ++++++++++++++++-
 include/configs/cm-bf537u.h |   16 +++++++++++++++-
 include/configs/tcm-bf537.h |   16 +++++++++++++++-
 3 files changed, 46 insertions(+), 3 deletions(-)
include/configs/cm-bf537e.h +16 -1
index 3ee7738..9649e18 100644
@@ -55,7 +55,7 @@
 #define CONFIG_EBIU_AMBCTL0_VAL	(B1WAT_7 | B1RAT_11 | B1HT_2 | B1ST_3 | B0WAT_7 | B0RAT_11 | B0HT_2 | B0ST_3)
 #define CONFIG_EBIU_AMBCTL1_VAL	(B3WAT_7 | B3RAT_11 | B3HT_2 | B3ST_3 | B2WAT_7 | B2RAT_11 | B2HT_2 | B2ST_3)
 
-#define CONFIG_SYS_MONITOR_LEN	(256 * 1024)
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024)
 #define CONFIG_SYS_MALLOC_LEN	(128 * 1024)
 
 
@@ -89,6 +89,13 @@
 
 
 /*
+ * SPI Settings
+ */
+#define CONFIG_BFIN_SPI
+#define CONFIG_ENV_SPI_MAX_HZ	30000000
+
+
+/*
  * Env Storage Settings
  */
 #define CONFIG_ENV_IS_IN_FLASH	1
@@ -121,6 +128,14 @@
 
 
 /*
+ * SPI_MMC Settings
+ */
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC_SPI
+
+
+/*
  * Misc Settings
  */
 #define CONFIG_BAUDRATE		115200
include/configs/cm-bf537u.h +15 -1
index c791926..84846ef 100644
@@ -54,7 +54,7 @@
 #define CONFIG_EBIU_AMBCTL0_VAL	(B1WAT_7 | B1RAT_11 | B1HT_2 | B1ST_3 | B0WAT_7 | B0RAT_11 | B0HT_2 | B0ST_3)
 #define CONFIG_EBIU_AMBCTL1_VAL	(B3WAT_7 | B3RAT_11 | B3HT_2 | B3ST_3 | B2WAT_7 | B2RAT_11 | B2HT_2 | B2ST_3)
 
-#define CONFIG_SYS_MONITOR_LEN	(256 * 1024)
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024)
 #define CONFIG_SYS_MALLOC_LEN	(128 * 1024)
 
 
@@ -87,6 +87,13 @@
 
 
 /*
+ * SPI Settings
+ */
+#define CONFIG_BFIN_SPI
+#define CONFIG_ENV_SPI_MAX_HZ	30000000
+
+
+/*
  * Env Storage Settings
  */
 #define CONFIG_ENV_IS_IN_FLASH	1
@@ -119,6 +126,13 @@
 
 
 /*
+ * SPI_MMC Settings
+ */
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC_SPI
+
+/*
  * Misc Settings
  */
 #define CONFIG_BAUDRATE		115200
include/configs/tcm-bf537.h +15 -1
index f2c5b98..2375fc5 100644
@@ -55,7 +55,7 @@
 #define CONFIG_EBIU_AMBCTL0_VAL	(B1WAT_7 | B1RAT_11 | B1HT_2 | B1ST_3 | B0WAT_7 | B0RAT_11 | B0HT_2 | B0ST_3)
 #define CONFIG_EBIU_AMBCTL1_VAL	(B3WAT_7 | B3RAT_11 | B3HT_2 | B3ST_3 | B2WAT_7 | B2RAT_11 | B2HT_2 | B2ST_3)
 
-#define CONFIG_SYS_MONITOR_LEN	(256 * 1024)
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024)
 #define CONFIG_SYS_MALLOC_LEN	(128 * 1024)
 
 
@@ -89,6 +89,13 @@
 
 
 /*
+ * SPI Settings
+ */
+#define CONFIG_BFIN_SPI
+#define CONFIG_ENV_SPI_MAX_HZ	30000000
+
+
+/*
  * Env Storage Settings
  */
 #define CONFIG_ENV_IS_IN_FLASH	1
@@ -121,6 +128,13 @@
 
 
 /*
+ * SPI_MMC Settings
+ */
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC_SPI
+
+/*
  * Misc Settings
  */
 #define CONFIG_BAUDRATE		115200
Signature · 1 line
1.7.5.3
#13 lore raw

PATCH 12/18 Blackfin: portmux: allow header to be included in assembly files

In reply to Mike Frysinger
---
 arch/blackfin/include/asm/portmux.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/blackfin/include/asm/portmux.h +4 -0
index b17207f..300ef44 100644
@@ -22,11 +22,15 @@
 #define peripheral_request_list(per, label) peripheral_request_list(per)
 #endif
 
+#ifndef __ASSEMBLY__
+
 int peripheral_request(unsigned short per, const char *label);
 void peripheral_free(unsigned short per);
 int peripheral_request_list(const unsigned short per[], const char *label);
 void peripheral_free_list(const unsigned short per[]);
 
+#endif
+
 #include <asm/blackfin.h>
 
 #ifndef P_SPORT2_TFS
Signature · 1 line
1.7.5.3
#14 lore raw

PATCH 13/18 Blackfin: drop unused dma.h header from start code

In reply to Mike Frysinger
---
 arch/blackfin/cpu/start.S |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/blackfin/cpu/start.S +0 -1
index 15ecb1e..90b4d1a 100644
@@ -33,7 +33,6 @@
 #include <config.h>
 #include <asm/blackfin.h>
 #include <asm/mach-common/bits/core.h>
-#include <asm/mach-common/bits/dma.h>
 #include <asm/mach-common/bits/pll.h>
 
 #include "serial.h"
Signature · 1 line
1.7.5.3
#15 lore raw

PATCH 14/18 Blackfin: adi boards: enable pretty flash progress output

In reply to Mike Frysinger

For only ~150 bytes increase in size, we can get a nice flash progress indicator rather than just the boring dots (which don't tell too much about overall progress). So enable it for all ADI boards.

---
 include/configs/bfin_adi_common.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
include/configs/bfin_adi_common.h +5 -0
index 5d78403..80f8a14 100644
@@ -277,6 +277,11 @@
 #endif
 
 /*
+ * Flash Settings
+ */
+#define CONFIG_FLASH_SHOW_PROGRESS 45
+
+/*
  * SPI Settings
  */
 #ifdef CONFIG_SPI_FLASH_ALL
Signature · 1 line
1.7.5.3
#16 lore raw

PATCH 15/18 Blackfin: split out async setup

In reply to Mike Frysinger

We really only need to tweak the async banks in the initcode if the processor is booting out of it, otherwise we can wait until later on in the CPU booting setup.

This also makes testing in the sim and early bring up over JTAG work much smoother when the initcode gets bypassed.

---
 arch/blackfin/cpu/cpu.c      |   16 ++++++---
 arch/blackfin/cpu/initcode.c |   47 ++--------------------------
 arch/blackfin/cpu/initcode.h |   71 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 84 insertions(+), 50 deletions(-)
 create mode 100644 arch/blackfin/cpu/initcode.h
arch/blackfin/cpu/cpu.c +10 -6
index 18dbdf7..6a0bcca 100644
@@ -19,6 +19,7 @@
 
 #include "cpu.h"
 #include "serial.h"
+#include "initcode.h"
 
 ulong bfin_poweron_retx;
 
@@ -44,13 +45,16 @@ void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
 		extern char _sdata_l1[], _data_l1_lma[], _data_l1_len[];
 		memcpy(&_sdata_l1, &_data_l1_lma, (unsigned long)_data_l1_len);
 	}
-#if defined(__ADSPBF537__) || defined(__ADSPBF536__) || defined(__ADSPBF534__)
-	/* The BF537 bootrom will reset the EBIU_AMGCTL register on us
-	 * after it has finished loading the LDR.  So configure it again.
+
+	/*
+	 * Make sure our async settings are committed.  Some bootroms
+	 * (like the BF537) will reset some registers on us after it
+	 * has finished loading the LDR.  Or if we're booting over
+	 * JTAG, the initcode never got a chance to run.  Or if we
+	 * aren't booting from parallel flash, the initcode skipped
+	 * this step completely.
 	 */
-	else
-		bfin_write_EBIU_AMGCTL(CONFIG_EBIU_AMGCTL_VAL);
-#endif
+	program_async_controller(NULL);
 
 	/* Save RETX so we can pass it while booting Linux */
 	bfin_poweron_retx = bootflag;
arch/blackfin/cpu/initcode.c +3 -44

71 lines not on this page · raw message

arch/blackfin/cpu/initcode.h new file +71 -0

71 lines not on this page · raw message

Signature · 1 line
1.7.5.3
#17 lore raw

PATCH 16/18 Blackfin: serial: convert to bfin_{read, write} helpers

In reply to Mike Frysinger

Since the serial struct declares the sizes for us, no need to hardcode them in the accessor functions. Let the bfin_{read,write} helpers do it for us.

---
 arch/blackfin/cpu/initcode.c |    2 ++
 arch/blackfin/cpu/serial.c   |   16 ++++++++--------
 arch/blackfin/cpu/serial.h   |   18 +++++++++---------
 3 files changed, 19 insertions(+), 17 deletions(-)
arch/blackfin/cpu/initcode.c +2 -0
index 917b7f9..fb3a101 100644
@@ -19,6 +19,8 @@
 #include <asm/mach-common/bits/pll.h>
 #include <asm/mach-common/bits/uart.h>
 
+#define BUG() while (1) { asm volatile("emuexcpt;"); }
+
 #include "serial.h"
 
 __attribute__((always_inline))
arch/blackfin/cpu/serial.c +8 -8
index 1124ffd..030160f 100644
@@ -63,7 +63,7 @@ static size_t cache_count;
 static uint16_t uart_lsr_save;
 static uint16_t uart_lsr_read(uint32_t uart_base)
 {
-	uint16_t lsr = bfin_read16(&pUART->lsr);
+	uint16_t lsr = bfin_read(&pUART->lsr);
 	uart_lsr_save |= (lsr & (OE|PE|FE|BI));
 	return lsr | uart_lsr_save;
 }
@@ -71,7 +71,7 @@ static uint16_t uart_lsr_read(uint32_t uart_base)
 static void uart_lsr_clear(uint32_t uart_base)
 {
 	uart_lsr_save = 0;
-	bfin_write16(&pUART->lsr, bfin_read16(&pUART->lsr) | -1);
+	bfin_write(&pUART->lsr, bfin_read(&pUART->lsr) | -1);
 }
 #else
 /* When debugging is disabled, we only care about the DR bit, so if other
@@ -80,11 +80,11 @@ static void uart_lsr_clear(uint32_t uart_base)
  */
 static inline uint16_t uart_lsr_read(uint32_t uart_base)
 {
-	return bfin_read16(&pUART->lsr);
+	return bfin_read(&pUART->lsr);
 }
 static void uart_lsr_clear(uint32_t uart_base)
 {
-	bfin_write16(&pUART->lsr, bfin_read16(&pUART->lsr) | -1);
+	bfin_write(&pUART->lsr, bfin_read(&pUART->lsr) | -1);
 }
 #endif
 
@@ -101,7 +101,7 @@ static void uart_putc(uint32_t uart_base, const char c)
 		continue;
 
 	/* queue the character for transmission */
-	bfin_write16(&pUART->thr, c);
+	bfin_write(&pUART->thr, c);
 	SSYNC();
 
 	WATCHDOG_RESET();
@@ -122,7 +122,7 @@ static int uart_getc(uint32_t uart_base)
 		continue;
 
 	/* grab the new byte */
-	uart_rbr_val = bfin_read16(&pUART->rbr);
+	uart_rbr_val = bfin_read(&pUART->rbr);
 
 #ifdef CONFIG_DEBUG_SERIAL
 	/* grab & clear the LSR */
@@ -136,8 +136,8 @@ static int uart_getc(uint32_t uart_base)
 		uint16_t dll, dlh;
 		printf("\n[SERIAL ERROR]\n");
 		ACCESS_LATCH();
-		dll = bfin_read16(&pUART->dll);
-		dlh = bfin_read16(&pUART->dlh);
+		dll = bfin_read(&pUART->dll);
+		dlh = bfin_read(&pUART->dlh);
 		ACCESS_PORT_IER();
 		printf("\tDLL=0x%x DLH=0x%x\n", dll, dlh);
 		do {
arch/blackfin/cpu/serial.h +9 -9
index aa5c217..f649e40 100644
@@ -101,9 +101,9 @@ struct bfin_mmr_serial {
 # define ACCESS_PORT_IER()
 #else
 # define ACCESS_LATCH() \
-	bfin_write16(&pUART->lcr, bfin_read16(&pUART->lcr) | DLAB)
+	bfin_write(&pUART->lcr, bfin_read(&pUART->lcr) | DLAB)
 # define ACCESS_PORT_IER() \
-	bfin_write16(&pUART->lcr, bfin_read16(&pUART->lcr) & ~DLAB)
+	bfin_write(&pUART->lcr, bfin_read(&pUART->lcr) & ~DLAB)
 #endif
 
 __attribute__((always_inline))
@@ -173,10 +173,10 @@ __attribute__((always_inline))
 static inline int uart_init(uint32_t uart_base)
 {
 	/* always enable UART -- avoids anomalies 05000309 and 05000350 */
-	bfin_write16(&pUART->gctl, UCEN);
+	bfin_write(&pUART->gctl, UCEN);
 
 	/* Set LCR to Word Lengh 8-bit word select */
-	bfin_write16(&pUART->lcr, WLS_8);
+	bfin_write(&pUART->lcr, WLS_8);
 
 	SSYNC();
 
@@ -196,7 +196,7 @@ __attribute__((always_inline))
 static inline int serial_early_uninit(uint32_t uart_base)
 {
 	/* disable the UART by clearing UCEN */
-	bfin_write16(&pUART->gctl, 0);
+	bfin_write(&pUART->gctl, 0);
 
 	return 0;
 }
@@ -209,8 +209,8 @@ static inline void serial_early_put_div(uint32_t uart_base, uint16_t divisor)
 	SSYNC();
 
 	/* Program the divisor to get the baud rate we want */
-	bfin_write16(&pUART->dll, LOB(divisor));
-	bfin_write16(&pUART->dlh, HIB(divisor));
+	bfin_write(&pUART->dll, LOB(divisor));
+	bfin_write(&pUART->dlh, HIB(divisor));
 	SSYNC();
 
 	/* Clear DLAB in LCR to Access THR RBR IER */
@@ -227,8 +227,8 @@ static inline uint16_t serial_early_get_div(void)
 	ACCESS_LATCH();
 	SSYNC();
 
-	uint8_t dll = bfin_read16(&pUART->dll);
-	uint8_t dlh = bfin_read16(&pUART->dlh);
+	uint8_t dll = bfin_read(&pUART->dll);
+	uint8_t dlh = bfin_read(&pUART->dlh);
 	uint16_t divisor = (dlh << 8) | dll;
 
 	/* Clear DLAB in LCR to Access THR RBR IER */
Signature · 1 line
1.7.5.3
#18 lore raw

PATCH 17/18 Blackfin: update anomaly lists to latest public info

In reply to Mike Frysinger
---
 arch/blackfin/include/asm/mach-bf506/anomaly.h |   25 +++-
 arch/blackfin/include/asm/mach-bf518/anomaly.h |   28 ++-
 arch/blackfin/include/asm/mach-bf527/anomaly.h |   38 +++--
 arch/blackfin/include/asm/mach-bf533/anomaly.h |   23 ++-
 arch/blackfin/include/asm/mach-bf537/anomaly.h |   37 +++--
 arch/blackfin/include/asm/mach-bf538/anomaly.h |   42 +++--
 arch/blackfin/include/asm/mach-bf548/anomaly.h |  227 +++++++++++++-----------
 arch/blackfin/include/asm/mach-bf561/anomaly.h |  136 ++++++++-------
 8 files changed, 335 insertions(+), 221 deletions(-)
arch/blackfin/include/asm/mach-bf506/anomaly.h +21 -4
index e767233..5b3227a 100644
@@ -5,12 +5,13 @@
  * and can be replaced with that version at any time
  * DO NOT EDIT THIS FILE
  *
- * Copyright 2004-2010 Analog Devices Inc.
+ * Copyright 2004-2011 Analog Devices Inc.
  * Licensed under the ADI BSD license.
  *   https://docs.blackfin.uclinux.org/doku.php?id=adi_bsd
  */
 
 /* This file should be up to date with:
+ *  - Revision A, 02/18/2011; ADSP-BF504/BF504F/BF506F Blackfin Processor Anomaly List
  */
 
 #if __SILICON_REVISION__ < 0
@@ -36,8 +37,6 @@
 #define ANOMALY_05000310 (1)
 /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */
 #define ANOMALY_05000366 (1)
-/* Speculative Fetches Can Cause Undesired External FIFO Operations */
-#define ANOMALY_05000416 (1)
 /* Speculative Fetches of Indirect-Pointer Instructions Can Cause False Hardware Errors */
 #define ANOMALY_05000426 (1)
 /* IFLUSH Instruction@End of Hardware Loop Causes Infinite Stall */
@@ -52,12 +51,28 @@
 #define ANOMALY_05000472 (1)
 /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */
 #define ANOMALY_05000473 (1)
+/* SPORT0 Data Transmit Error in Multi-Channel Mode with Internal Clock */
+#define ANOMALY_05000476 (1)
 /* TESTSET Instruction Cannot Be Interrupted */
 #define ANOMALY_05000477 (1)
+/* Disabling ACM During an Ongoing Transfer Can Lead to Undefined ACM Behavior */
+#define ANOMALY_05000478 (1)
 /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */
 #define ANOMALY_05000481 (1)
-/* IFLUSH sucks at life */
+/* TWI Vbus Minimum Specification Can Be Violated under Certain Conditions */
+#define ANOMALY_05000486 (1)
+/* SPI Master Boot Can Fail Under Certain Conditions */
+#define ANOMALY_05000490 (1)
+/* Instruction Memory Stalls Can Cause IFLUSH to Fail */
 #define ANOMALY_05000491 (1)
+/* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */
+#define ANOMALY_05000494 (1)
+/* Maximum Idd-deepsleep Specifications Can Be Exceeded under Certain Conditions */
+#define ANOMALY_05000495 (1)
+/* CNT_COMMAND Functionality Depends on CNT_IMASK Configuration */
+#define ANOMALY_05000498 (1)
+/* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */
+#define ANOMALY_05000501 (1)
 
 /* Anomalies that don't exist on this proc */
 #define ANOMALY_05000099 (0)
@@ -109,6 +124,7 @@
 #define ANOMALY_05000364 (0)
 #define ANOMALY_05000371 (0)
 #define ANOMALY_05000380 (0)
+#define ANOMALY_05000383 (0)
 #define ANOMALY_05000386 (0)
 #define ANOMALY_05000389 (0)
 #define ANOMALY_05000400 (0)
@@ -123,6 +139,7 @@
 #define ANOMALY_05000467 (0)
 #define ANOMALY_05000474 (0)
 #define ANOMALY_05000475 (0)
+#define ANOMALY_05000480 (0)
 #define ANOMALY_05000485 (0)
 
 #endif
arch/blackfin/include/asm/mach-bf518/anomaly.h +19 -9
index 24918c5..56383f7 100644
@@ -5,16 +5,15 @@
  * and can be replaced with that version at any time
  * DO NOT EDIT THIS FILE
  *
- * Copyright 2004-2010 Analog Devices Inc.
+ * Copyright 2004-2011 Analog Devices Inc.
  * Licensed under the ADI BSD license.
  *   https://docs.blackfin.uclinux.org/doku.php?id=adi_bsd
  */
 
 /* This file should be up to date with:
- *  - Revision E, 01/26/2010; ADSP-BF512/BF514/BF516/BF518 Blackfin Processor Anomaly List
+ *  - Revision F, 05/23/2011; ADSP-BF512/BF514/BF516/BF518 Blackfin Processor Anomaly List
  */
 
-/* We plan on not supporting 0.0 silicon, but 0.1 isn't out yet - sorry */
 #if __SILICON_REVISION__ < 0
 # error will not work on BF518 silicon version
 #endif
@@ -77,19 +76,29 @@
 /* False Hardware Error when RETI Points to Invalid Memory */
 #define ANOMALY_05000461 (1)
 /* Synchronization Problem@Startup May Cause SPORT Transmit Channels to Misalign */
-#define ANOMALY_05000462 (1)
-/* PLL Latches Incorrect Settings During Reset */
-#define ANOMALY_05000469 (1)
+#define ANOMALY_05000462 (__SILICON_REVISION__ < 2)
 /* Incorrect Default MSEL Value in PLL_CTL */
-#define ANOMALY_05000472 (1)
+#define ANOMALY_05000472 (__SILICON_REVISION__ < 2)
 /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */
 #define ANOMALY_05000473 (1)
 /* TESTSET Instruction Cannot Be Interrupted */
 #define ANOMALY_05000477 (1)
 /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */
 #define ANOMALY_05000481 (1)
-/* IFLUSH sucks at life */
+/* PLL Latches Incorrect Settings During Reset */
+#define ANOMALY_05000482 (__SILICON_REVISION__ < 2)
+/* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */
+#define ANOMALY_05000485 (__SILICON_REVISION__ < 2)
+/* SPI Master Boot Can Fail Under Certain Conditions */
+#define ANOMALY_05000490 (1)
+/* Instruction Memory Stalls Can Cause IFLUSH to Fail */
 #define ANOMALY_05000491 (1)
+/* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */
+#define ANOMALY_05000494 (1)
+/* CNT_COMMAND Functionality Depends on CNT_IMASK Configuration */
+#define ANOMALY_05000498 (1)
+/* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */
+#define ANOMALY_05000501 (1)
 
 /* Anomalies that don't exist on this proc */
 #define ANOMALY_05000099 (0)
@@ -141,6 +150,7 @@
 #define ANOMALY_05000364 (0)
 #define ANOMALY_05000371 (0)
 #define ANOMALY_05000380 (0)
+#define ANOMALY_05000383 (0)
 #define ANOMALY_05000386 (0)
 #define ANOMALY_05000389 (0)
 #define ANOMALY_05000400 (0)
@@ -155,6 +165,6 @@
 #define ANOMALY_05000467 (0)
 #define ANOMALY_05000474 (0)
 #define ANOMALY_05000475 (0)
-#define ANOMALY_05000485 (0)
+#define ANOMALY_05000480 (0)
 
 #endif
arch/blackfin/include/asm/mach-bf527/anomaly.h +24 -14
index 72a6369..6884706 100644
@@ -5,14 +5,14 @@
  * and can be replaced with that version at any time
  * DO NOT EDIT THIS FILE
  *
- * Copyright 2004-2010 Analog Devices Inc.
+ * Copyright 2004-2011 Analog Devices Inc.
  * Licensed under the ADI BSD license.
  *   https://docs.blackfin.uclinux.org/doku.php?id=adi_bsd
  */
 
 /* This file should be up to date with:
- *  - Revision E, 03/15/2010; ADSP-BF526 Blackfin Processor Anomaly List
- *  - Revision H, 04/29/2010; ADSP-BF527 Blackfin Processor Anomaly List
+ *  - Revision F, 05/23/2011; ADSP-BF526 Blackfin Processor Anomaly List
+ *  - Revision I, 05/23/2011; ADSP-BF527 Blackfin Processor Anomaly List
  */
 
 #ifndef _MACH_ANOMALY_H_
@@ -57,7 +57,7 @@
 /* Incorrect Access of OTP_STATUS During otp_write() Function */
 #define ANOMALY_05000328 (_ANOMALY_BF527(< 2))
 /* Host DMA Boot Modes Are Not Functional */
-#define ANOMALY_05000330 (__SILICON_REVISION__ < 2)
+#define ANOMALY_05000330 (_ANOMALY_BF527(< 2))
 /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */
 #define ANOMALY_05000337 (_ANOMALY_BF527(< 2))
 /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */
@@ -135,7 +135,7 @@
 /* Incorrect Default Internal Voltage Regulator Setting */
 #define ANOMALY_05000410 (_ANOMALY_BF527(< 2))
 /* bfrom_SysControl() Firmware Function Cannot be Used to Enter Power Saving Modes */
-#define ANOMALY_05000411 (_ANOMALY_BF526_BF527(< 1, < 2))
+#define ANOMALY_05000411 (_ANOMALY_BF526(< 1))
 /* OTP_CHECK_FOR_PREV_WRITE Bit is Not Functional in bfrom_OtpWrite() API */
 #define ANOMALY_05000414 (_ANOMALY_BF526_BF527(< 1, < 2))
 /* DEB2_URGENT Bit Not Functional */
@@ -181,11 +181,11 @@
 /* IFLUSH Instruction@End of Hardware Loop Causes Infinite Stall */
 #define ANOMALY_05000443 (1)
 /* The WURESET Bit in the SYSCR Register is not Functional */
-#define ANOMALY_05000445 (1)
-/* USB DMA Mode 1 Short Packet Data Corruption */
+#define ANOMALY_05000445 (_ANOMALY_BF527(>= 0))
+/* USB DMA Short Packet Data Corruption */
 #define ANOMALY_05000450 (1)
 /* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */
-#define ANOMALY_05000451 (1)
+#define ANOMALY_05000451 (_ANOMALY_BF527(>= 0))
 /* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */
 #define ANOMALY_05000452 (_ANOMALY_BF526_BF527(< 1, >= 0))
 /* USB Receive Interrupt Is Not Generated in DMA Mode 1 */
@@ -198,19 +198,19 @@
 #define ANOMALY_05000461 (1)
 /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */
 #define ANOMALY_05000462 (1)
-/* USB Rx DMA hang */
+/* USB Rx DMA Hang */
 #define ANOMALY_05000465 (1)
 /* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */
 #define ANOMALY_05000466 (1)
-/* Possible RX data corruption when control & data EP FIFOs are accessed via the core */
+/* Possible USB RX Data Corruption When Control & Data EP FIFOs are Accessed via the Core */
 #define ANOMALY_05000467 (1)
 /* PLL Latches Incorrect Settings During Reset */
 #define ANOMALY_05000469 (1)
 /* Incorrect Default MSEL Value in PLL_CTL */
 #define ANOMALY_05000472 (_ANOMALY_BF526(>= 0))
-/* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */
+/* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */
 #define ANOMALY_05000473 (1)
-/* Possible Lockup Condition whem Modifying PLL from External Memory */
+/* Possible Lockup Condition when Modifying PLL from External Memory */
 #define ANOMALY_05000475 (1)
 /* TESTSET Instruction Cannot Be Interrupted */
 #define ANOMALY_05000477 (1)
@@ -219,11 +219,19 @@
 /* Possible USB Data Corruption When Multiple Endpoints Are Accessed by the Core */
 #define ANOMALY_05000483 (1)
 /* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */
-#define ANOMALY_05000485 (_ANOMALY_BF526_BF527(< 2, < 3))
+#define ANOMALY_05000485 (_ANOMALY_BF526_BF527(< 2, >= 0))
 /* The CODEC Zero-Cross Detect Feature is not Functional */
 #define ANOMALY_05000487 (1)
-/* IFLUSH sucks at life */
+/* SPI Master Boot Can Fail Under Certain Conditions */
+#define ANOMALY_05000490 (1)
+/* Instruction Memory Stalls Can Cause IFLUSH to Fail */
 #define ANOMALY_05000491 (1)
+/* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */
+#define ANOMALY_05000494 (1)
+/* CNT_COMMAND Functionality Depends on CNT_IMASK Configuration */
+#define ANOMALY_05000498 (1)
+/* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */
+#define ANOMALY_05000501 (1)
 
 /* Anomalies that don't exist on this proc */
 #define ANOMALY_05000099 (0)
@@ -270,11 +278,13 @@
 #define ANOMALY_05000323 (0)
 #define ANOMALY_05000362 (1)
 #define ANOMALY_05000363 (0)
+#define ANOMALY_05000383 (0)
 #define ANOMALY_05000400 (0)
 #define ANOMALY_05000402 (0)
 #define ANOMALY_05000412 (0)
 #define ANOMALY_05000447 (0)
 #define ANOMALY_05000448 (0)
 #define ANOMALY_05000474 (0)
+#define ANOMALY_05000480 (0)
 
 #endif
arch/blackfin/include/asm/mach-bf533/anomaly.h +16 -7
index 30e0eba..03f2b40 100644
@@ -5,13 +5,13 @@
  * and can be replaced with that version at any time
  * DO NOT EDIT THIS FILE
  *
- * Copyright 2004-2010 Analog Devices Inc.
+ * Copyright 2004-2011 Analog Devices Inc.
  * Licensed under the ADI BSD license.
  *   https://docs.blackfin.uclinux.org/doku.php?id=adi_bsd
  */
 
 /* This file should be up to date with:
- *  - Revision F, 05/25/2010; ADSP-BF531/BF532/BF533 Blackfin Processor Anomaly List
+ *  - Revision G, 05/23/2011; ADSP-BF531/BF532/BF533 Blackfin Processor Anomaly List
  */
 
 #ifndef _MACH_ANOMALY_H_
@@ -152,7 +152,7 @@
 #define ANOMALY_05000277 (__SILICON_REVISION__ < 6)
 /* Disabling Peripherals with DMA Running May Cause DMA System Instability */
 #define ANOMALY_05000278 (__SILICON_REVISION__ < 6)
-/* False Hardware Error Exception when ISR Context Is Not Restored */
+/* False Hardware Error when ISR Context Is Not Restored */
 #define ANOMALY_05000281 (__SILICON_REVISION__ < 6)
 /* Memory DMA Corruption with 32-Bit Data and Traffic Control */
 #define ANOMALY_05000282 (__SILICON_REVISION__ < 6)
@@ -210,18 +210,25 @@
 #define ANOMALY_05000462 (1)
 /* Boot Failure When SDRAM Control Signals Toggle Coming Out Of Reset */
 #define ANOMALY_05000471 (1)
-/* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */
+/* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */
 #define ANOMALY_05000473 (1)
-/* Possible Lockup Condition whem Modifying PLL from External Memory */
+/* Possible Lockup Condition when Modifying PLL from External Memory */
 #define ANOMALY_05000475 (1)
 /* TESTSET Instruction Cannot Be Interrupted */
 #define ANOMALY_05000477 (1)
 /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */
 #define ANOMALY_05000481 (1)
-/* IFLUSH sucks at life */
+/* PLL May Latch Incorrect Values Coming Out of Reset */
+#define ANOMALY_05000489 (1)
+/* Instruction Memory Stalls Can Cause IFLUSH to Fail */
 #define ANOMALY_05000491 (1)
+/* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */
+#define ANOMALY_05000494 (1)
+/* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */
+#define ANOMALY_05000501 (1)
 
-/* These anomalies have been "phased" out of analog.com anomaly sheets and are
+/*
+ * These anomalies have been "phased" out of analog.com anomaly sheets and are
  * here to show running on older silicon just isn't feasible.
  */
 
@@ -355,6 +362,7 @@
 #define ANOMALY_05000362 (1)
 #define ANOMALY_05000364 (0)
 #define ANOMALY_05000380 (0)
+#define ANOMALY_05000383 (0)
 #define ANOMALY_05000386 (1)
 #define ANOMALY_05000389 (0)
 #define ANOMALY_05000412 (0)
@@ -369,6 +377,7 @@
 #define ANOMALY_05000465 (0)
 #define ANOMALY_05000467 (0)
 #define ANOMALY_05000474 (0)
+#define ANOMALY_05000480 (0)
 #define ANOMALY_05000485 (0)
 
 #endif
arch/blackfin/include/asm/mach-bf537/anomaly.h +25 -12
index d3a2966..543cd3f 100644
@@ -5,13 +5,13 @@
  * and can be replaced with that version at any time
  * DO NOT EDIT THIS FILE
  *
- * Copyright 2004-2010 Analog Devices Inc.
+ * Copyright 2004-2011 Analog Devices Inc.
  * Licensed under the ADI BSD license.
  *   https://docs.blackfin.uclinux.org/doku.php?id=adi_bsd
  */
 
 /* This file should be up to date with:
- *  - Revision E, 05/25/2010; ADSP-BF534/ADSP-BF536/ADSP-BF537 Blackfin Processor Anomaly List
+ *  - Revision F, 05/23/2011; ADSP-BF534/ADSP-BF536/ADSP-BF537 Blackfin Processor Anomaly List
  */
 
 #ifndef _MACH_ANOMALY_H_
@@ -44,18 +44,12 @@
 #define ANOMALY_05000119 (1)
 /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
 #define ANOMALY_05000122 (1)
-/* Killed 32-Bit MMR Write Leads to Next System MMR Access Thinking It Should Be 32-Bit */
-#define ANOMALY_05000157 (__SILICON_REVISION__ < 2)
 /* PPI_DELAY Not Functional in PPI Modes with 0 Frame Syncs */
 #define ANOMALY_05000180 (1)
-/* Instruction Cache Is Not Functional */
-#define ANOMALY_05000237 (__SILICON_REVISION__ < 2)
 /* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */
 #define ANOMALY_05000244 (__SILICON_REVISION__ < 3)
 /* False Hardware Error from an Access in the Shadow of a Conditional Branch */
 #define ANOMALY_05000245 (1)
-/* Buffered CLKIN Output Is Disabled by Default */
-#define ANOMALY_05000247 (1)
 /* Incorrect Bit Shift of Data Word in Multichannel (TDM) Mode in Certain Conditions */
 #define ANOMALY_05000250 (__SILICON_REVISION__ < 3)
 /* EMAC TX DMA Error After an Early Frame Abort */
@@ -98,7 +92,7 @@
 #define ANOMALY_05000278 (((ANOMALY_BF536 || ANOMALY_BF537) && __SILICON_REVISION__ < 3) || (ANOMALY_BF534 && __SILICON_REVISION__ < 2))
 /* SPI Master Boot Mode Does Not Work Well with Atmel Data Flash Devices */
 #define ANOMALY_05000280 (1)
-/* False Hardware Error Exception when ISR Context Is Not Restored */
+/* False Hardware Error when ISR Context Is Not Restored */
 #define ANOMALY_05000281 (__SILICON_REVISION__ < 3)
 /* Memory DMA Corruption with 32-Bit Data and Traffic Control */
 #define ANOMALY_05000282 (__SILICON_REVISION__ < 3)
@@ -162,9 +156,9 @@
 #define ANOMALY_05000461 (1)
 /* Synchronization Problem@Startup May Cause SPORT Transmit Channels to Misalign */
 #define ANOMALY_05000462 (1)
-/* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */
+/* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */
 #define ANOMALY_05000473 (1)
-/* Possible Lockup Condition whem Modifying PLL from External Memory */
+/* Possible Lockup Condition when Modifying PLL from External Memory */
 #define ANOMALY_05000475 (1)
 /* TESTSET Instruction Cannot Be Interrupted */
 #define ANOMALY_05000477 (1)
@@ -172,8 +166,26 @@
 #define ANOMALY_05000480 (__SILICON_REVISION__ < 3)
 /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */
 #define ANOMALY_05000481 (1)
-/* IFLUSH sucks at life */
+/* PLL May Latch Incorrect Values Coming Out of Reset */
+#define ANOMALY_05000489 (1)
+/* Instruction Memory Stalls Can Cause IFLUSH to Fail */
 #define ANOMALY_05000491 (1)
+/* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */
+#define ANOMALY_05000494 (1)
+/* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */
+#define ANOMALY_05000501 (1)
+
+/*
+ * These anomalies have been "phased" out of analog.com anomaly sheets and are
+ * here to show running on older silicon just isn't feasible.
+ */
+
+/* Killed 32-Bit MMR Write Leads to Next System MMR Access Thinking It Should Be 32-Bit */
+#define ANOMALY_05000157 (__SILICON_REVISION__ < 2)
+/* Instruction Cache Is Not Functional */
+#define ANOMALY_05000237 (__SILICON_REVISION__ < 2)
+/* Buffered CLKIN Output Is Disabled by Default */
+#define ANOMALY_05000247 (__SILICON_REVISION__ < 2)
 
 /* Anomalies that don't exist on this proc */
 #define ANOMALY_05000099 (0)
@@ -208,6 +220,7 @@
 #define ANOMALY_05000363 (0)
 #define ANOMALY_05000364 (0)
 #define ANOMALY_05000380 (0)
+#define ANOMALY_05000383 (0)
 #define ANOMALY_05000386 (1)
 #define ANOMALY_05000389 (0)
 #define ANOMALY_05000400 (0)
arch/blackfin/include/asm/mach-bf538/anomaly.h +29 -13

104 lines not on this page · raw message

arch/blackfin/include/asm/mach-bf548/anomaly.h +126 -101

313 lines not on this page · raw message

arch/blackfin/include/asm/mach-bf561/anomaly.h +75 -61

214 lines not on this page · raw message

Signature · 1 line
1.7.5.3
#19 lore raw

PATCH 18/18 Blackfin: adi boards: also set stderr to nc with helper

In reply to Mike Frysinger
---
 include/configs/bfin_adi_common.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
include/configs/bfin_adi_common.h +2 -1
index 80f8a14..57d9b97 100644
@@ -204,7 +204,8 @@
 	"nc=" \
 		"set ncip ${serverip};" \
 		"set stdin nc;" \
-		"set stdout nc" \
+		"set stdout nc;" \
+		"set stderr nc" \
 		"\0"
 # else
 #  define NETCONSOLE_ENV
Signature · 1 line
1.7.5.3
#20 lore raw

[U-Boot] Pull request u-boot-blackfin.git

In reply to Mike Frysinger

The following changes since commit b1af6f532e0d348b153d5c148369229d24af361a:

Prepare v2011.06 (2011-06-27 22:22:42 +0200)

are available in the git repository at:
git://www.denx.de/git/u-boot-blackfin.git master

Harald Krapfenbauer (2):
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: update network settings
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: enable mmc_spi support

Mike Frysinger (16):
Blackfin: uart: move debug buffers into local bss
Blackfin: uart: add multiple serial support
Blackfin: adi boards: enable multi serial support by default
Blackfin: dont reset SWRST on newer bf526 parts
Blackfin: add init.elf helper code
Blackfin: uart: fix printf warning
Blackfin: post: setup default CONFIG_SYS_POST_WORD_ADDR
Blackfin: gpio: optimize free path a little
Blackfin: sync MMR read/write helpers with Linux
Blackfin: portmux: allow header to be included in assembly files
Blackfin: drop unused dma.h header from start code
Blackfin: adi boards: enable pretty flash progress output
Blackfin: split out async setup
Blackfin: serial: convert to bfin_{read,write} helpers
Blackfin: update anomaly lists to latest public info
Blackfin: adi boards: also set stderr to nc with helper

 Makefile                                       |    3 +-
 arch/blackfin/cpu/.gitignore                   |    3 +
 arch/blackfin/cpu/Makefile                     |    7 +-
 arch/blackfin/cpu/cpu.c                        |   16 +-
 arch/blackfin/cpu/gpio.c                       |    2 +
 arch/blackfin/cpu/init.S                       |    9 +
 arch/blackfin/cpu/init.lds.S                   |   25 +++
 arch/blackfin/cpu/initcode.c                   |   61 ++-----
 arch/blackfin/cpu/initcode.h                   |   71 +++++++
 arch/blackfin/cpu/reset.c                      |    4 +-
 arch/blackfin/cpu/serial.c                     |  234 ++++++++++++++++++------
 arch/blackfin/cpu/serial.h                     |   60 ++++--
 arch/blackfin/cpu/start.S                      |    1 -
 arch/blackfin/include/asm/blackfin_local.h     |   88 +++++-----
 arch/blackfin/include/asm/config.h             |    3 +
 arch/blackfin/include/asm/gpio.h               |    3 +-
 arch/blackfin/include/asm/mach-bf506/anomaly.h |   25 ++-
 arch/blackfin/include/asm/mach-bf518/anomaly.h |   28 ++-
 arch/blackfin/include/asm/mach-bf527/anomaly.h |   38 +++--
 arch/blackfin/include/asm/mach-bf533/anomaly.h |   23 ++-
 arch/blackfin/include/asm/mach-bf537/anomaly.h |   37 +++--
 arch/blackfin/include/asm/mach-bf538/anomaly.h |   42 +++--
 arch/blackfin/include/asm/mach-bf548/anomaly.h |  227 +++++++++++++----------
 arch/blackfin/include/asm/mach-bf561/anomaly.h |  136 ++++++++------
 arch/blackfin/include/asm/portmux.h            |    4 +
 arch/blackfin/lib/board.c                      |    4 +
 board/cm-bf537e/cm-bf537e.c                    |   34 +++--
 board/cm-bf537u/cm-bf537u.c                    |   39 ++--
 board/tcm-bf537/tcm-bf537.c                    |   34 +++--
 common/serial.c                                |    3 +
 include/configs/bf537-stamp.h                  |    1 -
 include/configs/bfin_adi_common.h              |   12 +-
 include/configs/cm-bf537e.h                    |   20 ++-
 include/configs/cm-bf537u.h                    |   24 ++-
 include/configs/tcm-bf537.h                    |   20 ++-
 include/serial.h                               |    9 +
 36 files changed, 896 insertions(+), 454 deletions(-)
 create mode 100644 arch/blackfin/cpu/init.S
 create mode 100644 arch/blackfin/cpu/init.lds.S
 create mode 100644 arch/blackfin/cpu/initcode.h
#21 lore raw

[U-Boot] Pull request u-boot-blackfin.git

Dear Mike Frysinger,

Quoted 6 lines · In message <[email protected]> you wrote:

The following changes since commit b1af6f532e0d348b153d5c148369229d24af361a:

Prepare v2011.06 (2011-06-27 22:22:42 +0200)

are available in the git repository at:
git://www.denx.de/git/u-boot-blackfin.git master

NAK, as before.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The more data I punch in this card,  the lighter it becomes, and the
lower the mailing cost."
                     - Stan Kelly-Bootle, "The Devil's DP Dictionary"
#22 lore raw

[U-Boot] Pull request u-boot-blackfin.git

Quoted 9 lines · Wolfgang Denk
Quoted 6 lines · Mike Frysinger

The following changes since commit b1af6f532e0d348b153d5c148369229d24af361a:

? Prepare v2011.06 (2011-06-27 22:22:42 +0200)

are available in the git repository at:
? git://www.denx.de/git/u-boot-blackfin.git master

NAK, as before.

i sent out the pull request immediately for this tree because your latency tends to be high (and if there was any problems with the patches, i'd get them fixed and updated the request), and this is how i'm used to doing things with linux. the trees are ready before the merge window opens, not during. seems u-boot is more of a "do the development/review during the merge window, and then merge during/after". i did not realize that.
-mike

#23 lore raw

[U-Boot] Pull request u-boot-blackfin.git

Dear Mike Frysinger,

Quoted 8 lines · In message <[email protected]> you wrote:

i sent out the pull request immediately for this tree because your latency tends to be high (and if there was any problems with the patches, i'd get them fixed and updated the request), and this is how i'm used to doing things with linux. the trees are ready before the merge window opens, not during. seems u-boot is more of a "do the development/review during the merge window, and then merge during/after". i did not realize that.

Review is supposed to happen between the time the patches get posted on the mailing list, and the time they get accepted and applied by a
custodian. Posting a ptach and a pull request for a branch which
includes it at the same time leaves no time for review.

Don't repeat that you posted unchanged stuff. We cannot know this - there was no indication in the patches what was changed to their earlier versions, there was not even an indication like proper
In-reply-to: or References: headers pointing to the earlier posts.

This reposting of unchanged stuff is stupid and counter-productive. Don't do it. I will NAK any such reposts, and any pull requests that include them.

Thanks.

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Veni, Vidi, VISA:
        I came, I saw, I did a little shopping.
#24 lore raw

cover Blackfin updates for v2011.09

In reply to Mike Frysinger

Dear Mike Frysinger,

Quoted 17 lines · In message <[email protected]> you wrote:

Many of these have been posted already, but some have not. We've pulled some updates from the Linux port, added support for multiple serial devs at the same time, and random tweaks/improvements all over.

Harald Krapfenbauer (2):
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: update network settings
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: enable mmc_spi support

Mike Frysinger (16):
Blackfin: uart: move debug buffers into local bss
Blackfin: uart: add multiple serial support
Blackfin: adi boards: enable multi serial support by default
Blackfin: dont reset SWRST on newer bf526 parts
Blackfin: add init.elf helper code
Blackfin: uart: fix printf warning
Blackfin: post: setup default CONFIG_SYS_POST_WORD_ADDR
Blackfin: gpio: optimize free path a little

Quoted 8 lines

Blackfin: sync MMR read/write helpers with Linux
Blackfin: portmux: allow header to be included in assembly files
Blackfin: drop unused dma.h header from start code
Blackfin: adi boards: enable pretty flash progress output
Blackfin: split out async setup
Blackfin: serial: convert to bfin_{read,write} helpers
Blackfin: update anomaly lists to latest public info
Blackfin: adi boards: also set stderr to nc with helper

All NAK for disobeying the well known rules.

See previous messages.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Life is a garment we continuously alter, but which  never  seems  to
fit."                                                  - David McCord
#25 lore raw

cover Blackfin updates for v2011.09

In reply to Mike Frysinger
Quoted 7 lines · Mike Frysinger

Many of these have been posted already, but some have not. ?We've pulled some updates from the Linux port, added support for multiple serial devs at the same time, and random tweaks/improvements all over.

Harald Krapfenbauer (2):
?Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: update network settings ?Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: enable mmc_spi support

i think in this patch series, these are the only two that were sent out previously. and they should be unchanged from the previous posting.
-mike

#26 lore raw

PATCH 19/21 Blackfin: serial: move early debug strings into .rodata section

In reply to Mike Frysinger

Rewrite the assembly serial_early_puts() helper to place the strings in the .rodata section rather than embedding them directly in the .text section. Using .text is a little simpler, but it doesn't let people execute out of internal L1 sram (since core reads don't work on those regions).

---
 arch/blackfin/cpu/serial.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
arch/blackfin/cpu/serial.h +5 -5
index f649e40..8a076dd 100644
@@ -288,16 +288,16 @@ static inline void serial_early_puts(const char *s)
  */
 #ifdef CONFIG_DEBUG_EARLY_SERIAL
 # define serial_early_puts(str) \
-	call _get_pc; \
-	jump 1f; \
+	.section .rodata; \
+	7: \
 	.ascii "Early:"; \
 	.ascii __FILE__; \
 	.ascii ": "; \
 	.ascii str; \
 	.asciz "\n"; \
-	.align 4; \
-1: \
-	R0 += 2; \
+	.previous; \
+	R0.L = 7b; \
+	R0.H = 7b; \
 	call _serial_puts;
 #else
 # define serial_early_puts(str)
Signature · 1 line
1.7.6
#27 lore raw

PATCH 20/21 Blackfin: switch to common display_options()

Use common code to output the version string rather than doing it ourselves.

---
 arch/blackfin/lib/board.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/blackfin/lib/board.c +1 -1
index e00050c..14ad3e8 100644
@@ -53,7 +53,7 @@ static inline void serial_early_puts(const char *s)
 
 static int display_banner(void)
 {
-	printf("\n\n%s\n\n", version_string);
+	display_options();
 	printf("CPU:   ADSP %s "
 		"(Detected Rev: 0.%d) "
 		"(%s boot)\n",
Signature · 1 line
1.7.6
#28 lore raw

PATCH 21/21 Blackfin: jtag-console: fix timer usage

In reply to Mike Frysinger
---
 arch/blackfin/cpu/jtag-console.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/blackfin/cpu/jtag-console.c +2 -2
index e0f2975..a77358a 100644
@@ -48,11 +48,11 @@ static inline uint32_t bfin_read_emudat(void)
 static bool jtag_write_emudat(uint32_t emudat)
 {
 	static bool overflowed = false;
-	ulong timeout = get_timer(0) + CONFIG_JTAG_CONSOLE_TIMEOUT;
+	ulong timeout = get_timer(0);
 	while (bfin_read_DBGSTAT() & 0x1) {
 		if (overflowed)
 			return overflowed;
-		if (timeout < get_timer(0))
+		if (get_timer(timeout) > CONFIG_JTAG_CONSOLE_TIMEOUT)
 			overflowed = true;
 	}
 	overflowed = false;
Signature · 1 line
1.7.6
#29 lore raw

cover Blackfin updates for v2011.09

In reply to Mike Frysinger
Quoted 7 lines · On Tuesday, June 28, 2011 15:36:09 Mike Frysinger wrote:

Many of these have been posted already, but some have not. We've pulled some updates from the Linux port, added support for multiple serial devs at the same time, and random tweaks/improvements all over.

Harald Krapfenbauer (2):
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: update network settings
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: enable mmc_spi support

these are the only ones that have been previously posted. they were part of a diff patchset for merging that was ultimately split up and the other changesets were merged. these two are unmodified from their previous appearance on the list.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110712/65d6a2ab/attachment.pgp

#30 lore raw

[U-Boot] Pull request u-boot-blackfin.git

In reply to Mike Frysinger

The following changes since commit 68d4230c3ccce96a72c5b99e48399bf1796fe3c6:

powerpc/85xx: Add default usb mode and phy type to hwconfig (2011-07-11 13:24:21 -0500)

are available in the git repository at:
git://www.denx.de/git/u-boot-blackfin.git master

Harald Krapfenbauer (2):
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: update network settings
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: enable mmc_spi support

Mike Frysinger (19):
Blackfin: uart: move debug buffers into local bss
Blackfin: uart: add multiple serial support
Blackfin: adi boards: enable multi serial support by default
Blackfin: dont reset SWRST on newer bf526 parts
Blackfin: add init.elf helper code
Blackfin: uart: fix printf warning
Blackfin: post: setup default CONFIG_SYS_POST_WORD_ADDR
Blackfin: gpio: optimize free path a little
Blackfin: sync MMR read/write helpers with Linux
Blackfin: portmux: allow header to be included in assembly files
Blackfin: drop unused dma.h header from start code
Blackfin: adi boards: enable pretty flash progress output
Blackfin: split out async setup
Blackfin: serial: convert to bfin_{read,write} helpers
Blackfin: update anomaly lists to latest public info
Blackfin: adi boards: also set stderr to nc with helper
Blackfin: serial: move early debug strings into .rodata section
Blackfin: switch to common display_options()
Blackfin: jtag-console: fix timer usage

 Makefile                                       |    3 +-
 arch/blackfin/cpu/.gitignore                   |    3 +
 arch/blackfin/cpu/Makefile                     |    7 +-
 arch/blackfin/cpu/cpu.c                        |   16 +-
 arch/blackfin/cpu/gpio.c                       |    2 +
 arch/blackfin/cpu/init.S                       |    9 +
 arch/blackfin/cpu/init.lds.S                   |   25 +++
 arch/blackfin/cpu/initcode.c                   |   61 ++-----
 arch/blackfin/cpu/initcode.h                   |   71 +++++++
 arch/blackfin/cpu/jtag-console.c               |    4 +-
 arch/blackfin/cpu/reset.c                      |    4 +-
 arch/blackfin/cpu/serial.c                     |  234 ++++++++++++++++++------
 arch/blackfin/cpu/serial.h                     |   70 +++++---
 arch/blackfin/cpu/start.S                      |    1 -
 arch/blackfin/include/asm/blackfin_local.h     |   88 +++++-----
 arch/blackfin/include/asm/config.h             |    3 +
 arch/blackfin/include/asm/gpio.h               |    3 +-
 arch/blackfin/include/asm/mach-bf506/anomaly.h |   25 ++-
 arch/blackfin/include/asm/mach-bf518/anomaly.h |   28 ++-
 arch/blackfin/include/asm/mach-bf527/anomaly.h |   38 +++--
 arch/blackfin/include/asm/mach-bf533/anomaly.h |   23 ++-
 arch/blackfin/include/asm/mach-bf537/anomaly.h |   37 +++--
 arch/blackfin/include/asm/mach-bf538/anomaly.h |   42 +++--
 arch/blackfin/include/asm/mach-bf548/anomaly.h |  227 +++++++++++++----------
 arch/blackfin/include/asm/mach-bf561/anomaly.h |  136 ++++++++------
 arch/blackfin/include/asm/portmux.h            |    4 +
 arch/blackfin/lib/board.c                      |    6 +-
 board/cm-bf537e/cm-bf537e.c                    |   34 +++--
 board/cm-bf537u/cm-bf537u.c                    |   39 ++--
 board/tcm-bf537/tcm-bf537.c                    |   34 +++--
 common/serial.c                                |    3 +
 include/configs/bf537-stamp.h                  |    1 -
 include/configs/bfin_adi_common.h              |   12 +-
 include/configs/cm-bf537e.h                    |   20 ++-
 include/configs/cm-bf537u.h                    |   24 ++-
 include/configs/tcm-bf537.h                    |   20 ++-
 include/serial.h                               |    9 +
 37 files changed, 904 insertions(+), 462 deletions(-)
 create mode 100644 arch/blackfin/cpu/init.S
 create mode 100644 arch/blackfin/cpu/init.lds.S
 create mode 100644 arch/blackfin/cpu/initcode.h
#31 lore raw

[U-Boot] Pull request u-boot-blackfin.git

Dear Mike Frysinger,

Quoted 65 lines · In message <[email protected]> you wrote:

The following changes since commit 68d4230c3ccce96a72c5b99e48399bf1796fe3c6:

powerpc/85xx: Add default usb mode and phy type to hwconfig (2011-07-11 13:24:21 -0500)

are available in the git repository at:
git://www.denx.de/git/u-boot-blackfin.git master

Harald Krapfenbauer (2):
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: update network settings
Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: enable mmc_spi support

Mike Frysinger (19):
Blackfin: uart: move debug buffers into local bss
Blackfin: uart: add multiple serial support
Blackfin: adi boards: enable multi serial support by default
Blackfin: dont reset SWRST on newer bf526 parts
Blackfin: add init.elf helper code
Blackfin: uart: fix printf warning
Blackfin: post: setup default CONFIG_SYS_POST_WORD_ADDR
Blackfin: gpio: optimize free path a little
Blackfin: sync MMR read/write helpers with Linux
Blackfin: portmux: allow header to be included in assembly files
Blackfin: drop unused dma.h header from start code
Blackfin: adi boards: enable pretty flash progress output
Blackfin: split out async setup
Blackfin: serial: convert to bfin_{read,write} helpers
Blackfin: update anomaly lists to latest public info
Blackfin: adi boards: also set stderr to nc with helper
Blackfin: serial: move early debug strings into .rodata section
Blackfin: switch to common display_options()
Blackfin: jtag-console: fix timer usage

 Makefile                                       |    3 +-
 arch/blackfin/cpu/.gitignore                   |    3 +
 arch/blackfin/cpu/Makefile                     |    7 +-
 arch/blackfin/cpu/cpu.c                        |   16 +-
 arch/blackfin/cpu/gpio.c                       |    2 +
 arch/blackfin/cpu/init.S                       |    9 +
 arch/blackfin/cpu/init.lds.S                   |   25 +++
 arch/blackfin/cpu/initcode.c                   |   61 ++-----
 arch/blackfin/cpu/initcode.h                   |   71 +++++++
 arch/blackfin/cpu/jtag-console.c               |    4 +-
 arch/blackfin/cpu/reset.c                      |    4 +-
 arch/blackfin/cpu/serial.c                     |  234 ++++++++++++++++++------
 arch/blackfin/cpu/serial.h                     |   70 +++++---
 arch/blackfin/cpu/start.S                      |    1 -
 arch/blackfin/include/asm/blackfin_local.h     |   88 +++++-----
 arch/blackfin/include/asm/config.h             |    3 +
 arch/blackfin/include/asm/gpio.h               |    3 +-
 arch/blackfin/include/asm/mach-bf506/anomaly.h |   25 ++-
 arch/blackfin/include/asm/mach-bf518/anomaly.h |   28 ++-
 arch/blackfin/include/asm/mach-bf527/anomaly.h |   38 +++--
 arch/blackfin/include/asm/mach-bf533/anomaly.h |   23 ++-
 arch/blackfin/include/asm/mach-bf537/anomaly.h |   37 +++--
 arch/blackfin/include/asm/mach-bf538/anomaly.h |   42 +++--
 arch/blackfin/include/asm/mach-bf548/anomaly.h |  227 +++++++++++++----------
 arch/blackfin/include/asm/mach-bf561/anomaly.h |  136 ++++++++------
 arch/blackfin/include/asm/portmux.h            |    4 +
 arch/blackfin/lib/board.c                      |    6 +-
 board/cm-bf537e/cm-bf537e.c                    |   34 +++--
 board/cm-bf537u/cm-bf537u.c                    |   39 ++--
 board/tcm-bf537/tcm-bf537.c                    |   34 +++--
 common/serial.c                                |    3 +
 include/configs/bf537-stamp.h                  |    1 -
 include/configs/bfin_adi_common.h              |   12 +-
Quoted 8 lines
 include/configs/cm-bf537e.h                    |   20 ++-
 include/configs/cm-bf537u.h                    |   24 ++-
 include/configs/tcm-bf537.h                    |   20 ++-
 include/serial.h                               |    9 +
 37 files changed, 904 insertions(+), 462 deletions(-)
 create mode 100644 arch/blackfin/cpu/init.S
 create mode 100644 arch/blackfin/cpu/init.lds.S
 create mode 100644 arch/blackfin/cpu/initcode.h

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"An open mind has but one disadvantage: it collects dirt."
                                                    - a saying at RPI