From patchwork Thu Mar 25 21:43:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Chemparathy X-Patchwork-Id: 88381 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2PLnYYf004240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Mar 2010 21:50:10 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o2PLmLNH024389 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Mar 2010 16:48:21 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o2PLmIiq015733; Thu, 25 Mar 2010 16:48:19 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id E9DB680637; Thu, 25 Mar 2010 15:48:11 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dlep34.itg.ti.com (dlep34.itg.ti.com [157.170.170.115]) by linux.omap.com (Postfix) with ESMTP id 622DA8062F for ; Thu, 25 Mar 2010 15:44:06 -0600 (CST) Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o2PLi3TW011355; Thu, 25 Mar 2010 16:44:03 -0500 (CDT) Received: from gtloginvm01.gt.design.ti.com (gtloginvm01.gt.design.ti.com [158.218.108.144]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o2PLi2Z27876; Thu, 25 Mar 2010 16:44:02 -0500 (CDT) Received: from gtloginvm01.gt.design.ti.com (localhost.localdomain [127.0.0.1]) by gtloginvm01.gt.design.ti.com (8.13.1/8.13.1) with ESMTP id o2PLi2Jx015148; Thu, 25 Mar 2010 17:44:02 -0400 Received: (from a0875269@localhost) by gtloginvm01.gt.design.ti.com (8.13.1/8.13.1/Submit) id o2PLi2J3015145; Thu, 25 Mar 2010 17:44:02 -0400 From: Cyril Chemparathy To: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH v2 13/16] Davinci: simplified debug macros Date: Thu, 25 Mar 2010 17:43:56 -0400 Message-Id: <1269553439-14886-14-git-send-email-cyril@ti.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1269553439-14886-13-git-send-email-cyril@ti.com> References: <1269553439-14886-1-git-send-email-cyril@ti.com> <1269553439-14886-2-git-send-email-cyril@ti.com> <1269553439-14886-3-git-send-email-cyril@ti.com> <1269553439-14886-4-git-send-email-cyril@ti.com> <1269553439-14886-5-git-send-email-cyril@ti.com> <1269553439-14886-6-git-send-email-cyril@ti.com> <1269553439-14886-7-git-send-email-cyril@ti.com> <1269553439-14886-8-git-send-email-cyril@ti.com> <1269553439-14886-9-git-send-email-cyril@ti.com> <1269553439-14886-10-git-send-email-cyril@ti.com> <1269553439-14886-11-git-send-email-cyril@ti.com> <1269553439-14886-12-git-send-email-cyril@ti.com> <1269553439-14886-13-git-send-email-cyril@ti.com> Cc: sshtylyov@mvista.com X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 25 Mar 2010 21:50:10 +0000 (UTC) diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S index 3cd93a8..b8b47a4 100644 --- a/arch/arm/mach-davinci/include/mach/debug-macro.S +++ b/arch/arm/mach-davinci/include/mach/debug-macro.S @@ -17,22 +17,28 @@ */ #include +#include + +#if defined(CONFIG_ARCH_DAVINCI_DMx) +#define UART_PHYS DAVINCI_UART0_BASE +#define UART_VIRT IO_ADDRESS(UART_PHYS) +#endif + +#if defined(CONFIG_ARCH_DAVINCI_DA8XX) +#ifdef UART_PHYS +#error "CONFIG_DEBUG_LL is incompatible with multiple archs" +#endif +#define UART_PHYS DA8XX_UART2_BASE +#define UART_VIRT IO_ADDRESS(UART_PHYS) +#endif + #define UART_SHIFT 2 .macro addruart, rx, tmp mrc p15, 0, \rx, c1, c0 tst \rx, #1 @ MMU enabled? - moveq \rx, #0x01000000 @ physical base address - movne \rx, #0xfe000000 @ virtual base -#if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx) -#error Cannot enable DaVinci and DA8XX platforms concurrently -#elif defined(CONFIG_MACH_DAVINCI_DA830_EVM) || \ - defined(CONFIG_MACH_DAVINCI_DA850_EVM) - orr \rx, \rx, #0x00d00000 @ physical base address - orr \rx, \rx, #0x0000d000 @ of UART 2 -#else - orr \rx, \rx, #0x00c20000 @ UART 0 -#endif + ldreq \rx, =UART_PHYS + ldrne \rx, =UART_VIRT .endm .macro senduart,rd,rx diff --git a/arch/arm/mach-davinci/include/mach/hardware.h b/arch/arm/mach-davinci/include/mach/hardware.h index c45ba1f..85dd2b8 100644 --- a/arch/arm/mach-davinci/include/mach/hardware.h +++ b/arch/arm/mach-davinci/include/mach/hardware.h @@ -11,6 +11,8 @@ #ifndef __ASM_ARCH_HARDWARE_H #define __ASM_ARCH_HARDWARE_H +#include + /* * Before you add anything to ths file: * @@ -27,7 +29,7 @@ /* * I/O mapping */ -#define IO_PHYS 0x01c00000UL +#define IO_PHYS _AC(0x01c00000, UL) #define IO_OFFSET 0xfd000000 /* Virtual IO = 0xfec00000 */ #define IO_SIZE 0x00400000 #define IO_VIRT (IO_PHYS + IO_OFFSET) diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 7eacbc0..8f97d03 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h @@ -31,11 +31,13 @@ #define UART_DM646X_SCR 0x10 #define UART_DM646X_SCR_TX_WATERMARK 0x08 +#ifndef __ASSEMBLY__ struct davinci_uart_config { /* Bit field of UARTs present; bit 0 --> UART1 */ unsigned int enabled_uarts; }; extern int davinci_serial_init(struct davinci_uart_config *); +#endif #endif /* __ASM_ARCH_SERIAL_H */