From patchwork Mon Jan 5 12:40:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 42739 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5F30526670 for ; Mon, 5 Jan 2015 12:42:17 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id w7sf12035228lbi.8 for ; Mon, 05 Jan 2015 04:42:16 -0800 (PST) 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=kDSQ4+X64eo93tfNsBpfNNxfoCCHlMnhp1KL6KZDkzE=; b=BLzYYeSoSzcApPAgn59zwb8B7ZdoRF8SBmtLbzmFHcO6jThQsPYjBF/8j3ts7Nqr/+ 20yqOKG00ija4/rPNQrhEcwFtzkRXG8q2+GtYJ+yaJwdnDrLiaXUunpb7xAw1a1gZ4zg zeYhhi29Kbb4vkA88JH2WUxJL0uWkXA2kHaBFdVkae9fwr1GS8FkjhrxW4BDuW3UGoiK yAwyqjN0r5lqS5Z4hLainkIhIiuVsDKGVQWBPfSFpa8DSTEiwy8BtLPZIrhgvG5ddGl9 aOglSZHUHs3kg/buo3PI8l/boBySySQ+5OGKDEtUIaQcyHmew45audZpZ51mWO4mffdl VjNQ== X-Gm-Message-State: ALoCoQmb+f3RjLEfiJgpntZaYPyx8hLk/t95C5o9Kv7SoCgFz9m2KTTanAdLPVfDfFwEVq9UZWMB X-Received: by 10.180.77.167 with SMTP id t7mr1450036wiw.6.1420461736328; Mon, 05 Jan 2015 04:42:16 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.137 with SMTP id 9ls1911260lau.26.gmail; Mon, 05 Jan 2015 04:42:16 -0800 (PST) X-Received: by 10.112.98.99 with SMTP id eh3mr90477194lbb.32.1420461736108; Mon, 05 Jan 2015 04:42:16 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id o8si61599215laj.121.2015.01.05.04.42.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 05 Jan 2015 04:42:16 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id gd6so18375721lab.17 for ; Mon, 05 Jan 2015 04:42:16 -0800 (PST) X-Received: by 10.152.115.146 with SMTP id jo18mr86157392lab.9.1420461735934; Mon, 05 Jan 2015 04:42:15 -0800 (PST) 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.9.200 with SMTP id c8csp870149lbb; Mon, 5 Jan 2015 04:42:15 -0800 (PST) X-Received: by 10.194.48.109 with SMTP id k13mr181960579wjn.7.1420461733473; Mon, 05 Jan 2015 04:42:13 -0800 (PST) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com. [209.85.212.178]) by mx.google.com with ESMTPS id u5si16108452wix.101.2015.01.05.04.42.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 05 Jan 2015 04:42:13 -0800 (PST) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.212.178 as permitted sender) client-ip=209.85.212.178; Received: by mail-wi0-f178.google.com with SMTP id em10so3165299wid.5 for ; Mon, 05 Jan 2015 04:42:13 -0800 (PST) X-Received: by 10.194.108.9 with SMTP id hg9mr175950272wjb.68.1420461733172; Mon, 05 Jan 2015 04:42:13 -0800 (PST) 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 ep9sm9796927wid.3.2015.01.05.04.42.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jan 2015 04:42:12 -0800 (PST) From: Daniel Thompson To: Russell King , Arnd Bergmann Cc: Daniel Thompson , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, spear-devel@list.st.com, Paul Bolle , Srinivas Kandagatla , John Stultz , Sumit Semwal , patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [PATCH 3.19-rc2 v15 6/8] arm: netx: Migrate DEBUG_LL macros to shared directory Date: Mon, 5 Jan 2015 12:40:22 +0000 Message-Id: <1420461624-4410-7-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1420461624-4410-1-git-send-email-daniel.thompson@linaro.org> References: <1420461624-4410-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.215.44 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 ec25d746b4dd..ff43ea38fe1f 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -503,6 +503,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 @@ -1231,6 +1238,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/renesas-scif.S" if DEBUG_R7S72100_SCIF2 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN1_SCIF0 @@ -1276,6 +1284,7 @@ config DEBUG_UART_BCM63XX 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 @@ -1364,7 +1373,8 @@ 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_MESON_UARTAO || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_R7S72100_SCIF2 || \ + DEBUG_MSM_UART || DEBUG_NETX_UART || \ + DEBUG_QCOM_UARTDM || DEBUG_R7S72100_SCIF2 || \ DEBUG_RCAR_GEN1_SCIF0 || DEBUG_RCAR_GEN1_SCIF2 || \ DEBUG_RCAR_GEN2_SCIF0 || DEBUG_RCAR_GEN2_SCIF2 || \ DEBUG_RMOBILE_SCIFA0 || DEBUG_RMOBILE_SCIFA1 || \ @@ -1373,6 +1383,7 @@ config DEBUG_UART_PHYS 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 @@ -1449,7 +1460,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_MESON_UARTAO || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ + DEBUG_MSM_UART || DEBUG_NETX_UART || \ + DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ DEBUG_UART_BCM63XX || DEBUG_ASM9260_UART config DEBUG_UART_8250_SHIFT 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 247781e096e2..81e1b2af70f7 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