summaryrefslogtreecommitdiffstats
path: root/arch/mips/mach-ath79
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-01-15 13:43:01 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-15 13:43:01 +0100
commitcbc25b2b8488452085d3195dfc7164b00a265364 (patch)
tree41a9dd36d0115407c11c001899ea28fa807ad82b /arch/mips/mach-ath79
parentbc099cbdb0e1c70fe220b88754e07e002c9c5511 (diff)
parent3d347644f53873b93dd85752e039f7a95a3e175a (diff)
downloadbarebox-cbc25b2b8488452085d3195dfc7164b00a265364.tar.gz
barebox-cbc25b2b8488452085d3195dfc7164b00a265364.tar.xz
Merge branch 'for-next/mips'
Diffstat (limited to 'arch/mips/mach-ath79')
-rw-r--r--arch/mips/mach-ath79/Kconfig16
-rw-r--r--arch/mips/mach-ath79/bbu.c10
-rw-r--r--arch/mips/mach-ath79/include/mach/ar71xx_regs.h5
-rw-r--r--arch/mips/mach-ath79/include/mach/ath79.h5
-rw-r--r--arch/mips/mach-ath79/include/mach/debug_ll.h26
-rw-r--r--arch/mips/mach-ath79/include/mach/debug_ll_ar9331.h16
-rw-r--r--arch/mips/mach-ath79/include/mach/debug_ll_ar9344.h18
-rw-r--r--arch/mips/mach-ath79/include/mach/pbl_macros.h5
-rw-r--r--arch/mips/mach-ath79/reset.c14
9 files changed, 33 insertions, 82 deletions
diff --git a/arch/mips/mach-ath79/Kconfig b/arch/mips/mach-ath79/Kconfig
index e4e10a2f65..4bc1d88b4e 100644
--- a/arch/mips/mach-ath79/Kconfig
+++ b/arch/mips/mach-ath79/Kconfig
@@ -10,8 +10,18 @@ config SOC_QCA_AR9331
config SOC_QCA_AR9344
bool
+if DEBUG_LL
choice
- prompt "Board type"
+ prompt "DEBUG_LL driver"
+
+config DEBUG_AR9331_UART
+ bool "AR9331 Debug UART"
+
+config DEBUG_AR9344_UART
+ bool "AR9344 Debug UART"
+
+endchoice
+endif # DEBUG_LL
config BOARD_8DEVICES_LIMA
bool "8devices LIMA"
@@ -19,7 +29,6 @@ config BOARD_8DEVICES_LIMA
select HAVE_PBL_IMAGE
select HAVE_IMAGE_COMPRESSION
select HAS_NMON
- select HAS_NO_BOARD_HL_CODE
config BOARD_DPTECHNICS_DPT_MODULE
bool "DPTechnics DPT-Module"
@@ -27,7 +36,6 @@ config BOARD_DPTECHNICS_DPT_MODULE
select HAVE_PBL_IMAGE
select HAVE_IMAGE_COMPRESSION
select HAS_NMON
- select HAS_NO_BOARD_HL_CODE
config BOARD_TPLINK_MR3020
bool "TP-LINK MR3020"
@@ -50,6 +58,4 @@ config BOARD_BLACK_SWIFT
select HAVE_IMAGE_COMPRESSION
select HAS_NMON
-endchoice
-
endif
diff --git a/arch/mips/mach-ath79/bbu.c b/arch/mips/mach-ath79/bbu.c
index 701b5752e8..0f64e6195a 100644
--- a/arch/mips/mach-ath79/bbu.c
+++ b/arch/mips/mach-ath79/bbu.c
@@ -1,14 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2017 Oleksij Rempel <linux@rempel-privat.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#include <common.h>
diff --git a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
index f73700b5b9..f7737d682b 100644
--- a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
+++ b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Atheros AR71XX/AR724X/AR913X SoC register definitions
*
@@ -6,10 +7,6 @@
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
*
* Parts of this file are based on Atheros' 2.6.15/2.6.31 BSP
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
*/
#ifndef __ASM_MACH_AR71XX_REGS_H
diff --git a/arch/mips/mach-ath79/include/mach/ath79.h b/arch/mips/mach-ath79/include/mach/ath79.h
index ff53406fb0..206bd2289b 100644
--- a/arch/mips/mach-ath79/include/mach/ath79.h
+++ b/arch/mips/mach-ath79/include/mach/ath79.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Atheros AR71XX/AR724X/AR913X common definitions
*
@@ -5,10 +6,6 @@
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
*
* Parts of this file are based on Atheros' 2.6.15 BSP
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
*/
#ifndef __ASM_MACH_ATH79_H
diff --git a/arch/mips/mach-ath79/include/mach/debug_ll.h b/arch/mips/mach-ath79/include/mach/debug_ll.h
index 73d064a3a0..67691f13b6 100644
--- a/arch/mips/mach-ath79/include/mach/debug_ll.h
+++ b/arch/mips/mach-ath79/include/mach/debug_ll.h
@@ -1,27 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com>
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
*/
#ifndef __MACH_ATH79_DEBUG_LL__
#define __MACH_ATH79_DEBUG_LL__
-#if defined(CONFIG_SOC_QCA_AR9331)
+#ifdef CONFIG_DEBUG_LL
+
+#ifdef CONFIG_DEBUG_AR9331_UART
#include <mach/debug_ll_ar9331.h>
-#elif defined(CONFIG_SOC_QCA_AR9344)
+#elif defined CONFIG_DEBUG_AR9344_UART
#include <mach/debug_ll_ar9344.h>
+#else
+#error "unknown ath79 debug uart soc type"
#endif
+#else
+#define debug_ll_ath79_init
+#endif /* CONFIG_DEBUG_LL */
+
#endif /* __MACH_AR9344_DEBUG_LL_H__ */
diff --git a/arch/mips/mach-ath79/include/mach/debug_ll_ar9331.h b/arch/mips/mach-ath79/include/mach/debug_ll_ar9331.h
index 04bd3ea72b..cd32e2d1d1 100644
--- a/arch/mips/mach-ath79/include/mach/debug_ll_ar9331.h
+++ b/arch/mips/mach-ath79/include/mach/debug_ll_ar9331.h
@@ -1,18 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* based on linux.git/drivers/tty/serial/ar933x_uart.c
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
*/
#ifndef __AR933X_DEBUG_LL__
@@ -81,7 +69,7 @@ static inline void PUTC_LL(int ch)
#define AR933X_UART_CLOCK_REG 0x08
#define CLOCK_REG ((KSEG1 | AR933X_UART_BASE) | AR933X_UART_CLOCK_REG)
-.macro debug_ll_ar9331_init
+.macro debug_ll_ath79_init
#ifdef CONFIG_DEBUG_LL
pbl_reg_writel ((AR933X_UART_CS_IF_MODE_DCE << AR933X_UART_CS_IF_MODE_S) \
diff --git a/arch/mips/mach-ath79/include/mach/debug_ll_ar9344.h b/arch/mips/mach-ath79/include/mach/debug_ll_ar9344.h
index d156ce9f39..96ac08bb56 100644
--- a/arch/mips/mach-ath79/include/mach/debug_ll_ar9344.h
+++ b/arch/mips/mach-ath79/include/mach/debug_ll_ar9344.h
@@ -1,26 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2017 Oleksij Rempel <o.rempel@pengutronix.de>
* Copyright (C) 2012, 2013 Antony Pavlov <antonynpavlov@gmail.com>
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
*/
#ifndef __AR9344_DEBUG_LL__
#define __AR9344_DEBUG_LL__
+#include <asm/asm.h>
#include <asm/addrspace.h>
#include <mach/ar71xx_regs.h>
+#include <asm/regdef.h>
#define DEBUG_LL_UART_ADDR KSEG1ADDR(AR934X_UART0_BASE)
#define DEBUG_LL_UART_SHIFT AR934X_UART0_SHIFT
@@ -66,7 +56,7 @@ static inline void PUTC_LL(char ch)
* Macros for use in assembly language code
*/
-.macro debug_ll_ar9344_init
+.macro debug_ll_ath79_init
#ifdef CONFIG_DEBUG_LL
/* find out the ref clock */
diff --git a/arch/mips/mach-ath79/include/mach/pbl_macros.h b/arch/mips/mach-ath79/include/mach/pbl_macros.h
index 906d73e8c7..70736b3680 100644
--- a/arch/mips/mach-ath79/include/mach/pbl_macros.h
+++ b/arch/mips/mach-ath79/include/mach/pbl_macros.h
@@ -393,13 +393,10 @@ skip_pll_ram_config:
dcache_enable
pbl_ar9331_uart_enable
- debug_ll_ar9331_init
- mips_nmon
+ debug_ll_ath79_init
pbl_ar9331_mdio_gpio_enable
- copy_to_link_location pbl_start
-
.set pop
.endm
diff --git a/arch/mips/mach-ath79/reset.c b/arch/mips/mach-ath79/reset.c
index 0665788227..b756c859d8 100644
--- a/arch/mips/mach-ath79/reset.c
+++ b/arch/mips/mach-ath79/reset.c
@@ -1,18 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2013 Du Huanpeng <u74147@gmail.com>
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
*/
#include <common.h>