From patchwork Thu Apr 4 06:27:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amar X-Patchwork-Id: 15892 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 7047523E2E for ; Thu, 4 Apr 2013 06:07:41 +0000 (UTC) Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by fiordland.canonical.com (Postfix) with ESMTP id 4DAE3A1832F for ; Thu, 4 Apr 2013 06:07:41 +0000 (UTC) Received: by mail-we0-f197.google.com with SMTP id p43sf3040932wea.0 for ; Wed, 03 Apr 2013 23:07:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-auditid:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-brightmail-tracker:x-brightmail-tracker :dlp-filter:x-mtr:x-cfilter-loop:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe; bh=vDH5S80XYmBg9m+sVQQTIWel3T+1BegBaY6kDYi+aoI=; b=AceEGTxsGabFTqp/jMRBKn6I3yTGj0j7gLWFkMBytMXOTPFeQyHXL9xriRafnKaPGN EoVq5r0tP00aBFcfl5a3ZFstZIGDuTgjw7+mtckaBNYZ8HNahkDEWqADJs8h7UJlNHvx iyD4mQOTjRXl32sA7+NGHcHCZRHKitxUxIcWS6QFRbkOjL8xxZYRAoak1M1wfmXBHXx9 mTCAPRlTSYrIf4M2Nt9q2yDrz+NZ6eMMKuW+vKdmF5uZFnR+b97uwz7r4olq0lNfrLJx Xv7GhOIs380xOGSGjgr3nmOTLfF2EhNgWINTuOW8adGvA2WcrswvaFwjuukrZSy4DgsP GYDA== X-Received: by 10.180.96.225 with SMTP id dv1mr1504644wib.6.1365055661104; Wed, 03 Apr 2013 23:07:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.92.161 with SMTP id cn1ls887421wib.39.gmail; Wed, 03 Apr 2013 23:07:41 -0700 (PDT) X-Received: by 10.194.119.33 with SMTP id kr1mr7158503wjb.36.1365055661023; Wed, 03 Apr 2013 23:07:41 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id v15si3798770wjq.87.2013.04.03.23.07.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 23:07:41 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id ox1so2308328veb.21 for ; Wed, 03 Apr 2013 23:07:40 -0700 (PDT) X-Received: by 10.220.192.3 with SMTP id do3mr3718535vcb.16.1365055659917; Wed, 03 Apr 2013 23:07:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.85.136 with SMTP id h8csp201963vez; Wed, 3 Apr 2013 23:07:39 -0700 (PDT) X-Received: by 10.68.8.69 with SMTP id p5mr6795788pba.212.1365055658748; Wed, 03 Apr 2013 23:07:38 -0700 (PDT) Received: from mailout2.samsung.com (mailout2.samsung.com. [203.254.224.25]) by mx.google.com with ESMTP id lq8si10012473pab.113.2013.04.03.23.07.38; Wed, 03 Apr 2013 23:07:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of amarendra.xt@samsung.com designates 203.254.224.25 as permitted sender) client-ip=203.254.224.25; Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKP006FMVNSHVK0@mailout2.samsung.com>; Thu, 04 Apr 2013 15:07:37 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 8F.D2.05174.9A81D515; Thu, 04 Apr 2013 15:07:37 +0900 (KST) X-AuditID: cbfee68f-b7f4a6d000001436-10-515d18a98d02 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 07.38.13494.9A81D515; Thu, 04 Apr 2013 15:07:37 +0900 (KST) Received: from chrome-ubuntu.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MKP00HBLVOBGGQ0@mmp2.samsung.com>; Thu, 04 Apr 2013 15:07:36 +0900 (KST) From: Amar To: u-boot@lists.denx.de, hs@denx.de, jh80.chung@samsung.com Cc: patches@linaro.org, sjg@chromium.org, mk7.kang@samsung.com, chander.kashyap@linaro.org, afleming@gmail.com, u-boot-review@google.com Subject: [PATCH V1 1/1] EXYNOS5: I2C: Add FDT and non-FDT support for I2C Date: Thu, 04 Apr 2013 02:27:06 -0400 Message-id: <1365056826-17057-2-git-send-email-amarendra.xt@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1365056826-17057-1-git-send-email-amarendra.xt@samsung.com> References: <1365056826-17057-1-git-send-email-amarendra.xt@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkkeLIzCtJLcpLzFFi42JZI2JSq7tSIjbQYEWrlMWN6z/ZLB6uv8li sePOfWaLG7/aWC06jrQwWkw5/IXF4tuWbYwWy19vZLd4u7eT3YHTY3bDRRaPebNOsHjsnHWX 3WPBplKPO9f2sHmcvbOD0aNvyyrGAP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LUP3KQ1vZQGxeAQ+JeT8b2CG2yUl82PMIzOYEqn8+ewcTyHwhoJqHN7QmMPIuYGRYxSia WpBcUJyUnmukV5yYW1yal66XnJ+7iREca8+kdzCuarA4xCjAwajEw7vCPyZQiDWxrLgy9xCj BAezkgivO09soBBvSmJlVWpRfnxRaU5q8SHGZKCjJjJLiSbnA9NAXkm8obGJuamxqaWJhYmZ JWnCSuK8B1utA4UE0hNLUrNTUwtSi2C2MHFwSjUwTvY1kOjWbeiZ9I4h7+eScuYpntuO379v tPDkFlPd0lOxRv5tu4zjbmrsj/Ky6G7+r3JDN8DvZJZA45bjV/59eb2w1OJ8X0V+jNgWvdyq FV2X3cOFGHUV2Q5d7MzKW+Eq2P4g5oF/1POLBzmE/r/0TV1aprrw24dZUp82iyWeWHeULV+u J/+FEktxRqKhFnNRcSIA/gsp6PkCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQnxgDm4pfmuFAcdJD4aSIvMKCAukeYepx3/K9iDFt4Tod8C1HJImHPYerEYEd/b9MvrBVrE X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch updates the function board_i2c_init() to add support for both FDT and non-FDT for I2C, and initialise the I2C channels. Signed-off-by: Amar Acked-by: Simon Glass --- drivers/i2c/s3c24x0_i2c.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c index 46d2506..5234ff6 100644 --- a/drivers/i2c/s3c24x0_i2c.c +++ b/drivers/i2c/s3c24x0_i2c.c @@ -515,11 +515,12 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len) len) != 0); } -#ifdef CONFIG_OF_CONTROL void board_i2c_init(const void *blob) { + int i; +#ifdef CONFIG_OF_CONTROL int node_list[CONFIG_MAX_I2C_NUM]; - int count, i; + int count; count = fdtdec_find_aliases_for_id(blob, "i2c", COMPAT_SAMSUNG_S3C2440_I2C, node_list, @@ -539,8 +540,15 @@ void board_i2c_init(const void *blob) bus->bus_num = i2c_busses++; exynos_pinmux_config(bus->id, 0); } +#else + for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) { + exynos_pinmux_config((PERIPH_ID_I2C0 + i), + PINMUX_FLAG_NONE); + } +#endif } +#ifdef CONFIG_OF_CONTROL static struct s3c24x0_i2c_bus *get_bus(unsigned int bus_idx) { if (bus_idx < i2c_busses)