From patchwork Tue Dec 27 01:33:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Chen X-Patchwork-Id: 5981 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 EC39F23E13 for ; Tue, 27 Dec 2011 01:34:15 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id D10BCA18492 for ; Tue, 27 Dec 2011 01:34:15 +0000 (UTC) Received: by eaac11 with SMTP id c11so9499893eaa.11 for ; Mon, 26 Dec 2011 17:34:15 -0800 (PST) Received: by 10.204.156.219 with SMTP id y27mr5883349bkw.71.1324949655411; Mon, 26 Dec 2011 17:34:15 -0800 (PST) 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.205.82.144 with SMTP id ac16cs159922bkc; Mon, 26 Dec 2011 17:34:15 -0800 (PST) Received: by 10.227.204.66 with SMTP id fl2mr25624600wbb.16.1324949653256; Mon, 26 Dec 2011 17:34:13 -0800 (PST) Received: from DB3EHSOBE006.bigfish.com (db3ehsobe006.messaging.microsoft.com. [213.199.154.144]) by mx.google.com with ESMTPS id f5si4549400wed.94.2011.12.26.17.34.12 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Dec 2011 17:34:13 -0800 (PST) Received-SPF: neutral (google.com: 213.199.154.144 is neither permitted nor denied by best guess record for domain of jason.chen@linaro.org) client-ip=213.199.154.144; Authentication-Results: mx.google.com; spf=neutral (google.com: 213.199.154.144 is neither permitted nor denied by best guess record for domain of jason.chen@linaro.org) smtp.mail=jason.chen@linaro.org Received: from mail10-db3-R.bigfish.com (10.3.81.241) by DB3EHSOBE006.bigfish.com (10.3.84.26) with Microsoft SMTP Server id 14.1.225.23; Tue, 27 Dec 2011 01:33:54 +0000 Received: from mail10-db3 (localhost [127.0.0.1]) by mail10-db3-R.bigfish.com (Postfix) with ESMTP id 5A9A3560335; Tue, 27 Dec 2011 01:34:13 +0000 (UTC) X-SpamScore: 3 X-BigFish: VS3(zcb8kzzz1202hzz8275dhz2dh87h2a8h668h839h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail10-db3 (localhost.localdomain [127.0.0.1]) by mail10-db3 (MessageSwitch) id 1324949653127218_2535; Tue, 27 Dec 2011 01:34:13 +0000 (UTC) Received: from DB3EHSMHS018.bigfish.com (unknown [10.3.81.247]) by mail10-db3.bigfish.com (Postfix) with ESMTP id 1010A320042; Tue, 27 Dec 2011 01:34:13 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS018.bigfish.com (10.3.87.118) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 27 Dec 2011 01:33:53 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.355.3; Mon, 26 Dec 2011 19:34:10 -0600 Received: from weitway.ap.freescale.net (weitway.ap.freescale.net [10.192.242.173]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id pBR1Y70w008717; Mon, 26 Dec 2011 19:34:08 -0600 (CST) From: Jason Chen To: CC: , , Subject: [PATCH 2/2] ARM: imx6q: add support for IRAM Date: Tue, 27 Dec 2011 09:33:59 +0800 Message-ID: <1324949639-27246-1-git-send-email-jason.chen@linaro.org> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com Signed-off-by: Jason Chen Signed-off-by: Eric Miao --- arch/arm/boot/dts/imx6q.dtsi | 5 +++++ arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/clock-imx6q.c | 3 ++- arch/arm/mach-imx/mach-imx6q.c | 2 ++ 4 files changed, 10 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 263e8f3..72b78bb 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -87,6 +87,11 @@ interrupt-parent = <&intc>; ranges; + ocram@00900000 { + compatible = "fsl,imx-iram"; + reg = <0x00900000 0x40000>; + }; + timer@00a00600 { compatible = "arm,smp-twd"; reg = <0x00a00600 0x100>; diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index fa5c10c..88eaef6 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -841,6 +841,7 @@ config SOC_IMX6Q select HAVE_IMX_GPC select HAVE_IMX_MMDC select HAVE_IMX_SRC + select IRAM_ALLOC select USE_OF help diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c index 9273c2a..285fd06 100644 --- a/arch/arm/mach-imx/clock-imx6q.c +++ b/arch/arm/mach-imx/clock-imx6q.c @@ -1777,6 +1777,7 @@ DEF_CLK(mmdc_ch0_axi_clk, CCGR3, CG10, &periph_clk, &mmdc_ch0_ipg_clk); DEF_CLK(mmdc_ch1_ipg_clk, CCGR3, CG13, &ipg_clk, NULL); DEF_CLK(mmdc_ch1_axi_clk, CCGR3, CG11, &periph2_clk, &mmdc_ch1_ipg_clk); DEF_CLK(openvg_axi_clk, CCGR3, CG13, &axi_clk, NULL); +DEF_CLK(ocram_clk, CCGR3, CG14, &ahb_clk, NULL); DEF_CLK(pwm1_clk, CCGR4, CG8, &ipg_perclk, NULL); DEF_CLK(pwm2_clk, CCGR4, CG9, &ipg_perclk, NULL); DEF_CLK(pwm3_clk, CCGR4, CG10, &ipg_perclk, NULL); @@ -1982,7 +1983,7 @@ int __init mx6q_clocks_init(void) /* only keep necessary clocks on */ writel_relaxed(0x3 << CG0 | 0x3 << CG1 | 0x3 << CG2, CCGR0); writel_relaxed(0x3 << CG8 | 0x3 << CG9 | 0x3 << CG10, CCGR2); - writel_relaxed(0x3 << CG10 | 0x3 << CG12, CCGR3); + writel_relaxed(0x3 << CG10 | 0x3 << CG12 | 0x1 << CG14, CCGR3); writel_relaxed(0x3 << CG4 | 0x3 << CG6 | 0x3 << CG7, CCGR4); writel_relaxed(0x3 << CG0, CCGR5); writel_relaxed(0, CCGR6); diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index c257281..9bfbcfc 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -27,6 +27,7 @@ #include #include #include +#include void imx6q_restart(char mode, const char *cmd) { @@ -81,6 +82,7 @@ static void __init imx6q_init_machine(void) of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + of_iram_init(); imx6q_pm_init(); }