From patchwork Fri Jul 10 06:08:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rajashekhara, Sudhakar" X-Patchwork-Id: 34922 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6A6wMSm027153 for ; Fri, 10 Jul 2009 06:58:22 GMT Received: from dlep35.itg.ti.com ([157.170.170.118]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n6A6uQXG013182; Fri, 10 Jul 2009 01:56:31 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id n6A6uPak006339; Fri, 10 Jul 2009 01:56:25 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 562BA80627; Fri, 10 Jul 2009 01:56:25 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 1D15B80626 for ; Fri, 10 Jul 2009 01:56:23 -0500 (CDT) Received: from tidmzi-ftp.india.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with SMTP id n6A6uKH1027321 for ; Fri, 10 Jul 2009 01:56:22 -0500 (CDT) Received: from symphonyindia.ti.com (symphony-ftp [192.168.247.11]) by tidmzi-ftp.india.ext.ti.com (Postfix) with SMTP id D627E38889 for ; Fri, 10 Jul 2009 12:23:34 +0530 (IST) Received: from localhost.localdomain ([192.168.247.76]) by symphonyindia.ti.com (8.12.10/8.12.10) with ESMTP id n6A6q3EZ032486; Fri, 10 Jul 2009 12:22:03 +0530 From: Sudhakar Rajashekhara To: davinci-linux-open-source@linux.davincidsp.com Date: Fri, 10 Jul 2009 02:08:31 -0400 Message-Id: <1247206111-3343-1-git-send-email-sudhakar.raj@ti.com> X-Mailer: git-send-email 1.5.6 Cc: Subject: [PATCH] davinci: Move the da830/omap-l137 #defines to header file X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Rajashekhara, Sudhakar With the introduction of TI da850/omap-l138, some of the macros defined for da830/omap-l137 will be needed in da850 source file. So, move the common macros to da8xx.h header file. Also, modify the macro names from DA830_... to DA8XX_. Signed-off-by: Sudhakar Rajashekhara --- This patch has been tested on DA830/OMAP-L137 EVM. arch/arm/mach-davinci/da830.c | 22 +++++++--------------- arch/arm/mach-davinci/include/mach/da8xx.h | 8 ++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index ab42428..999f69c 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c @@ -27,14 +27,6 @@ #include "clock.h" #include "mux.h" -#define DA830_PSC0_BASE 0x01c10000 -#define DA830_PLL0_BASE 0x01c11000 -#define DA830_JTAG_ID_REG 0x01c14018 -#define DA830_TIMER64P0_BASE 0x01c20000 -#define DA830_TIMER64P1_BASE 0x01c21000 -#define DA830_GPIO_BASE 0x01e26000 -#define DA830_PSC1_BASE 0x01e27000 - /* Offsets of the 8 compare registers on the da830 */ #define DA830_CMP12_0 0x60 #define DA830_CMP12_1 0x64 @@ -49,7 +41,7 @@ static struct pll_data pll0_data = { .num = 1, - .phys_base = DA830_PLL0_BASE, + .phys_base = DA8XX_PLL0_BASE, .flags = PLL_HAS_PREDIV | PLL_HAS_POSTDIV, }; @@ -1174,8 +1166,8 @@ static struct map_desc da830_io_desc[] = { }; static void __iomem *da830_psc_bases[] = { - IO_ADDRESS(DA830_PSC0_BASE), - IO_ADDRESS(DA830_PSC1_BASE), + IO_ADDRESS(DA8XX_PSC0_BASE), + IO_ADDRESS(DA8XX_PSC1_BASE), }; /* Contents of JTAG ID register used to identify exact cpu type */ @@ -1191,14 +1183,14 @@ static struct davinci_id da830_ids[] = { static struct davinci_timer_instance da830_timer_instance[2] = { { - .base = IO_ADDRESS(DA830_TIMER64P0_BASE), + .base = IO_ADDRESS(DA8XX_TIMER64P0_BASE), .bottom_irq = IRQ_DA8XX_TINT12_0, .top_irq = IRQ_DA8XX_TINT34_0, .cmp_off = DA830_CMP12_0, .cmp_irq = IRQ_DA830_T12CMPINT0_0, }, { - .base = IO_ADDRESS(DA830_TIMER64P1_BASE), + .base = IO_ADDRESS(DA8XX_TIMER64P1_BASE), .bottom_irq = IRQ_DA8XX_TINT12_1, .top_irq = IRQ_DA8XX_TINT34_1, .cmp_off = DA830_CMP12_0, @@ -1220,7 +1212,7 @@ static struct davinci_timer_info da830_timer_info = { static struct davinci_soc_info davinci_soc_info_da830 = { .io_desc = da830_io_desc, .io_desc_num = ARRAY_SIZE(da830_io_desc), - .jtag_id_base = IO_ADDRESS(DA830_JTAG_ID_REG), + .jtag_id_base = IO_ADDRESS(DA8XX_JTAG_ID_REG), .ids = da830_ids, .ids_num = ARRAY_SIZE(da830_ids), .cpu_clks = da830_clks, @@ -1234,7 +1226,7 @@ static struct davinci_soc_info davinci_soc_info_da830 = { .intc_irq_prios = da830_default_priorities, .intc_irq_num = DA830_N_CP_INTC_IRQ, .timer_info = &da830_timer_info, - .gpio_base = IO_ADDRESS(DA830_GPIO_BASE), + .gpio_base = IO_ADDRESS(DA8XX_GPIO_BASE), .gpio_num = 128, .gpio_irq = IRQ_DA8XX_GPIO0, .serial_dev = &da8xx_serial_device, diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index 084db27..65b4243 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h @@ -29,6 +29,14 @@ #define DA8XX_BOOT_CFG_BASE (IO_PHYS + 0x14000) +#define DA8XX_PSC0_BASE 0x01c10000 +#define DA8XX_PLL0_BASE 0x01c11000 +#define DA8XX_JTAG_ID_REG 0x01c14018 +#define DA8XX_TIMER64P0_BASE 0x01c20000 +#define DA8XX_TIMER64P1_BASE 0x01c21000 +#define DA8XX_GPIO_BASE 0x01e26000 +#define DA8XX_PSC1_BASE 0x01e27000 + void __init da830_init(void); int da8xx_register_edma(void);