From patchwork Tue Aug 19 14:48:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 35612 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f200.google.com (mail-ig0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A3508202E4 for ; Tue, 19 Aug 2014 14:49:02 +0000 (UTC) Received: by mail-ig0-f200.google.com with SMTP id uq10sf29836234igb.7 for ; Tue, 19 Aug 2014 07:49:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=FP5Qu9NK+/s5lKNy2Ucu0ym7CPXCwqbg8p2ThkZ/rDI=; b=OGn4uniQblHLEW9IMW+Z4XG73VRTPNHee7Dif9jEM0Crx+pkxQ6t4fz9BtJ809q69u g1muvKOTu7uy8iMw9vNPxRD+UD6YaUqPXqKnCdHLJaTfLo98gGXEStJQZRqidfc2rmcl 9FvGsbFSD+CbUUVLKQk5xABpAlLMXIGE1Rwk1KT9o4/n4LM4anGs2kZ3u243pb1fDRHa x8sr111Cd2aOTqnKOMjTdV6wYXN5XBDipWPWuR6RMM+aaaQLDaqGKmou25LFjdGleNQ7 0gYFjtjhXj+HPPcr7dxOMKxLBzYOMa+s+DNzIcIIjq1m2jKchyP+L37xtE6FOzSh6j4U i41w== X-Gm-Message-State: ALoCoQnf4q1/r56ftFed78KazF/71/Mm3YMlhK5fvqWprzFKLKysPU095r8notBiwX9CP+gLqiTB X-Received: by 10.42.212.207 with SMTP id gt15mr1153474icb.31.1408459742242; Tue, 19 Aug 2014 07:49:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.90.47 with SMTP id w44ls2781977qgd.56.gmail; Tue, 19 Aug 2014 07:49:02 -0700 (PDT) X-Received: by 10.52.156.100 with SMTP id wd4mr5687154vdb.39.1408459742117; Tue, 19 Aug 2014 07:49:02 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id 20si8847141vdb.67.2014.08.19.07.49.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Aug 2014 07:49:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id id10so7386348vcb.7 for ; Tue, 19 Aug 2014 07:49:02 -0700 (PDT) X-Received: by 10.53.3.169 with SMTP id bx9mr542201vdd.80.1408459742031; Tue, 19 Aug 2014 07:49:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp244921vcb; Tue, 19 Aug 2014 07:49:01 -0700 (PDT) X-Received: by 10.194.78.4 with SMTP id x4mr51474787wjw.44.1408459740813; Tue, 19 Aug 2014 07:49:00 -0700 (PDT) Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) by mx.google.com with ESMTPS id i18si20605778wjn.106.2014.08.19.07.48.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Aug 2014 07:49:00 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 74.125.82.170 as permitted sender) client-ip=74.125.82.170; Received: by mail-we0-f170.google.com with SMTP id w62so6594137wes.15 for ; Tue, 19 Aug 2014 07:48:59 -0700 (PDT) X-Received: by 10.180.39.172 with SMTP id q12mr7203544wik.55.1408459739541; Tue, 19 Aug 2014 07:48:59 -0700 (PDT) Received: from sundance.lan (cpc4-aztw19-0-0-cust157.18-1.cable.virginm.net. [82.33.25.158]) by mx.google.com with ESMTPSA id a11sm50949114wjx.46.2014.08.19.07.48.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Aug 2014 07:48:58 -0700 (PDT) From: Daniel Thompson To: Russell King Cc: Daniel Thompson , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, spear-devel@list.st.com, Arnd Bergmann , Paul Bolle , patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [PATCH v8 6/9] arm: netx: Migrate DEBUG_LL macros to shared directory Date: Tue, 19 Aug 2014 15:48:32 +0100 Message-Id: <1408459715-10151-7-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1408459715-10151-1-git-send-email-daniel.thompson@linaro.org> References: <1404127855-30459-1-git-send-email-daniel.thompson@linaro.org> <1408459715-10151-1-git-send-email-daniel.thompson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , As part of the migration we introduce DEBUG_UART_PHYS/DEBUG_UART_VIRT which default to UART1 but allow a user to configure UART2 or UART3. We also introduce symbolic names for the registers and flags. Signed-off-by: Daniel Thompson Cc: Russell King Acked-by: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/Kconfig.debug | 17 +++++++++++-- arch/arm/include/debug/netx.S | 36 +++++++++++++++++++++++++++ arch/arm/mach-netx/include/mach/debug-macro.S | 36 --------------------------- 3 files changed, 51 insertions(+), 38 deletions(-) create mode 100644 arch/arm/include/debug/netx.S delete mode 100644 arch/arm/mach-netx/include/mach/debug-macro.S diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 01f4ee2..d71427e 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -447,6 +447,14 @@ choice Say Y here if you want kernel low-level debugging support on Vybrid based platforms. + config DEBUG_NETX_UART + bool "Kernel low-level debugging messages via NetX UART" + depends on ARCH_NETX + select DEBUG_UART_NETX + help + Say Y here if you want kernel low-level debugging support + on Hilscher NetX based platforms. + config DEBUG_NOMADIK_UART bool "Kernel low-level debugging messages via NOMADIK UART" depends on ARCH_NOMADIK @@ -1074,6 +1082,7 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6SX_UART default "debug/ks8695.S" if DEBUG_KS8695_UART default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM + default "debug/netx.S" if DEBUG_NETX_UART default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART default "debug/s5pv210.S" if DEBUG_S5PV210_UART @@ -1106,6 +1115,7 @@ config DEBUG_UART_8250 config DEBUG_UART_PHYS hex "Physical base address of debug UART" + default 0x00100a00 if DEBUG_NETX_UART default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0 default 0x01c28000 if DEBUG_SUNXI_UART0 default 0x01c28400 if DEBUG_SUNXI_UART1 @@ -1176,10 +1186,12 @@ config DEBUG_UART_PHYS depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_LL_UART_EFM32 || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART + DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ + DEBUG_S3C24XX_UART config DEBUG_UART_VIRT hex "Virtual base address of debug UART" + default 0xe0000a00 if DEBUG_NETX_UART default 0xe0010fe0 if ARCH_RPC default 0xe1000000 if DEBUG_MSM_UART default 0xf0000be0 if ARCH_EBSA110 @@ -1247,7 +1259,8 @@ config DEBUG_UART_VIRT default DEBUG_UART_PHYS if !MMU depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART + DEBUG_MSM_UART || DEBUG_NETX_UART || DEBUG_QCOM_UARTDM || \ + DEBUG_S3C24XX_UART config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART" diff --git a/arch/arm/include/debug/netx.S b/arch/arm/include/debug/netx.S new file mode 100644 index 0000000..cf7522a --- /dev/null +++ b/arch/arm/include/debug/netx.S @@ -0,0 +1,36 @@ +/* + * Debugging macro include header + * + * Copyright (C) 1994-1999 Russell King + * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks + * + * 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. + * +*/ + +#define UART_DATA 0 +#define UART_FLAG 0x18 +#define UART_FLAG_BUSY (1 << 3) + + .macro addruart, rp, rv, tmp + ldr \rp, =CONFIG_DEBUG_UART_PHYS + ldr \rp, =CONFIG_DEBUG_UART_VIRT + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #UART_DATA] + .endm + + .macro busyuart,rd,rx +1002: ldr \rd, [\rx, #UART_FLAG] + tst \rd, #UART_FLAG_BUSY + bne 1002b + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #UART_FLAG] + tst \rd, #UART_FLAG_BUSY + bne 1001b + .endm diff --git a/arch/arm/mach-netx/include/mach/debug-macro.S b/arch/arm/mach-netx/include/mach/debug-macro.S deleted file mode 100644 index 247781e..0000000 --- a/arch/arm/mach-netx/include/mach/debug-macro.S +++ /dev/null @@ -1,36 +0,0 @@ -/* arch/arm/mach-netx/include/mach/debug-macro.S - * - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * 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. - * -*/ - -#include "hardware.h" - - .macro addruart, rp, rv, tmp - mov \rp, #0x00000a00 - orr \rv, \rp, #io_p2v(0x00100000) @ virtual - orr \rp, \rp, #0x00100000 @ physical - .endm - - .macro senduart,rd,rx - str \rd, [\rx, #0] - .endm - - .macro busyuart,rd,rx -1002: ldr \rd, [\rx, #0x18] - tst \rd, #(1 << 3) - bne 1002b - .endm - - .macro waituart,rd,rx -1001: ldr \rd, [\rx, #0x18] - tst \rd, #(1 << 3) - bne 1001b - .endm