From patchwork Wed Jul 16 10:31:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 33723 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E0419201F1 for ; Wed, 16 Jul 2014 10:31:54 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf4189352oag.0 for ; Wed, 16 Jul 2014 03:31:54 -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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=maLNqsP/ERxiFFmSe1Gnee5H014y71VK0qcCd55uCZs=; b=J+wen+G/6fJrMefXm2XITb/IeaIJ96VOfZOkftyxpyeK11yLso0FONn/X4xGk33aOo KYEjp5/OpJ+PPC1eW/dUKsUJwgzfA7LduiR3G/8yL69V9v7joetPc1wQmXDagECzEaZo myuoTDB+bmnMvu3b/8vK40w2kZ+4wtqNh825jW83dutd3gE2qb3Q+BVSl4ngdRonOK4j dTd2HeMnVa9GirrL6VnSlGHcGudyQOXVZzF6IV3+F/Rz1hAiFO+yHNeXX+i1ZA0Pwuyj 7LwxtYQQYhuc6hceiH9RdylwW8FycN3wA+7HdUmzkeExdkTxbNMZ33bZOBFUoH3i92yv tYsA== X-Gm-Message-State: ALoCoQmmhM3RAv94p3ovFH4yg9jw1POxtB0RRPcorR/XbnV6jxJZmLHJZqnd1rTS3qI85sJxzcnV X-Received: by 10.182.166.36 with SMTP id zd4mr14240713obb.43.1405506714489; Wed, 16 Jul 2014 03:31:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.81 with SMTP id w75ls22785qgw.35.gmail; Wed, 16 Jul 2014 03:31:54 -0700 (PDT) X-Received: by 10.52.166.10 with SMTP id zc10mr5290341vdb.61.1405506714408; Wed, 16 Jul 2014 03:31:54 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id vi8si297313vec.97.2014.07.16.03.31.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Jul 2014 03:31:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id id10so1188052vcb.38 for ; Wed, 16 Jul 2014 03:31:54 -0700 (PDT) X-Received: by 10.52.248.146 with SMTP id ym18mr23170298vdc.8.1405506714333; Wed, 16 Jul 2014 03:31:54 -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 tc5csp285961vcb; Wed, 16 Jul 2014 03:31:53 -0700 (PDT) X-Received: by 10.180.182.131 with SMTP id ee3mr12161494wic.37.1405506712582; Wed, 16 Jul 2014 03:31:52 -0700 (PDT) Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by mx.google.com with ESMTPS id f15si23390173wjr.124.2014.07.16.03.31.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Jul 2014 03:31:52 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 74.125.82.177 as permitted sender) client-ip=74.125.82.177; Received: by mail-we0-f177.google.com with SMTP id w62so661963wes.8 for ; Wed, 16 Jul 2014 03:31:51 -0700 (PDT) X-Received: by 10.194.90.201 with SMTP id by9mr26307495wjb.94.1405506711598; Wed, 16 Jul 2014 03:31:51 -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 ut2sm31478924wjc.49.2014.07.16.03.31.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jul 2014 03:31:50 -0700 (PDT) From: Daniel Thompson To: Russell King Cc: Daniel Thompson , linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Greg Ungerer , Arnd Bergmann Subject: [PATCH] arm: ks8695: Migrate debug_ll macros to shared directory Date: Wed, 16 Jul 2014 11:31:07 +0100 Message-Id: <1405506667-4649-1-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 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.179 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 --- Notes: This is a contribution towards the removal of DEBUG_LL_UART_NONE, see http://thread.gmane.org/gmane.linux.kernel/1712068/focus=1746065 for details. arch/arm/Kconfig.debug | 8 ++++++++ arch/arm/include/debug/ks8695.S | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 arch/arm/include/debug/ks8695.S diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 8f90595..6f9664a 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -340,6 +340,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 @@ -1006,6 +1013,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