From patchwork Thu Nov 8 05:30:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Shinde X-Patchwork-Id: 12752 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 396CD23E00 for ; Thu, 8 Nov 2012 05:29:30 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id AE52EA18AE5 for ; Thu, 8 Nov 2012 05:29:29 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so1629591iag.11 for ; Wed, 07 Nov 2012 21:29:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :dlp-filter:x-mtr:x-brightmail-tracker:x-brightmail-tracker :x-cfilter-loop:x-gm-message-state; bh=F1/3qzVTFOAeYbsxrSljDfDh5uMmGkOBu62okrLjZZY=; b=YJqRz4Dqu4gYssb36gV7eQZIxq2IikIb2C50mEHidZW7lePFASo0511uX2XCQQ8G2Q t9KdJz9g7KoVd2RekHA1CNpwcllyoM/sc/n9jI7e168N9Kv0T33DHzgk2sPmMZnz2qXW I4qPdK1Ix7WkhinOS5mhPvLYP6RZtxm0wEMPylc28zrn1Xs6fRnMVSSZistMOxJCrQ4E PIzMYMYw9MtfNvG/xwTeNiExJnVXPy8XL1QMsgX52hrOcbfqxBJi+ykFUOxqRGXC9ezw j1i+Ng/vNR97dFnGYMdPOBRb75crY9US5OGeoMTrsaIi4jRaWcbLVaOxywvTSh2hWx3G VrrA== Received: by 10.50.152.137 with SMTP id uy9mr6866313igb.62.1352352569123; Wed, 07 Nov 2012 21:29:29 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp325101igt; Wed, 7 Nov 2012 21:29:28 -0800 (PST) Received: by 10.68.233.196 with SMTP id ty4mr20958608pbc.23.1352352568523; Wed, 07 Nov 2012 21:29:28 -0800 (PST) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id bt8si33845280pab.274.2012.11.07.21.29.28; Wed, 07 Nov 2012 21:29:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.34 as permitted sender) client-ip=203.254.224.34; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.34 as permitted sender) smtp.mail=rajeshwari.s@samsung.com Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MD500HOALX2O8N0@mailout4.samsung.com>; Thu, 08 Nov 2012 14:29:27 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id C2.11.12699.7334B905; Thu, 08 Nov 2012 14:29:27 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-d1-509b4337804b Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 62.11.12699.7334B905; Thu, 08 Nov 2012 14:29:27 +0900 (KST) Received: from rajeshwari-linux.sisodomain.com ([107.108.215.115]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MD500D18LOC2U10@mmp2.samsung.com>; Thu, 08 Nov 2012 14:29:27 +0900 (KST) From: Rajeshwari Shinde To: u-boot@lists.denx.de Cc: patches@linaro.org, sjg@chromium.org, mk7.kang@samsung.com, chander.kashyap@linaro.org, hs@denx.de Subject: [PATCH 6/6] SMDK5250: Populate I2C data using FDT. Date: Thu, 08 Nov 2012 11:00:03 +0530 Message-id: <1352352603-17114-7-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1352352603-17114-1-git-send-email-rajeshwari.s@samsung.com> References: <1352352603-17114-1-git-send-email-rajeshwari.s@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRmVeSWpSXmKPExsWyRsSkRtfceXaAQc8yOYuH62+yWEw5/IXF gcnjzrU9bAGMUVw2Kak5mWWpRfp2CVwZZ6ZOYymYwFbRuXIHYwNjB2sXIweHhICJRNtxmS5G TiBTTOLCvfVsXYxcHEICSxkl1nzewgiRMJE4suYAG4gtJDCdUWLGa3GIoolMEkdffWUFSbAJ GElsPTkNrEFEQELiV/9VMJtZIEPi9oclLCDLhAWsJU7NrgcJswioShx8+IodxOYV8JD48+M3 1C4FiWNTIUZyCnhKrPv4nRFir4fEr/2T2SF6BSS+TT7EAnG/rMSmA8wg50gI3GaTaNi2nBli jqTEwRU3WCYwCi9gZFjFKJpakFxQnJSea6RXnJhbXJqXrpecn7uJERiKp/89k97BuKrB4hCj AAejEg+vhuTsACHWxLLiytxDjBIczEoivFOOzAoQ4k1JrKxKLcqPLyrNSS0+xOgDdMlEZinR 5HxgnOSVxBsam5ibGptaGhmZmZriEFYS5232SAkQEkhPLEnNTk0tSC2CGcfEwSnVwLjE5M/7 uTbrd4s/2l/I9LCGKXzyagWb1d92fLHt/33z1s0j8390feh9VBPjI9DAkrqyhK8irqTMPON8 /STxD7xx/1/6++Wpz2+4ncGw3fJb7oxfuzl9unKuPD7HcqRbnymi+dfciJN2XNvZ+xgrZhYI bJAU3i7yUKDpuPh0w+7NLaed2LbHfFFiKc5INNRiLipOBACxyrlxcgIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeLIzCtJLcpLzFFi42I5/e+xoK658+wAg9tfhCwerr/JYjHl8BcW ByaPO9f2sAUwRjUw2mSkJqakFimk5iXnp2TmpdsqeQfHO8ebmhkY6hpaWpgrKeQl5qbaKrn4 BOi6ZeYAzVZSKEvMKQUKBSQWFyvp22GaEBripmsB0xih6xsSBNdjZIAGEtYwZpyZOo2lYAJb RefKHYwNjB2sXYycHBICJhJH1hxgg7DFJC7cWw9mCwlMZ5SY8Vq8i5ELyJ7IJHH01VewBjYB I4mtJ6cxgtgiAhISv/qvgtnMAhkStz8sYeli5OAQFrCWODW7HiTMIqAqcfDhK3YQm1fAQ+LP j9+MELsUJI5NhRjJKeApse7jd0aIvR4Sv/ZPZp/AyLuAkWEVo2hqQXJBcVJ6rpFecWJucWle ul5yfu4mRnCoP5PewbiqweIQowAHoxIPr4bk7AAh1sSy4srcQ4wSHMxKIrxTjswKEOJNSays Si3Kjy8qzUktPsToA3TVRGYp0eR8YBzmlcQbGpuYmxqbWppYmJhZ4hBWEudt9kgJEBJITyxJ zU5NLUgtghnHxMEp1cAYZ7O/r+vZH7e4GX+LDaY2yEYum6oSFDzj1uHE48Faf5P1T0p6nFG7 lnho7Q+b+OlalcpTC6M9/z9a0DHviZjkw90t+2J8Je9MLn9k1Ocex6V6vvrDD6Ml92xtPIKf dbU3fVmbKqSxJsrj7bnNDpeFGvRrLhr+Kn0tl+4a0lS579Ke/XZqWSuUWIozEg21mIuKEwEK fbkLogIAAA== X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQnkyvhKoRk9SsxDo2+2tOzC1gqqUmJL6tTK5xc9+7w1bDIDax4no6m9rm+HrksjjiJrVCd4 Signed-off-by: Rajeshwari Shinde --- board/samsung/smdk5250/smdk5250.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index db2457b..dfb7239 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -276,8 +276,11 @@ static int board_uart_init(void) static int board_i2c_init(void) { int i, err; - - for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) { + int count = CONFIG_MAX_I2C_NUM; +#ifdef CONFIG_OF_CONTROL + count = i2c_fdt_bus_values(gd->fdt_blob); +#endif + for (i = 0; i < count; i++) { err = exynos_pinmux_config((PERIPH_ID_I2C0 + i), PINMUX_FLAG_NONE); if (err) {