From patchwork Tue Sep 16 23:57:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 37489 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B289720549 for ; Tue, 16 Sep 2014 23:58:18 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf328490lbd.7 for ; Tue, 16 Sep 2014 16:58:17 -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=WF5tUs6edsy5tksPuPNqj89JKzbqnoqRZuuV7YWp5LA=; b=lgAhKJAzKoEeALEl/Z5J6o78Skgeiih3qyRQVtAGfpJHmBWmlJzgh6qMcW7cXzI9vz kPZ6bYge1dBkCzOY+RhRZ6FQql29poJZOnX6oS6RbaetHfZNK1gbVNm6fJSq65vf8r1N +YrboVLgbVjm4YrXMaMRklP9UNxeHYuXA7JnYlGrEzUfOHtRLVDcciEXf67aX8dbIwwd NbxiQ/61TF5E/b3LoNi6PWOLR/+3jb+B2QykNN9Rz/94GZwfkVJdBa9dgNLaiq+OZoGs 7jTgT7v3inAGGlLfkUsLOsbkQnvtdvVWMHJr740Bks7+u3Xw3nHxob/19fFUqmsgjrCM L7Zg== X-Gm-Message-State: ALoCoQml9MDwhrfxIc/o9YxUtko7IQyUG3szlJ4rNh+JbejPzVOAbux96DEaFASNthFuzetzXCfQ X-Received: by 10.180.73.79 with SMTP id j15mr7135118wiv.4.1410911897458; Tue, 16 Sep 2014 16:58:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.165 with SMTP id f5ls62565lam.33.gmail; Tue, 16 Sep 2014 16:58:17 -0700 (PDT) X-Received: by 10.112.161.70 with SMTP id xq6mr38568412lbb.49.1410911897147; Tue, 16 Sep 2014 16:58:17 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by mx.google.com with ESMTPS id we6si26333536lbb.77.2014.09.16.16.58.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Sep 2014 16:58:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by mail-lb0-f172.google.com with SMTP id w7so800908lbi.31 for ; Tue, 16 Sep 2014 16:58:17 -0700 (PDT) X-Received: by 10.152.25.170 with SMTP id d10mr39477986lag.37.1410911897052; Tue, 16 Sep 2014 16:58:17 -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.112.130.169 with SMTP id of9csp489483lbb; Tue, 16 Sep 2014 16:58:16 -0700 (PDT) X-Received: by 10.66.191.200 with SMTP id ha8mr53465709pac.107.1410911894726; Tue, 16 Sep 2014 16:58:14 -0700 (PDT) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by mx.google.com with ESMTPS id xa3si32328800pab.24.2014.09.16.16.58.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Sep 2014 16:58:14 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.220.52 as permitted sender) client-ip=209.85.220.52; Received: by mail-pa0-f52.google.com with SMTP id kq14so835362pab.39 for ; Tue, 16 Sep 2014 16:58:14 -0700 (PDT) X-Received: by 10.68.91.226 with SMTP id ch2mr4684628pbb.153.1410911894017; Tue, 16 Sep 2014 16:58:14 -0700 (PDT) Received: from harvey.bri.st.com.com (70-35-38-154.static.wiline.com. [70.35.38.154]) by mx.google.com with ESMTPSA id st7sm15682757pab.7.2014.09.16.16.58.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Sep 2014 16:58:13 -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 v11 6/9] arm: netx: Migrate DEBUG_LL macros to shared directory Date: Tue, 16 Sep 2014 16:57:54 -0700 Message-Id: <1410911877-24903-7-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1410911877-24903-1-git-send-email-daniel.thompson@linaro.org> References: <1410911877-24903-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.217.172 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 | 16 ++++++++++++++-- .../mach/debug-macro.S => include/debug/netx.S} | 22 +++++++++++----------- 2 files changed, 25 insertions(+), 13 deletions(-) rename arch/arm/{mach-netx/include/mach/debug-macro.S => include/debug/netx.S} (62%) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 6540036..ab5f60b 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -447,6 +447,13 @@ 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 + 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 +1081,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 +1114,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 +1185,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 +1258,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/mach-netx/include/mach/debug-macro.S b/arch/arm/include/debug/netx.S similarity index 62% rename from arch/arm/mach-netx/include/mach/debug-macro.S rename to arch/arm/include/debug/netx.S index 247781e..81e1b2a 100644 --- a/arch/arm/mach-netx/include/mach/debug-macro.S +++ b/arch/arm/include/debug/netx.S @@ -1,5 +1,4 @@ -/* arch/arm/mach-netx/include/mach/debug-macro.S - * +/* * Debugging macro include header * * Copyright (C) 1994-1999 Russell King @@ -11,26 +10,27 @@ * */ -#include "hardware.h" +#define UART_DATA 0 +#define UART_FLAG 0x18 +#define UART_FLAG_BUSY (1 << 3) .macro addruart, rp, rv, tmp - mov \rp, #0x00000a00 - orr \rv, \rp, #io_p2v(0x00100000) @ virtual - orr \rp, \rp, #0x00100000 @ physical + ldr \rp, =CONFIG_DEBUG_UART_PHYS + ldr \rv, =CONFIG_DEBUG_UART_VIRT .endm .macro senduart,rd,rx - str \rd, [\rx, #0] + str \rd, [\rx, #UART_DATA] .endm .macro busyuart,rd,rx -1002: ldr \rd, [\rx, #0x18] - tst \rd, #(1 << 3) +1002: ldr \rd, [\rx, #UART_FLAG] + tst \rd, #UART_FLAG_BUSY bne 1002b .endm .macro waituart,rd,rx -1001: ldr \rd, [\rx, #0x18] - tst \rd, #(1 << 3) +1001: ldr \rd, [\rx, #UART_FLAG] + tst \rd, #UART_FLAG_BUSY bne 1001b .endm