summaryrefslogtreecommitdiff
path: root/arch/blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/cpu/Makefile54
-rw-r--r--arch/blackfin/cpu/cpu.c3
-rw-r--r--arch/blackfin/cpu/gpio.c17
-rw-r--r--arch/blackfin/include/asm/bitops.h1
-rw-r--r--arch/blackfin/include/asm/clock.h1
-rw-r--r--arch/blackfin/include/asm/config.h7
-rw-r--r--arch/blackfin/include/asm/gpio.h3
-rw-r--r--arch/blackfin/lib/Makefile52
-rw-r--r--arch/blackfin/lib/__kgdb.S1
9 files changed, 55 insertions, 84 deletions
diff --git a/arch/blackfin/cpu/Makefile b/arch/blackfin/cpu/Makefile
index 1421cb2..243dc22 100644
--- a/arch/blackfin/cpu/Makefile
+++ b/arch/blackfin/cpu/Makefile
@@ -9,34 +9,21 @@
# Licensed under the GPL-2 or later.
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(CPU).o
-
-EXTRA := init.elf
-CEXTRA := initcode.o
-SEXTRA := start.o
-SOBJS := interrupt.o cache.o
-COBJS-y += cpu.o
-COBJS-$(CONFIG_ADI_GPIO1) += gpio.o
-COBJS-y += interrupts.o
-COBJS-$(CONFIG_JTAG_CONSOLE) += jtag-console.o
-COBJS-y += os_log.o
-COBJS-y += reset.o
-COBJS-y += traps.o
-
-SRCS := $(SEXTRA:.o=.S) $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS))
-EXTRA := $(addprefix $(obj),$(EXTRA))
-CEXTRA := $(addprefix $(obj),$(CEXTRA))
-SEXTRA := $(addprefix $(obj),$(SEXTRA))
-
-all: $(obj).depend $(LIB) $(obj).depend $(EXTRA) $(CEXTRA) $(SEXTRA) check_initcode
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-$(OBJS): $(obj)bootrom-asm-offsets.h
+extra-y := init.elf
+extra-y += initcode.o
+extra-y += start.o
+obj-y := interrupt.o cache.o
+obj-y += cpu.o
+obj-y += gpio.o
+obj-y += interrupts.o
+obj-$(CONFIG_JTAG_CONSOLE) += jtag-console.o
+obj-y += os_log.o
+obj-y += reset.o
+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 $@
@@ -50,7 +37,7 @@ $(obj)bootrom-asm-offsets.h: $(obj)bootrom-asm-offsets.s
# have relocs or external references
$(obj)initcode.o: CFLAGS += -fno-function-sections -fno-data-sections
READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $<
-check_initcode: $(obj)initcode.o
+$(obj)check_initcode: $(obj)initcode.o
ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
@if $(READINIT) | grep '\<GLOBAL\>.*\<UND\>' ; then \
echo "$< contains external references!" 1>&2 ; \
@@ -62,12 +49,3 @@ $(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
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/arch/blackfin/cpu/cpu.c b/arch/blackfin/cpu/cpu.c
index 218f57e..2409c30 100644
--- a/arch/blackfin/cpu/cpu.c
+++ b/arch/blackfin/cpu/cpu.c
@@ -104,6 +104,9 @@ void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
serial_early_puts("Board init flash\n");
board_init_f(bootflag);
+
+ /* should not be reached */
+ while (1);
}
int exception_init(void)
diff --git a/arch/blackfin/cpu/gpio.c b/arch/blackfin/cpu/gpio.c
index f9aff4d..5e9c68a 100644
--- a/arch/blackfin/cpu/gpio.c
+++ b/arch/blackfin/cpu/gpio.c
@@ -12,6 +12,7 @@
#include <asm/gpio.h>
#include <asm/portmux.h>
+#ifdef CONFIG_ADI_GPIO1
#if ANOMALY_05000311 || ANOMALY_05000323
enum {
AWA_data = SYSCR,
@@ -774,3 +775,19 @@ void gpio_labels(void)
continue;
}
}
+#else
+struct gpio_port_t * const gpio_array[] = {
+ (struct gpio_port_t *)PORTA_FER,
+ (struct gpio_port_t *)PORTB_FER,
+ (struct gpio_port_t *)PORTC_FER,
+ (struct gpio_port_t *)PORTD_FER,
+ (struct gpio_port_t *)PORTE_FER,
+ (struct gpio_port_t *)PORTF_FER,
+ (struct gpio_port_t *)PORTG_FER,
+#if defined(CONFIG_BF54x)
+ (struct gpio_port_t *)PORTH_FER,
+ (struct gpio_port_t *)PORTI_FER,
+ (struct gpio_port_t *)PORTJ_FER,
+#endif
+};
+#endif
diff --git a/arch/blackfin/include/asm/bitops.h b/arch/blackfin/include/asm/bitops.h
index b58b005..cd7e356 100644
--- a/arch/blackfin/include/asm/bitops.h
+++ b/arch/blackfin/include/asm/bitops.h
@@ -13,7 +13,6 @@
* Copyright 1992, Linus Torvalds.
*/
-#include <linux/config.h>
#include <asm/byteorder.h>
#include <asm/system.h>
diff --git a/arch/blackfin/include/asm/clock.h b/arch/blackfin/include/asm/clock.h
index f1fcd40..fc84fe4 100644
--- a/arch/blackfin/include/asm/clock.h
+++ b/arch/blackfin/include/asm/clock.h
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2012 Analog Devices Inc.
* Licensed under the GPL-2 or later.
diff --git a/arch/blackfin/include/asm/config.h b/arch/blackfin/include/asm/config.h
index d870d12..1da386e 100644
--- a/arch/blackfin/include/asm/config.h
+++ b/arch/blackfin/include/asm/config.h
@@ -155,13 +155,6 @@
#ifndef CONFIG_SYS_MAXARGS
# define CONFIG_SYS_MAXARGS 16
#endif
-#if defined(CONFIG_SYS_HZ)
-# if (CONFIG_SYS_HZ != 1000)
-# warning "CONFIG_SYS_HZ must always be 1000"
-# endif
-# undef CONFIG_SYS_HZ
-#endif
-#define CONFIG_SYS_HZ 1000
/* Blackfin POST tests */
#ifdef CONFIG_POST_BSPEC1_GPIO_LEDS
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h
index 58a6191..376ec02 100644
--- a/arch/blackfin/include/asm/gpio.h
+++ b/arch/blackfin/include/asm/gpio.h
@@ -8,6 +8,7 @@
#define __ARCH_BLACKFIN_GPIO_H__
#include <asm-generic/gpio.h>
+#include <asm/portmux.h>
#define gpio_bank(x) ((x) >> 4)
#define gpio_bit(x) (1<<((x) & 0xF))
@@ -141,6 +142,8 @@ struct gpio_port_t {
unsigned short dummy16;
unsigned short inen;
};
+#else
+extern struct gpio_port_t * const gpio_array[];
#endif
#ifdef ADI_SPECIAL_GPIO_BANKS
diff --git a/arch/blackfin/lib/Makefile b/arch/blackfin/lib/Makefile
index 5603eb9..a5c552f 100644
--- a/arch/blackfin/lib/Makefile
+++ b/arch/blackfin/lib/Makefile
@@ -9,41 +9,21 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
CFLAGS += -DBFIN_BOARD_NAME='"$(BOARD)"'
-LIB = $(obj)lib$(ARCH).o
-
-SOBJS-y += ins.o
-SOBJS-y += memcmp.o
-SOBJS-y += memcpy.o
-SOBJS-y += memmove.o
-SOBJS-y += memset.o
-SOBJS-y += outs.o
-SOBJS-$(CONFIG_CMD_KGDB) += __kgdb.o
-
-COBJS-y += board.o
-COBJS-y += boot.o
-COBJS-y += cache.o
-COBJS-y += clocks.o
-COBJS-$(CONFIG_CMD_CACHE_DUMP) += cmd_cache_dump.o
-COBJS-$(CONFIG_CMD_KGDB) += kgdb.o
-COBJS-y += muldi3.o
-COBJS-$(CONFIG_HAS_POST) += post.o
-COBJS-y += string.o
-
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-y += ins.o
+obj-y += memcmp.o
+obj-y += memcpy.o
+obj-y += memmove.o
+obj-y += memset.o
+obj-y += outs.o
+obj-$(CONFIG_CMD_KGDB) += __kgdb.o
+obj-y += board.o
+obj-y += boot.o
+obj-y += cache.o
+obj-y += clocks.o
+obj-$(CONFIG_CMD_CACHE_DUMP) += cmd_cache_dump.o
+obj-$(CONFIG_CMD_KGDB) += kgdb.o
+obj-y += muldi3.o
+obj-$(CONFIG_HAS_POST) += post.o
+obj-y += string.o
diff --git a/arch/blackfin/lib/__kgdb.S b/arch/blackfin/lib/__kgdb.S
index 4ccde8f..4e7b6a4 100644
--- a/arch/blackfin/lib/__kgdb.S
+++ b/arch/blackfin/lib/__kgdb.S
@@ -1,4 +1,3 @@
-
#include <linux/linkage.h>
/* save stack context for non-local goto