summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/Makefile41
-rw-r--r--arch/mips/boards/loongson-ls1b/include/board/debug_ll.h22
-rw-r--r--arch/mips/boards/netgear-wg102/include/board/debug_ll.h21
-rw-r--r--arch/mips/boards/qemu-malta/include/board/debug_ll.h18
-rw-r--r--arch/mips/mach-ath79/Kconfig3
-rw-r--r--arch/mips/pbl/Makefile2
6 files changed, 16 insertions, 91 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index ee3364d27a..5604a0a10d 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -11,7 +11,7 @@ else
64bit-emul = elf64btsmip
endif
-CPPFLAGS += -D__MIPS__ -fno-strict-aliasing -fno-merge-constants
+KBUILD_CPPFLAGS += -D__MIPS__ -fno-strict-aliasing -fno-merge-constants
cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
cflags-y += -Wall -Wstrict-prototypes \
@@ -34,17 +34,17 @@ predef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__
ifdef CONFIG_CPU_BIG_ENDIAN
cflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be))
-ldflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB )
+mips-ldflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB )
endif
ifdef CONFIG_CPU_LITTLE_ENDIAN
cflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
-ldflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL )
+mips-ldflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL )
endif
-LDFLAGS += $(ldflags-y) -m $(ld-emul)
-LDFLAGS_barebox += $(ldflags-y)
-LDFLAGS_pbl += $(ldflags-y)
+KBUILD_LDFLAGS += $(mips-ldflags-y) -m $(ld-emul)
+LDFLAGS_barebox += $(mips-ldflags-y)
+LDFLAGS_pbl += $(mips-ldflags-y)
#
# CPU-dependent compiler/assembler options for optimization.
@@ -55,11 +55,11 @@ cflags-$(CONFIG_CPU_MIPS64_R1) += $(call cc-option,-march=mips64,-mips64 -U_MIPS
cflags-$(CONFIG_CPU_MIPS64_R2) += $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) -Wa,-mips64r2 -Wa,--trap
cflags-$(CONFIG_CPU_GS232) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) -Wa,-mips32r2 -Wa,--trap
-CPPFLAGS += -DTEXT_BASE=$(CONFIG_TEXT_BASE)
+KBUILD_CPPFLAGS += -DTEXT_BASE=$(CONFIG_TEXT_BASE)
ifndef CONFIG_MODULES
# Add cleanup flags
-CPPFLAGS += -fdata-sections -ffunction-sections
+KBUILD_CPPFLAGS += -fdata-sections -ffunction-sections
LDFLAGS_barebox += -static --gc-sections --emit-relocs
endif
@@ -82,22 +82,7 @@ machine-$(CONFIG_MACH_MIPS_LOONGSON) := loongson
machine-$(CONFIG_MACH_MIPS_XBURST) := xburst
machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
-ifeq ($(KBUILD_SRC),)
-CPPFLAGS += $(patsubst %,-I%include,$(machdirs))
-else
-CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
-endif
-
-ifeq ($(incdir-y),)
-incdir-y := $(machine-y)
-endif
-INCDIR := arch-$(incdir-y)
-
-ifeq ($(KBUILD_SRC),)
-CPPFLAGS += -I$(BOARD)/include
-else
-CPPFLAGS += -I$(srctree)/$(BOARD)/include
-endif
+KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
ifneq ($(machine-y),)
MACH := arch/mips/mach-$(machine-y)/
@@ -105,19 +90,17 @@ else
MACH :=
endif
-common-y += $(BOARD)
-
common-y += $(MACH)
common-y += arch/mips/lib/
common-y += arch/mips/boot/
common-y += arch/mips/boards/
-CPPFLAGS += $(cflags-y)
-CFLAGS += $(cflags-y)
+KBUILD_CPPFLAGS += $(cflags-y)
+KBUILD_CFLAGS += $(cflags-y)
lds-$(CONFIG_GENERIC_LINKER_SCRIPT) := arch/mips/lib/barebox.lds
-cmd_barebox__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_barebox) -o $@ \
+cmd_barebox__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_barebox) -o $@ \
-T $(BAREBOX_LDS) \
--start-group $(BAREBOX_OBJS) --end-group \
$(filter-out $(BAREBOX_LDS) $(BAREBOX_OBJS) FORCE ,$^); \
diff --git a/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h b/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h
deleted file mode 100644
index 05420f73a1..0000000000
--- a/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com>
- */
-
-/** @file
- * This File contains declaration for early output support
- */
-#ifndef __LOONGSON_TECH_LS1B_DEBUG_LL_H__
-#define __LOONGSON_TECH_LS1B_DEBUG_LL_H__
-
-#include <asm/addrspace.h>
-#include <mach/loongson1.h>
-
-#define DEBUG_LL_UART_ADDR KSEG1ADDR(LS1X_UART2_BASE)
-#define DEBUG_LL_UART_SHIFT 0
-
-#define DEBUG_LL_UART_CLK (83000000 / 16)
-#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE
-#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS)
-
-#endif /* __LOONGSON_TECH_LS1B_DEBUG_LL_H__ */
diff --git a/arch/mips/boards/netgear-wg102/include/board/debug_ll.h b/arch/mips/boards/netgear-wg102/include/board/debug_ll.h
deleted file mode 100644
index cc3b1d74b0..0000000000
--- a/arch/mips/boards/netgear-wg102/include/board/debug_ll.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de>
- */
-
-/** @file
- * This File contains declaration for early output support
- */
-#ifndef __NETGEAR_WG102_DEBUG_LL_H__
-#define __NETGEAR_WG102_DEBUG_LL_H__
-
-#include <mach/ar2312_regs.h>
-
-#define DEBUG_LL_UART_ADDR KSEG1ADDR(AR2312_UART0)
-#define DEBUG_LL_UART_SHIFT AR2312_UART_SHIFT
-
-#define DEBUG_LL_UART_CLK (45000000 / 16)
-#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE
-#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS)
-
-#endif /* __NETGEAR_WG102_DEBUG_LL_H__ */
diff --git a/arch/mips/boards/qemu-malta/include/board/debug_ll.h b/arch/mips/boards/qemu-malta/include/board/debug_ll.h
deleted file mode 100644
index 5b112b8ae2..0000000000
--- a/arch/mips/boards/qemu-malta/include/board/debug_ll.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com>
- */
-
-#ifndef __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__
-#define __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__
-
-#include <mach/hardware.h>
-
-#define DEBUG_LL_UART_ADDR MALTA_PIIX4_UART0
-#define DEBUG_LL_UART_SHIFT 0
-
-#define DEBUG_LL_UART_CLK 1843200
-#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE
-#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS)
-
-#endif /* __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__ */
diff --git a/arch/mips/mach-ath79/Kconfig b/arch/mips/mach-ath79/Kconfig
index 97eea6a2a2..9dab5fc92a 100644
--- a/arch/mips/mach-ath79/Kconfig
+++ b/arch/mips/mach-ath79/Kconfig
@@ -6,6 +6,9 @@ config SOC_QCA_AR9331
config SOC_QCA_AR9344
bool
+config SOC_QCA_QCA4531
+ bool
+
if DEBUG_LL
choice
prompt "DEBUG_LL driver"
diff --git a/arch/mips/pbl/Makefile b/arch/mips/pbl/Makefile
index 8f9e9fe593..535bb4bf55 100644
--- a/arch/mips/pbl/Makefile
+++ b/arch/mips/pbl/Makefile
@@ -29,7 +29,7 @@ zbarebox-common := $(BAREBOX_PBL_OBJS) $(obj)/$(piggy_o)
zbarebox-lds := $(obj)/zbarebox.lds
quiet_cmd_zbarebox__ ?= LD $@
- cmd_zbarebox__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_zbarebox) -o $@ \
+ cmd_zbarebox__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_zbarebox) -o $@ \
-T $(zbarebox-lds) \
--start-group $(zbarebox-common) --end-group \
$(filter-out $(zbarebox-lds) $(zbarebox-common) FORCE ,$^)