From patchwork Tue Nov 6 06:18:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhilash Kesavan X-Patchwork-Id: 1703111 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 D88943FCDE for ; Tue, 6 Nov 2012 06:15:45 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TVcPi-0004Pg-PS; Tue, 06 Nov 2012 06:13:31 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TVcPc-0004LA-Ps for linux-arm-kernel@lists.infradead.org; Tue, 06 Nov 2012 06:13:27 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MD1002JZYM30XH0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 06 Nov 2012 15:13:21 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.126]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id C4.26.12699.18AA8905; Tue, 06 Nov 2012 15:13:21 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-66-5098aa8183f7 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 84.26.12699.18AA8905; Tue, 06 Nov 2012 15:13:21 +0900 (KST) Received: from localhost.localdomain ([107.108.73.92]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MD100JEOYKDS840@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 06 Nov 2012 15:13:21 +0900 (KST) From: Abhilash Kesavan To: linux-arm-kernel@lists.infradead.org, kgene.kim@samsung.com Subject: [PATCH RFC] ARM: EXYNOS5: Setup legacy i2c controller interrupts on SMDK5250 Date: Tue, 06 Nov 2012 11:48:46 +0530 Message-id: <1352182726-29221-1-git-send-email-a.kesavan@samsung.com> X-Mailer: git-send-email 1.6.6.1 DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGLMWRmVeSWpSXmKPExsWyRsSkTrdx1YwAg88vTS02Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAlfGn3PLmQpO8la0rZjF3sC4jruLkYNDQsBE4vYuni5GTiBTTOLC vfVsXYxcHEICSxklep93sUAkTCRObtjDCpGYziixtWM+O4Sznkni274fbCBVbAJ6Egv+fWUG sUUE7CVWnDgJZgsLhEt8WLKWEWQbi4CqxK3NCiBhXgFXiYV/H7JBLFCQOP1hLTuIzSIgIPFt 8iEWiONkJTYdYAZZJSGwhk1i1+OFUPWSEgdX3GCZwCiwgJFhFaNoakFyQXFSeq6RXnFibnFp Xrpecn7uJkZg4Jz+90x6B+OqBotDjAIcjEo8vIJiMwKEWBPLiitzDzFKcDArifBy3JkeIMSb klhZlVqUH19UmpNafIjRB+iSicxSosn5wKDOK4k3NDYxNzU2tTQyMjM1xSGsJM7b7JESICSQ nliSmp2aWpBaBDOOiYNTqoExk99P9K3ur39R4eXPXl47l6kwMT5gThj70tVK1T1H9x9M5bLU Pf/mwNv6yL2pE6zW2B+KETnzL/PgR9647TVv2/ptthuoL66tf2W8SSWB4/K6hNspT7fO7uV9 eqv0WK1ooi6vc8sB3iDnwqV7tgi8iXsWzC37ZV/knffvZ69Peis6c3rmoYqdSizFGYmGWsxF xYkAkE3SrEkCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGLMWRmVeSWpSXmKPExsVy+t9jQd3GVTMCDD5M0rPY9PgaqwOjx+Yl 9QGMUQ2MNhmpiSmpRQqpecn5KZl56bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlA U5UUyhJzSoFCAYnFxUr6dpgmhIa46VrANEbo+oYEwfUYGaCBhDWMGX/OLWcqOMlb0bZiFnsD 4zruLkZODgkBE4mTG/awQthiEhfurWfrYuTiEBKYziixtWM+O4Sznkni274fbCBVbAJ6Egv+ fWUGsUUE7CVWnDgJZgsLhEt8WLKWsYuRg4NFQFXi1mYFkDCvgKvEwr8P2SAWKEic/rCWfQIj 1wJGhlWMoqkFyQXFSem5RnrFibnFpXnpesn5uZsYwYH5THoH46oGi0OMAhyMSjy8gmIzAoRY E8uKK3MPMUpwMCuJ8HLcmR4gxJuSWFmVWpQfX1Sak1p8iNEHaPlEZinR5Hxg1OSVxBsam5ib GptamliYmFniEFYS5232SAkQEkhPLEnNTk0tSC2CGcfEwSnVwNgZ8PzgyRvCM6PNPLtSdtqF Z09pMK3Yqsuwy6J9n6uGiZX1woQDnyd35Edc4e7dy7k1Z+Wr4AzxeQetlnWVLrU6rrnR6dm3 ws/zNj47wBIaP4P9goLp+WahnbEqrcKSRTU6fHzqhlExizbnCv4xXjNlR/YPA64dliaFC+bG PHVeV958IuFdsxJLcUaioRZzUXEiAB1pZ215AgAA X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121106_011325_603134_79D563A3 X-CRM114-Status: GOOD ( 10.02 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.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.25 listed in list.dnswl.org] -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] 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 On Exynos5 we have a new high-speed i2c controller. The interrupt sources for the legacy and new controller are muxed and are controlled via the SYSCON I2C_CFG register. At reset the interrupt source is configured for the high-speed controller, to continue using the old i2c controller we need to modify the I2C_CFG register. Signed-off-by: Abhilash Kesavan --- This is a hack, I am not quite clear on how to handle this via DT. Suggestions welcome. arch/arm/mach-exynos/mach-exynos5-dt.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index ed37273..badffd4 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -13,10 +13,12 @@ #include #include #include +#include #include #include #include +#include #include #include @@ -89,6 +91,12 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { {}, }; +static void exynos5_i2c_setup(void) +{ + /* Setup the low-speed i2c controller interrupts */ + writel(0x0, EXYNOS5_SYS_I2C_CFG); +} + static void __init exynos5250_dt_map_io(void) { exynos_init_io(NULL, 0); @@ -97,6 +105,8 @@ static void __init exynos5250_dt_map_io(void) static void __init exynos5250_dt_machine_init(void) { + exynos5_i2c_setup(); + of_platform_populate(NULL, of_default_bus_match_table, exynos5250_auxdata_lookup, NULL); }