summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--arch/blackfin/cpu/.gitignore2
-rw-r--r--arch/blackfin/cpu/Makefile10
-rw-r--r--arch/blackfin/cpu/bootrom-asm-offsets.awk41
-rw-r--r--arch/blackfin/cpu/bootrom-asm-offsets.c.in12
-rw-r--r--arch/blackfin/cpu/gpio.c2
-rw-r--r--arch/blackfin/include/asm/gpio.h2
-rw-r--r--drivers/spi/bfin_spi.c17
-rw-r--r--drivers/spi/bfin_spi6xx.c5
-rw-r--r--include/configs/bf506f-ezkit.h1
-rw-r--r--include/configs/bf525-ucr2.h1
-rw-r--r--include/configs/bf533-stamp.h29
-rw-r--r--include/configs/bf537-minotaur.h1
-rw-r--r--include/configs/bf537-srv1.h1
-rw-r--r--include/configs/blackstamp.h1
-rw-r--r--include/configs/cm-bf548.h2
-rw-r--r--include/configs/dnp5370.h1
17 files changed, 22 insertions, 107 deletions
diff --git a/Makefile b/Makefile
index 8b86913..e693f7f 100644
--- a/Makefile
+++ b/Makefile
@@ -807,7 +807,6 @@ clean:
$(obj)board/matrix_vision/*/bootscript.img \
$(obj)board/voiceblue/eeprom \
$(obj)u-boot.lds \
- $(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)include/bmp_logo_data.h
diff --git a/arch/blackfin/cpu/.gitignore b/arch/blackfin/cpu/.gitignore
index ba986d8..3df1fa2 100644
--- a/arch/blackfin/cpu/.gitignore
+++ b/arch/blackfin/cpu/.gitignore
@@ -1,4 +1,2 @@
-bootrom-asm-offsets.[chs]
-
init.lds
init.elf
diff --git a/arch/blackfin/cpu/Makefile b/arch/blackfin/cpu/Makefile
index 243dc22..a61594a 100644
--- a/arch/blackfin/cpu/Makefile
+++ b/arch/blackfin/cpu/Makefile
@@ -23,16 +23,6 @@ obj-y += traps.o
extra-y += check_initcode
-extra-y += bootrom-asm-offsets.h
-$(obj)bootrom-asm-offsets.c: bootrom-asm-offsets.c.in bootrom-asm-offsets.awk
- echo '#include <asm/mach-common/bits/bootrom.h>' | $(CPP) $(CPPFLAGS) - | gawk -f ./bootrom-asm-offsets.awk > $@.tmp
- mv $@.tmp $@
-$(obj)bootrom-asm-offsets.s: $(obj)bootrom-asm-offsets.c
- $(CC) $(CFLAGS) -S $^ -o $@.tmp
- mv $@.tmp $@
-$(obj)bootrom-asm-offsets.h: $(obj)bootrom-asm-offsets.s
- sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" $^ > $@
-
# make sure our initcode (which goes into LDR) does not
# have relocs or external references
$(obj)initcode.o: CFLAGS += -fno-function-sections -fno-data-sections
diff --git a/arch/blackfin/cpu/bootrom-asm-offsets.awk b/arch/blackfin/cpu/bootrom-asm-offsets.awk
deleted file mode 100644
index 1d61824..0000000
--- a/arch/blackfin/cpu/bootrom-asm-offsets.awk
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/gawk -f
-BEGIN {
- print "/* DO NOT EDIT: AUTOMATICALLY GENERATED"
- print " * Input files: bootrom-asm-offsets.awk bootrom-asm-offsets.c.in"
- print " * DO NOT EDIT: AUTOMATICALLY GENERATED"
- print " */"
- print ""
- system("cat bootrom-asm-offsets.c.in")
- print "{"
-}
-
-{
- /* find a structure definition */
- if ($0 ~ /typedef struct .* {/) {
- delete members;
- i = 0;
-
- /* extract each member of the structure */
- while (1) {
- getline
- if ($1 == "}")
- break;
- gsub(/[*;]/, "");
- members[i++] = $NF;
- }
-
- /* grab the structure's name */
- struct = $NF;
- sub(/;$/, "", struct);
-
- /* output the DEFINE() macros */
- while (i-- > 0)
- print "\tDEFINE(" struct ", " members[i] ");"
- print ""
- }
-}
-
-END {
- print "\treturn 0;"
- print "}"
-}
diff --git a/arch/blackfin/cpu/bootrom-asm-offsets.c.in b/arch/blackfin/cpu/bootrom-asm-offsets.c.in
deleted file mode 100644
index 64c2f24..0000000
--- a/arch/blackfin/cpu/bootrom-asm-offsets.c.in
+++ /dev/null
@@ -1,12 +0,0 @@
-/* A little trick taken from the kernel asm-offsets.h where we convert
- * the C structures automatically into a bunch of defines for use in
- * the assembly files.
- */
-
-#include <linux/stddef.h>
-#include <asm/mach-common/bits/bootrom.h>
-
-#define _DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-#define DEFINE(s, m) _DEFINE(offset_##s##_##m, offsetof(s, m))
-
-int main(int argc, char * const argv[])
diff --git a/arch/blackfin/cpu/gpio.c b/arch/blackfin/cpu/gpio.c
index 5e9c68a..86da706 100644
--- a/arch/blackfin/cpu/gpio.c
+++ b/arch/blackfin/cpu/gpio.c
@@ -12,7 +12,7 @@
#include <asm/gpio.h>
#include <asm/portmux.h>
-#ifdef CONFIG_ADI_GPIO1
+#ifndef CONFIG_ADI_GPIO2
#if ANOMALY_05000311 || ANOMALY_05000323
enum {
AWA_data = SYSCR,
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h
index 376ec02..6ebcf01 100644
--- a/arch/blackfin/include/asm/gpio.h
+++ b/arch/blackfin/include/asm/gpio.h
@@ -72,7 +72,7 @@
#ifndef __ASSEMBLY__
-#ifdef CONFIG_ADI_GPIO1
+#ifndef CONFIG_ADI_GPIO2
void set_gpio_dir(unsigned, unsigned short);
void set_gpio_inen(unsigned, unsigned short);
void set_gpio_polar(unsigned, unsigned short);
diff --git a/drivers/spi/bfin_spi.c b/drivers/spi/bfin_spi.c
index bb88f30..aa89d89 100644
--- a/drivers/spi/bfin_spi.c
+++ b/drivers/spi/bfin_spi.c
@@ -162,21 +162,22 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
if (!spi_cs_is_valid(bus, cs))
return NULL;
- if (bus >= ARRAY_SIZE(pins) || pins[bus] == NULL) {
- debug("%s: invalid bus %u\n", __func__, bus);
- return NULL;
- }
switch (bus) {
#ifdef SPI0_CTL
- case 0: mmr_base = SPI0_CTL; break;
+ case 0:
+ mmr_base = SPI0_CTL; break;
#endif
#ifdef SPI1_CTL
- case 1: mmr_base = SPI1_CTL; break;
+ case 1:
+ mmr_base = SPI1_CTL; break;
#endif
#ifdef SPI2_CTL
- case 2: mmr_base = SPI2_CTL; break;
+ case 2:
+ mmr_base = SPI2_CTL; break;
#endif
- default: return NULL;
+ default:
+ debug("%s: invalid bus %u\n", __func__, bus);
+ return NULL;
}
bss = spi_alloc_slave(struct bfin_spi_slave, bus, cs);
diff --git a/drivers/spi/bfin_spi6xx.c b/drivers/spi/bfin_spi6xx.c
index c25c4a9..07b833d 100644
--- a/drivers/spi/bfin_spi6xx.c
+++ b/drivers/spi/bfin_spi6xx.c
@@ -154,10 +154,6 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
if (!spi_cs_is_valid(bus, cs))
return NULL;
- if (bus >= ARRAY_SIZE(pins) || pins[bus] == NULL) {
- debug("%s: invalid bus %u\n", __func__, bus);
- return NULL;
- }
switch (bus) {
#ifdef SPI0_REGBASE
case 0:
@@ -175,6 +171,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
break;
#endif
default:
+ debug("%s: invalid bus %u\n", __func__, bus);
return NULL;
}
diff --git a/include/configs/bf506f-ezkit.h b/include/configs/bf506f-ezkit.h
index 77b6735..5ad3ee7 100644
--- a/include/configs/bf506f-ezkit.h
+++ b/include/configs/bf506f-ezkit.h
@@ -94,6 +94,7 @@
#define CONFIG_DCACHE_OFF
#define CONFIG_UART_CONSOLE 0
#define CONFIG_BAUDRATE 115200
+#define CONFIG_BFIN_SERIAL
#define CONFIG_CMD_MEMORY
#undef CONFIG_GZIP
diff --git a/include/configs/bf525-ucr2.h b/include/configs/bf525-ucr2.h
index 1f65130..008f4b5 100644
--- a/include/configs/bf525-ucr2.h
+++ b/include/configs/bf525-ucr2.h
@@ -85,6 +85,7 @@
#define CONFIG_UART_CONSOLE 0
#define CONFIG_BAUDRATE 115200
+#define CONFIG_BFIN_SERIAL
#define CONFIG_BOOTARGS "root=/dev/mtdblock0 rw"
#define CONFIG_BOOTCOMMAND "run sfboot"
#define CONFIG_BOOTDELAY 5
diff --git a/include/configs/bf533-stamp.h b/include/configs/bf533-stamp.h
index a22c868..f5b9658 100644
--- a/include/configs/bf533-stamp.h
+++ b/include/configs/bf533-stamp.h
@@ -80,33 +80,8 @@
/*
* Software (bit-bang) I2C driver configuration
*/
-#define PF_SCL PF3
-#define PF_SDA PF2
-#define I2C_INIT (*pFIO_DIR |= PF_SCL); asm("ssync;")
-#define I2C_ACTIVE (*pFIO_DIR |= PF_SDA); \
- *pFIO_INEN &= ~PF_SDA; asm("ssync;")
-#define I2C_TRISTATE (*pFIO_DIR &= ~PF_SDA); \
- *pFIO_INEN |= PF_SDA; asm("ssync;")
-#define I2C_READ ((volatile)(*pFIO_FLAG_D & PF_SDA) != 0); \
- asm("ssync;")
-#define I2C_SDA(bit) if (bit) { \
- *pFIO_FLAG_S = PF_SDA; \
- asm("ssync;"); \
- } \
- else { \
- *pFIO_FLAG_C = PF_SDA; \
- asm("ssync;"); \
- }
-#define I2C_SCL(bit) if (bit) { \
- *pFIO_FLAG_S = PF_SCL; \
- asm("ssync;"); \
- } \
- else { \
- *pFIO_FLAG_C = PF_SCL; \
- asm("ssync;"); \
- }
-#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */
-
+#define CONFIG_SOFT_I2C_GPIO_SCL GPIO_PF3
+#define CONFIG_SOFT_I2C_GPIO_SDA GPIO_PF2
/*
* Flash Settings
diff --git a/include/configs/bf537-minotaur.h b/include/configs/bf537-minotaur.h
index feb9d73..156eeab 100644
--- a/include/configs/bf537-minotaur.h
+++ b/include/configs/bf537-minotaur.h
@@ -136,6 +136,7 @@
#define CONFIG_BAUDRATE 57600
#define CONFIG_UART_CONSOLE 0
+#define CONFIG_BFIN_SERIAL
#define CONFIG_PANIC_HANG 1
#define CONFIG_RTC_BFIN 1
diff --git a/include/configs/bf537-srv1.h b/include/configs/bf537-srv1.h
index 1de8ffe..e12d761 100644
--- a/include/configs/bf537-srv1.h
+++ b/include/configs/bf537-srv1.h
@@ -136,6 +136,7 @@
#define CONFIG_BAUDRATE 115200
#define CONFIG_UART_CONSOLE 0
+#define CONFIG_BFIN_SERIAL
#define CONFIG_PANIC_HANG 1
#define CONFIG_RTC_BFIN 1
diff --git a/include/configs/blackstamp.h b/include/configs/blackstamp.h
index 5b3aac7..7de4253 100644
--- a/include/configs/blackstamp.h
+++ b/include/configs/blackstamp.h
@@ -195,6 +195,7 @@
#define CONFIG_BAUDRATE 57600
#define CONFIG_LOADS_ECHO 1
#define CONFIG_UART_CONSOLE 0
+#define CONFIG_BFIN_SERIAL
/*
* I2C settings
diff --git a/include/configs/cm-bf548.h b/include/configs/cm-bf548.h
index 3c9eeb5..7f27eda 100644
--- a/include/configs/cm-bf548.h
+++ b/include/configs/cm-bf548.h
@@ -118,6 +118,8 @@
#define CONFIG_BOOTCOMMAND "run flashboot"
#define FLASHBOOT_ENV_SETTINGS "flashboot=bootm 0x20040000\0"
+#define CONFIG_ADI_GPIO2
+
#ifndef __ADSPBF542__
/* Don't waste time transferring a logo over the UART */
# if (CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_UART)
diff --git a/include/configs/dnp5370.h b/include/configs/dnp5370.h
index d0e72e3..4f2c742 100644
--- a/include/configs/dnp5370.h
+++ b/include/configs/dnp5370.h
@@ -103,6 +103,7 @@
#define CONFIG_DNP5370_EXT_WD_DISABLE 1
#define CONFIG_UART_CONSOLE 0
+#define CONFIG_BFIN_SERIAL
#define CONFIG_BAUDRATE 115200
#define CONFIG_BOOTCOMMAND "bootm 0x20030000"
#define CONFIG_BOOTARGS "console=ttyBF0,115200 root=/dev/mtdblock3 rootfstype=ext2"