From patchwork Tue Aug 19 14:48:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 35609 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0A235201EF for ; Tue, 19 Aug 2014 14:48:59 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id eu11sf58158984pac.7 for ; Tue, 19 Aug 2014 07:48:59 -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=dX28EyjQSDy76gFd8tyxXkfNXXn0b2stwFbgaCnPK1A=; b=R6TsQ4QYHRGKSQXMvLx/a0nmBBc69jJ0jebNgR01sVaPwAr2pMF7u6RXIGeikxZb3+ PHPUEZglTZPVoJgtgVWYoWF7N1DDkG14/T3UkiwLXToCXtQJzWLNHpts+X5ozCw9/IPl 2qKzXNh2DYMNUD6hYc/IBhENT+S80OYBbN42+lJ3Fqln6FAZy4Mi1+P5ZO/jazQI8V0K XcHLlixV0OCgtfkQ2m5wfs0iPIc2NrHGxjRRtCIXK1q8c+HMy9ILEHC7RBGe9xRrNW/r qXLixsr7SrSzfQtm2QWabmG4qLrv3gz06LoX6GL/lWYQ8EsN9QGLaDRiodLqQaLOb4Jn 3yjw== X-Gm-Message-State: ALoCoQmbTPkmwMaJpksugjJJbNxo8L7pZzJ1Tm+fQzRNz3x+mBiIOEG5WdVW4x2akYWsJko/Xybo X-Received: by 10.66.193.227 with SMTP id hr3mr22651330pac.0.1408459739372; Tue, 19 Aug 2014 07:48:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.84 with SMTP id 78ls2834357qgk.79.gmail; Tue, 19 Aug 2014 07:48:59 -0700 (PDT) X-Received: by 10.220.163.69 with SMTP id z5mr30769155vcx.10.1408459739162; Tue, 19 Aug 2014 07:48:59 -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 cj4si8841571vdd.77.2014.08.19.07.48.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Aug 2014 07:48:59 -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 id10so7457787vcb.21 for ; Tue, 19 Aug 2014 07:48:59 -0700 (PDT) X-Received: by 10.53.6.132 with SMTP id cu4mr707842vdd.62.1408459739053; Tue, 19 Aug 2014 07:48:59 -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 tc5csp244917vcb; Tue, 19 Aug 2014 07:48:58 -0700 (PDT) X-Received: by 10.194.119.41 with SMTP id kr9mr18032056wjb.114.1408459736778; Tue, 19 Aug 2014 07:48:56 -0700 (PDT) Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by mx.google.com with ESMTPS id eb7si22743527wib.80.2014.08.19.07.48.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Aug 2014 07:48:56 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.212.176 as permitted sender) client-ip=209.85.212.176; Received: by mail-wi0-f176.google.com with SMTP id bs8so5546344wib.15 for ; Tue, 19 Aug 2014 07:48:56 -0700 (PDT) X-Received: by 10.180.98.165 with SMTP id ej5mr7157466wib.37.1408459736275; Tue, 19 Aug 2014 07:48:56 -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.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Aug 2014 07:48:55 -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, Greg Ungerer , Arnd Bergmann Subject: [PATCH v8 4/9] arm: ks8695: Migrate debug_ll macros to shared directory Date: Tue, 19 Aug 2014 15:48:30 +0100 Message-Id: <1408459715-10151-5-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 a couple of uart definitions have been copied from of the platform specific header files. Note that, in order to keep oldconfig working nicely we must defer the removal of arch/arm/mach-ks8695/include/mach/debug-macro.S until DEBUG_LL_UART_NONE has been removed. Signed-off-by: Daniel Thompson Cc: Russell King Cc: Greg Ungerer Cc: Arnd Bergmann --- arch/arm/Kconfig.debug | 8 +++++ arch/arm/include/debug/ks8695.S | 40 +++++++++++++++++++++++++ arch/arm/mach-ks8695/include/mach/debug-macro.S | 36 ---------------------- 3 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 arch/arm/include/debug/ks8695.S delete mode 100644 arch/arm/mach-ks8695/include/mach/debug-macro.S diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 9c46729..97c3058 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -348,6 +348,13 @@ choice Say Y here if you want the debug print routines to direct their output to UART1 serial port on KEYSTONE2 devices. + config DEBUG_KS8695_UART + bool "KS8695 Debug UART" + depends on ARCH_KS8695 + help + Say Y here if you want kernel low-level debugging support + on KS8695. + config DEBUG_MMP_UART2 bool "Kernel low-level debugging message via MMP UART2" depends on ARCH_MMP @@ -1017,6 +1024,7 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6Q_UART || \ DEBUG_IMX6SL_UART || \ DEBUG_IMX6SX_UART + default "debug/ks8695.S" if DEBUG_KS8695_UART default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART diff --git a/arch/arm/include/debug/ks8695.S b/arch/arm/include/debug/ks8695.S new file mode 100644 index 0000000..961da1f --- /dev/null +++ b/arch/arm/include/debug/ks8695.S @@ -0,0 +1,40 @@ +/* + * arch/arm/include/debug/ks8695.S + * + * Copyright (C) 2006 Ben Dooks + * Copyright (C) 2006 Simtec Electronics + * + * KS8695 - Debug macros + * + * 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 KS8695_UART_PA 0x03ffe000 +#define KS8695_UART_VA 0xf00fe000 +#define KS8695_URTH (0x04) +#define KS8695_URLS (0x14) +#define URLS_URTE (1 << 6) +#define URLS_URTHRE (1 << 5) + + .macro addruart, rp, rv, tmp + ldr \rp, =KS8695_UART_PA @ physical base address + ldr \rv, =KS8695_UART_VA @ virtual base address + .endm + + .macro senduart, rd, rx + str \rd, [\rx, #KS8695_URTH] @ Write to Transmit Holding Register + .endm + + .macro busyuart, rd, rx +1001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register + tst \rd, #URLS_URTE @ Holding & Shift registers empty? + beq 1001b + .endm + + .macro waituart, rd, rx +1001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register + tst \rd, #URLS_URTHRE @ Holding Register empty? + beq 1001b + .endm diff --git a/arch/arm/mach-ks8695/include/mach/debug-macro.S b/arch/arm/mach-ks8695/include/mach/debug-macro.S deleted file mode 100644 index a79e489..0000000 --- a/arch/arm/mach-ks8695/include/mach/debug-macro.S +++ /dev/null @@ -1,36 +0,0 @@ -/* - * arch/arm/mach-ks8695/include/mach/debug-macro.S - * - * Copyright (C) 2006 Ben Dooks - * Copyright (C) 2006 Simtec Electronics - * - * KS8695 - Debug macros - * - * 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 -#include - - .macro addruart, rp, rv, tmp - ldr \rp, =KS8695_UART_PA @ physical base address - ldr \rv, =KS8695_UART_VA @ virtual base address - .endm - - .macro senduart, rd, rx - str \rd, [\rx, #KS8695_URTH] @ Write to Transmit Holding Register - .endm - - .macro busyuart, rd, rx -1001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register - tst \rd, #URLS_URTE @ Holding & Shift registers empty? - beq 1001b - .endm - - .macro waituart, rd, rx -1001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register - tst \rd, #URLS_URTHRE @ Holding Register empty? - beq 1001b - .endm