From patchwork Tue Jan 29 05:19:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kumar, Anil" X-Patchwork-Id: 2059351 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by patchwork2.kernel.org (Postfix) with ESMTP id 35DD2DF23E for ; Tue, 29 Jan 2013 05:22:47 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r0T5IwLB009667; Mon, 28 Jan 2013 23:18:58 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0T5IwPF032629; Mon, 28 Jan 2013 23:18:58 -0600 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Mon, 28 Jan 2013 23:18:57 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0T5Iv5n020789; Mon, 28 Jan 2013 23:18:57 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 9EADB80627; Mon, 28 Jan 2013 23:18:56 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp20.itg.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by linux.omap.com (Postfix) with ESMTP id 5B44C80626 for ; Mon, 28 Jan 2013 23:18:55 -0600 (CST) Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0T5Imru018799; Tue, 29 Jan 2013 10:48:49 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Tue, 29 Jan 2013 10:48:48 +0530 Received: from ucmsshproxy.india.ext.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with SMTP id r0T5IhWe014275; Tue, 29 Jan 2013 10:48:43 +0530 Received: from symphony.india.ext.ti.com (unknown [192.168.247.13]) by ucmsshproxy.india.ext.ti.com (Postfix) with ESMTP id 64E1215803F; Tue, 29 Jan 2013 10:48:43 +0530 (IST) Received: from ubuntu-psp-linux.india.ext.ti.com (ubuntu-psp-linux [192.168.247.46]) by symphony.india.ext.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id r0T5IgR09356; Tue, 29 Jan 2013 10:48:42 +0530 (IST) From: "Kumar, Anil" To: , , , Subject: [PATCH 2/2] ARM: davinci: da850: configure CS2(aemif) for norflash Date: Tue, 29 Jan 2013 10:49:56 +0530 Message-ID: <1359436796-25135-3-git-send-email-anilkumar.v@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359436796-25135-1-git-send-email-anilkumar.v@ti.com> References: <1359436796-25135-1-git-send-email-anilkumar.v@ti.com> MIME-Version: 1.0 CC: , , , , , 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: , Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com Configure 16 bit data bus width for CS2(aemif) to use the norflash on DA850. Signed-off-by: Kumar, Anil --- :100644 100644 37c27af... 540e284... M arch/arm/mach-davinci/da8xx-dt.c arch/arm/mach-davinci/da8xx-dt.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 37c27af..540e284 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -38,12 +38,29 @@ static void __init da8xx_init_irq(void) } #ifdef CONFIG_ARCH_DAVINCI_DA850 +#define DA8XX_AEMIF_CE2CFG_OFFSET 0x10 +#define DA8XX_AEMIF_ASIZE_16BIT 0x1 + +static void __init da8xx_init_nor(void) +{ + void __iomem *aemif_addr; + + aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K); + + /* Configure data bus width of CS2 to 16 bit */ + writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) | + DA8XX_AEMIF_ASIZE_16BIT, + aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET); + + iounmap(aemif_addr); +} static void __init da850_init_machine(void) { of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); da8xx_uart_clk_enable(); + da8xx_init_nor(); } static const char *da850_boards_compat[] __initdata = {