From patchwork Mon Oct 29 09:59:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 1662691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id B455D3FDDA for ; Mon, 29 Oct 2012 10:03:09 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TSm9i-0004iL-Nh; Mon, 29 Oct 2012 10:01:15 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TSm99-0004TJ-OV for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2012 10:00:41 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MCN00MJVFRCRUN0@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2012 19:00:34 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-40-508e53c20929 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 0A.9C.01231.2C35E805; Mon, 29 Oct 2012 19:00:34 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MCN00FROFS3UC00@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2012 19:00:34 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 2/4] ARM: EXYNOS: PL330 MDMA1 fix for revision 0 of Exynos4210 SOC Date: Mon, 29 Oct 2012 10:59:54 +0100 Message-id: <1351504796-24788-3-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1351504796-24788-1-git-send-email-b.zolnierkie@samsung.com> References: <1351504796-24788-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAJMWRmVeSWpSXmKPExsVy+t9jQd1DwX0BBn13TSw2Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAldG07vigsXCFX+fX2ZpYNwo0MXIwSEhYCJxrpu9i5ETyBSTuHBv PVsXIxeHkMB0Romfc1cwgSSEBDYzSTR88QWx2QSsJCa2r2IEsUUEsiV+fJvMAtLALPCNUWJz /2I2kISwQIhE17+NYEUsAqoS5/7+A4vzCnhIzH/2jhFim7zE0/t9YHFOAU+J0xNXMUMs85D4 92k/+wRG3gWMDKsYRVMLkguKk9JzDfWKE3OLS/PS9ZLzczcxgv39TGoH48oGi0OMAhyMSjy8 jW96A4RYE8uKK3MPMUpwMCuJ8C7lBgrxpiRWVqUW5ccXleakFh9ilOZgURLnbfZICRASSE8s Sc1OTS1ILYLJMnFwSjUwmh8VYvwR0p+hnM/M/Kp/9hJ/14boxdZLOGcJrfq0L6X6xrKWy7vc jR6zPTH9JfXrUipPX9mx6Veu75xxfZ/A9mvMS6oOej2b55ty4EzuNZtZ1VK7Q3L5jzCp8D5f sPOnlNak5ZL1KyfZWM2qfev4MsR191Mz785FN7Y/YjKLWu+sUPNlXnp3ghJLcUaioRZzUXEi AFw3Be/zAQAA X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.6 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.24 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, pawel.moll@arm.com, Bartlomiej Zolnierkiewicz , vinod.koul@intel.com, t.figa@samsung.com, jassisinghbrar@gmail.com, rob.herring@calxeda.com, kyungmin.park@samsung.com, dinguyen@altera.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Commit 8214513 ("ARM: EXYNOS: fix address for EXYNOS4 MDMA1") changed EXYNOS specific setup of PL330 DMA engine to use 'non-secure' mdma1 address instead of 'secure' one (from 0x12840000 to 0x12850000) to fix issue with some Exynos4212 SOCs. Unfortunately it brakes PL330 setup for revision 0 of Exynos4210 SOC (mdma1 device cannot be found at 'non-secure' address): [ 0.566245] dma-pl330 dma-pl330.2: PERIPH_ID 0x0, PCELL_ID 0x0 ! [ 0.566278] dma-pl330: probe of dma-pl330.2 failed with error -22 Fix it by using 'secure' mdma1 address on Exynos4210 revision 0 SOC. Cc: Tomasz Figa Cc: Kukjin Kim Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Kyungmin Park --- arch/arm/mach-exynos/dma.c | 5 ++++- arch/arm/mach-exynos/include/mach/map.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c index 21d568b..dcc9f74 100644 --- a/arch/arm/mach-exynos/dma.c +++ b/arch/arm/mach-exynos/dma.c @@ -261,7 +261,7 @@ static struct dma_pl330_platdata exynos_mdma1_pdata = { }; static AMBA_AHB_DEVICE(exynos_mdma1, "dma-pl330.2", 0x00041330, - EXYNOS4_PA_MDMA1, {EXYNOS4_IRQ_MDMA1}, &exynos_mdma1_pdata); + EXYNOS4_PA_NS_MDMA1, {EXYNOS4_IRQ_MDMA1}, &exynos_mdma1_pdata); static int __init exynos_dma_init(void) { @@ -275,6 +275,9 @@ static int __init exynos_dma_init(void) exynos_pdma1_pdata.nr_valid_peri = ARRAY_SIZE(exynos4210_pdma1_peri); exynos_pdma1_pdata.peri_id = exynos4210_pdma1_peri; + + if (samsung_rev() == EXYNOS4210_REV_0) + exynos_mdma1_device.res.start = EXYNOS4_PA_S_MDMA1; } else if (soc_is_exynos4212() || soc_is_exynos4412()) { exynos_pdma0_pdata.nr_valid_peri = ARRAY_SIZE(exynos4212_pdma0_peri); diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 8480849..0abfe78 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -89,7 +89,8 @@ #define EXYNOS4_PA_L2CC 0x10502000 #define EXYNOS4_PA_MDMA0 0x10810000 -#define EXYNOS4_PA_MDMA1 0x12850000 +#define EXYNOS4_PA_NS_MDMA1 0x12850000 +#define EXYNOS4_PA_S_MDMA1 0x12840000 #define EXYNOS4_PA_PDMA0 0x12680000 #define EXYNOS4_PA_PDMA1 0x12690000 #define EXYNOS5_PA_MDMA0 0x10800000