From patchwork Thu Nov 8 09:54:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 1714831 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 869E03FCDE for ; Thu, 8 Nov 2012 09:58:24 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TWOq6-0006eI-UY; Thu, 08 Nov 2012 09:55:58 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TWOq2-0006dr-GY for linux-arm-kernel@lists.infradead.org; Thu, 08 Nov 2012 09:55:56 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MD5001JBY92EH20@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 08 Nov 2012 18:55:50 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-a8-509b81a6c08e Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id A6.9C.12699.6A18B905; Thu, 08 Nov 2012 18:55:50 +0900 (KST) Received: from amdc1032.localnet ([106.116.147.136]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MD5001ILY90RS90@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 08 Nov 2012 18:55:50 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Kukjin Kim Subject: Re: [PATCH 2/4] ARM: EXYNOS: PL330 MDMA1 fix for revision 0 of Exynos4210 SOC Date: Thu, 08 Nov 2012 10:54:41 +0100 User-Agent: KMail/1.13.2 (Linux/3.5.0-rc2+; KDE/4.4.5; i686; ; ) References: <1351504796-24788-1-git-send-email-b.zolnierkie@samsung.com> <201210300956.23102.b.zolnierkie@samsung.com> <0cea01cdbd6c$7ace7200$706b5600$%kim@samsung.com> In-reply-to: <0cea01cdbd6c$7ace7200$706b5600$%kim@samsung.com> MIME-version: 1.0 Message-id: <201211081054.41649.b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNLMWRmVeSWpSXmKPExsVy+t9jAd1ljbMDDF6f5rHY9PgaqwOjx+Yl 9QGMUVw2Kak5mWWpRfp2CVwZJ9efZi44Ilfxduti9gbGu5JdjJwcEgImEp3/1rFB2GISF+6t B7OFBBYxSkw7ztrFyAVkr2WSWNIylxkkwSZgJTGxfRUjiC0ioCbRs3grmC0sECGxbNcEFhCb RUBV4k3PJFYQW1TAQaJz6gQ2kEHMAhOYJFasPs8CMXUNo8SOyc/ZQao4BewkDj+E6OYVEJT4 MfkemM0soCXR/GYTI4QtL7F5zVtmiBpLica2/0wTGAVmIWmZhaRlFpKWBYzMqxhFUwuSC4qT 0nON9IoTc4tL89L1kvNzNzGCg/CZ9A7GVQ0WhxgFOBiVeHg1JGcHCLEmlhVX5h5ilOBgVhLh XeYMFOJNSaysSi3Kjy8qzUktPsQozcGiJM7b7JESICSQnliSmp2aWpBaBJNl4uCUamBcs0em ZubVnNDjCy9dS8o676sQt4vX1ruAZV2ad+e9p09XNmVvKnW2iqmJMvK/rht5k83e4U2p95sb S9dX9d2TXC15kT1UzsDbfT3v+adTZ6zkuhHZW1PLwmRYc/Gwgt3spITy9Vm3gjYGbci99WH9 +rvBtcesvPi913E4Ok9ddZbne9Fxlg1KLMUZiYZazEXFiQAWETEJPgIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121108_045554_904909_1868033F X-CRM114-Status: GOOD ( 22.13 ) 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: linux-samsung-soc@vger.kernel.org, pawel.moll@arm.com, vinod.koul@intel.com, t.figa@samsung.com, jassisinghbrar@gmail.com, linux-kernel@vger.kernel.org, rob.herring@calxeda.com, kyungmin.park@samsung.com, dinguyen@altera.com, linux-arm-kernel@lists.infradead.org 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: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Thursday 08 November 2012 05:49:47 Kukjin Kim wrote: > Bartlomiej Zolnierkiewicz wrote: > > > > > Hmm...above change and adding definition of EXYNOS_PA_S_MDMA1 address > > > can fix the problem you commented on EXYNOS4210 Rev0 without others?... > > > > The problem is affecting only EXYNOS4210 Rev0 and the fix is applied only > > for case when soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0, > > or did you mean something else? > > > Yeah, I know. I mean just adding secure mdma1 address is enough for > exynos4210 rev0. > > 8<----- > @@ -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 > @@ -90,6 +90,7 @@ > > #define EXYNOS4_PA_MDMA0 0x10810000 > #define EXYNOS4_PA_MDMA1 0x12850000 > +#define EXYNOS4_PA_S_MDMA1 0x12840000 > #define EXYNOS4_PA_PDMA0 0x12680000 > #define EXYNOS4_PA_PDMA1 0x12690000 > #define EXYNOS5_PA_MDMA0 0x10800000 > 8<---- Ah, okay. Here is full simplified patch. From: Bartlomiej Zolnierkiewicz Subject: [PATCH v2] ARM: EXYNOS: PL330 MDMA1 fix for revision 0 of Exynos4210 SOC 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. Reviewed-by: Tomasz Figa Cc: Kukjin Kim Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Kyungmin Park --- arch/arm/mach-exynos/dma.c | 3 +++ arch/arm/mach-exynos/include/mach/map.h | 1 + 2 files changed, 4 insertions(+) Index: b/arch/arm/mach-exynos/dma.c =================================================================== --- a/arch/arm/mach-exynos/dma.c 2012-11-07 18:20:36.561743865 +0100 +++ b/arch/arm/mach-exynos/dma.c 2012-11-08 10:48:23.445067606 +0100 @@ -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); Index: b/arch/arm/mach-exynos/include/mach/map.h =================================================================== --- a/arch/arm/mach-exynos/include/mach/map.h 2012-11-07 18:20:44.801743862 +0100 +++ b/arch/arm/mach-exynos/include/mach/map.h 2012-11-08 10:48:40.597067605 +0100 @@ -92,6 +92,7 @@ #define EXYNOS4_PA_MDMA0 0x10810000 #define EXYNOS4_PA_MDMA1 0x12850000 +#define EXYNOS4_PA_S_MDMA1 0x12840000 #define EXYNOS4_PA_PDMA0 0x12680000 #define EXYNOS4_PA_PDMA1 0x12690000 #define EXYNOS5_PA_MDMA0 0x10800000