From patchwork Tue Aug 16 07:50:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "boojin.kim" X-Patchwork-Id: 1070772 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7G7oqtG023995 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 16 Aug 2011 07:51:13 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QtEPx-0004o2-MG; Tue, 16 Aug 2011 07:50:33 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QtEPx-0007qA-6S; Tue, 16 Aug 2011 07:50:33 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QtEPt-0007pr-Mh for linux-arm-kernel@lists.infradead.org; Tue, 16 Aug 2011 07:50:31 +0000 Received: from epcpsbgm1.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LQ000K22GEDH8S0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 16 Aug 2011 16:50:23 +0900 (KST) X-AuditID: cbfee61a-b7cf0ae000006bc6-30-4e4a213f7b27 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (MMPCPMTA) with SMTP id AD.E7.27590.F312A4E4; Tue, 16 Aug 2011 16:50:23 +0900 (KST) Received: from DOBOOJINKIM03 (12-23-120-72.csky.net [12.23.120.72]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LQ000IOVGFZTY@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 16 Aug 2011 16:50:23 +0900 (KST) Date: Tue, 16 Aug 2011 16:50:22 +0900 From: Boojin Kim Subject: RE: [PATCH] amba: consolidate PrimeCell magic In-reply-to: <1313402104-27024-1-git-send-email-linus.walleij@stericsson.com> To: "'Linus Walleij'" , linux-arm-kernel@lists.infradead.org Message-id: <001601cc5be9$275a5200$760ef600$%kim@samsung.com> X-Mailer: Microsoft Office Outlook 12.0 Content-language: ko Thread-index: AcxbMXpIek6u7AUkRxmApUHfx1KwOwAqyZiQ References: <1313402104-27024-1-git-send-email-linus.walleij@stericsson.com> X-Brightmail-Tracker: AAAAAA== X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110816_035030_036508_A89258E2 X-CRM114-Status: GOOD ( 23.21 ) X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [203.254.224.33 listed in list.dnswl.org] Cc: "'Linus Walleij'" , "'Kukjin Kim'" , "'Lee Jones'" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 16 Aug 2011 07:51:13 +0000 (UTC) Linus Walleij wrote: > > From: Linus Walleij > > Since two drivers use the PrimeCell scheme without using the > amba_bus driver logic, let's break the magic lookups out as > static inlines in the header so we get > some consolidation anyway. > > Cc: Boojin Kim > Cc: Kukjin Kim > Cc: Viresh Kumar > Signed-off-by: Linus Walleij > --- > Samsung folks: I cannot find a defconfig that actually compiles > this driver in, can you help me testing it so I didn't break > anything, and Ack if it looks OK? Thanks. Hello Linus, I tested this patch on SMDKC210 but happened following build error with exynos4_defconfig. arch/arm/common/pl330.c: In function 'pl330_add': arch/arm/common/pl330.c:1844: error: invalid type argument of '->' (have 'u32') arch/arm/common/pl330.c:1845: error: invalid type argument of '->' (have 'u32') So I added following. From: Boojin Kim Date: Tue, 16 Aug 2011 16:27:22 +0900 Subject: [PATCH] ARM: PL330: use amba_device structure to get amba information Signed-off-by: Boojin Kim --- arch/arm/common/pl330.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) -- 1.7.1 Tested-by: Boojin Kim with above on smdkc210 board If my ack is required on this, Acked-by: Boojin Kim If you need more test, please kindly let me know. diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index 2b3b8b3..af6d96d 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c @@ -1822,6 +1822,8 @@ int pl330_add(struct pl330_info *pi) struct pl330_dmac *pl330; int i, ret; u32 cid, pid; + struct amba_device *adev = container_of(pi->dev, + struct amba_device, dev); if (!pi || !pi->dev) return -EINVAL; @@ -1841,8 +1843,8 @@ int pl330_add(struct pl330_info *pi) cid = amba_get_cid(pi->base, PCELL_SIZE); pid = amba_get_pid(pi->base, PCELL_SIZE); if (cid != AMBA_CID || - amba_manf(pid) != AMBA_VENDOR_ARM || - amba_part(pid) != PART) { + amba_manf(adev) != AMBA_VENDOR_ARM || + amba_part(adev) != PART) { dev_err(pi->dev, "PID: 0x%x, CID: 0x%x !\n", pid, cid); return -EINVAL; }