From patchwork Thu Mar 21 11:49:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 15461 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 951DD23E10 for ; Thu, 21 Mar 2013 11:50:05 +0000 (UTC) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by fiordland.canonical.com (Postfix) with ESMTP id 32D16A18F5E for ; Thu, 21 Mar 2013 11:50:05 +0000 (UTC) Received: by mail-ve0-f173.google.com with SMTP id oz10so2318550veb.18 for ; Thu, 21 Mar 2013 04:50:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:mime-version:content-type:x-gm-message-state; bh=Vb+HY452THqjRSAmiNwD5eAf6oyjlkq8jneFhGuqTCo=; b=T70erHi2cbXOolr6HkJhZCdUZbh+ZO6zZHVGPlhAif7YRLupUo/JQ4xgtBp7+INfiN uxrEThR1EgucDhJAfZAndu6mZJMzn5saMyYXQQf5y+6mk/puSOHAEHuGJy1dOOUaI0z9 54ssM0//YWzzD25/f+grmOHNI2Nj6UaT8en2ENV0Ybd/UW3UirEYj4G6nFt9r8D/Lofw 21Myjl0r9gzykl6zHpKTJWtrtBAq/JVCQX0PONysjTdVtyw5FxxyqUncVUwmOjkX6+zN bPLeEEswQDcQwUKB/FXgEWflh/vDbq7jWXt1X9onqmfNTKwxLEJz2CGcFhMh2+qz0RJj 9qlw== X-Received: by 10.59.3.9 with SMTP id bs9mr12912149ved.38.1363866604716; Thu, 21 Mar 2013 04:50:04 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.233.198 with SMTP id ty6csp56565vec; Thu, 21 Mar 2013 04:50:04 -0700 (PDT) X-Received: by 10.194.109.136 with SMTP id hs8mr16760573wjb.8.1363866603666; Thu, 21 Mar 2013 04:50:03 -0700 (PDT) Received: from eu1sys200aog108.obsmtp.com (eu1sys200aog108.obsmtp.com [207.126.144.125]) by mx.google.com with SMTP id f9si8343520eep.35.2013.03.21.04.49.59 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 21 Mar 2013 04:50:03 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.125 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.125; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.125 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob108.postini.com ([207.126.147.11]) with SMTP ID DSNKUUrz5yWu8ZczcFCGHXrrbMN46RbG7UVu@postini.com; Thu, 21 Mar 2013 11:50:03 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4E7E8ED; Thu, 21 Mar 2013 11:49:31 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C7EBD4C26; Thu, 21 Mar 2013 11:49:30 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 00449A8065; Thu, 21 Mar 2013 12:49:26 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.279.5; Thu, 21 Mar 2013 12:49:30 +0100 From: Linus Walleij To: , Arnd Bergmann Cc: Linus Walleij Subject: [PATCH 1/6] ARM: ux500: move debugmacro to debug includes Date: Thu, 21 Mar 2013 12:49:08 +0100 Message-ID: <1363866553-15054-2-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 In-Reply-To: <1363866553-15054-1-git-send-email-linus.walleij@stericsson.com> References: <1363866553-15054-1-git-send-email-linus.walleij@stericsson.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnH1w2OP2CELMr1Q9PtyTNV7xuU6pYn2vviPY/kBhs5LHkbOFGaiBmoAryGKwA/Hm90F3nE From: Linus Walleij This moves the Ux500 debug macro to the debug headers to make way for multiplatform support. Signed-off-by: Linus Walleij --- arch/arm/Kconfig.debug | 8 ++++++ arch/arm/include/debug/ux500.S | 39 ++++++++++++++++++++++++++ arch/arm/mach-ux500/include/mach/debug-macro.S | 39 -------------------------- 3 files changed, 47 insertions(+), 39 deletions(-) create mode 100644 arch/arm/include/debug/ux500.S delete mode 100644 arch/arm/mach-ux500/include/mach/debug-macro.S diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index acdddda..a7b6f8b 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -414,6 +414,13 @@ choice Say Y here if you want the debug print routines to direct their output to the uart1 port on SiRFmarco devices. + config DEBUG_UX500_UART + depends on ARCH_U8500 + bool "Use Ux500 UART for low-level debug" + help + Say Y here if you want kernel low-level debugging support + on Ux500 based platforms. + config DEBUG_VEXPRESS_UART0_DETECT bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" depends on ARCH_VEXPRESS && CPU_CP15_MMU @@ -598,6 +605,7 @@ config DEBUG_LL_INCLUDE DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 default "debug/vt8500.S" if DEBUG_VT8500_UART0 default "debug/tegra.S" if DEBUG_TEGRA_UART + default "debug/ux500.S" if DEBUG_UX500_UART default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 default "mach/debug-macro.S" diff --git a/arch/arm/include/debug/ux500.S b/arch/arm/include/debug/ux500.S new file mode 100644 index 0000000..6703522 --- /dev/null +++ b/arch/arm/include/debug/ux500.S @@ -0,0 +1,39 @@ +/* + * Debugging macro include header + * + * Copyright (C) 2009 ST-Ericsson + * + * 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 + +#if CONFIG_UX500_DEBUG_UART > 2 +#error Invalid Ux500 debug UART +#endif + +/* + * DEBUG_LL only works if only one SOC is built in. We don't use #else below + * in order to get "__UX500_UART redefined" warnings if more than one SOC is + * built, so that there's some hint during the build that something is wrong. + */ + +#ifdef CONFIG_UX500_SOC_DB8500 +#define __UX500_UART(n) U8500_UART##n##_BASE +#endif + +#ifndef __UX500_UART +#error Unknown SOC +#endif + +#define UX500_UART(n) __UX500_UART(n) +#define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART) + + .macro addruart, rp, rv, tmp + ldr \rp, =UART_BASE @ no, physical address + ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address + .endm + +#include diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S deleted file mode 100644 index 6703522..0000000 --- a/arch/arm/mach-ux500/include/mach/debug-macro.S +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Debugging macro include header - * - * Copyright (C) 2009 ST-Ericsson - * - * 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 - -#if CONFIG_UX500_DEBUG_UART > 2 -#error Invalid Ux500 debug UART -#endif - -/* - * DEBUG_LL only works if only one SOC is built in. We don't use #else below - * in order to get "__UX500_UART redefined" warnings if more than one SOC is - * built, so that there's some hint during the build that something is wrong. - */ - -#ifdef CONFIG_UX500_SOC_DB8500 -#define __UX500_UART(n) U8500_UART##n##_BASE -#endif - -#ifndef __UX500_UART -#error Unknown SOC -#endif - -#define UX500_UART(n) __UX500_UART(n) -#define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART) - - .macro addruart, rp, rv, tmp - ldr \rp, =UART_BASE @ no, physical address - ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address - .endm - -#include