From patchwork Thu Mar 25 00:19:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Chemparathy X-Patchwork-Id: 88115 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 o2P0OCRg006878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Mar 2010 00:24:48 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o2P0Liij022585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Mar 2010 19:21:44 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o2P0LinK014988; Wed, 24 Mar 2010 19:21:44 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 1C20B8062D; Wed, 24 Mar 2010 18:21:44 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dlep33.itg.ti.com (dlep33.itg.ti.com [157.170.170.112]) by linux.omap.com (Postfix) with ESMTP id 697F28062A for ; Wed, 24 Mar 2010 18:19:13 -0600 (CST) Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id o2P0JAbx006586; Wed, 24 Mar 2010 19:19:10 -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 o2P0JAZ12296; Wed, 24 Mar 2010 19:19:10 -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 o2P0JANY016298; Wed, 24 Mar 2010 20:19:10 -0400 Received: (from a0875269@localhost) by gtloginvm01.gt.design.ti.com (8.13.1/8.13.1/Submit) id o2P0JAk9016295; Wed, 24 Mar 2010 20:19:10 -0400 From: Cyril Chemparathy To: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 13/14] Davinci: simplified debug macros Date: Wed, 24 Mar 2010 20:19:04 -0400 Message-Id: <1269476345-16111-14-git-send-email-cyril@ti.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1269476345-16111-13-git-send-email-cyril@ti.com> References: <1269476345-16111-1-git-send-email-cyril@ti.com> <1269476345-16111-2-git-send-email-cyril@ti.com> <1269476345-16111-3-git-send-email-cyril@ti.com> <1269476345-16111-4-git-send-email-cyril@ti.com> <1269476345-16111-5-git-send-email-cyril@ti.com> <1269476345-16111-6-git-send-email-cyril@ti.com> <1269476345-16111-7-git-send-email-cyril@ti.com> <1269476345-16111-8-git-send-email-cyril@ti.com> <1269476345-16111-9-git-send-email-cyril@ti.com> <1269476345-16111-10-git-send-email-cyril@ti.com> <1269476345-16111-11-git-send-email-cyril@ti.com> <1269476345-16111-12-git-send-email-cyril@ti.com> <1269476345-16111-13-git-send-email-cyril@ti.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 00:24:48 +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 */