From patchwork Wed Jul 10 05:12:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amar X-Patchwork-Id: 18299 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DBFB725DFF for ; Wed, 10 Jul 2013 05:08:56 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id 1sf8002851qec.7 for ; Tue, 09 Jul 2013 22:08:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:x-auditid:from:to:cc:subject:date:message-id:x-mailer :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=/gkG6GL6Icj4nkYpG1d2lqLXMG5eHBfd0GcPG1y1j6g=; b=YDj5ut+gygvmYy4xawV31vVDnytsW06TSdzAyFvFDbGrpnLE+RzPsisc1JswEtgMY3 tq+kT89hEz3OjxTDpv6tCpTqXqYNV89YPXM7lvEXz5I2y1TaTptXOhODY3sA/eh0z9hN 0vxluRdNvZa2GrowqId/s/zKuDEpvNIr5aH0hUHuAJkp3SkZFst7QuzYnZEZ5Vd3R4RQ 1Kj0qrmfelzdPBZRqq2qJpfliUoyhtLLlwqP4a46BXIvuaSLJz3CEuF0S3k270ajmsim FwqfDDFAXXPFPhaYoPm+wvpTScaShnYFi8r5zMUdyiTKFjH3Vrs5KaPjhJpYIdp9yUX3 NU0Q== X-Received: by 10.236.129.178 with SMTP id h38mr14908480yhi.12.1373432936112; Tue, 09 Jul 2013 22:08:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.17.201 with SMTP id q9ls2642558qed.48.gmail; Tue, 09 Jul 2013 22:08:55 -0700 (PDT) X-Received: by 10.52.231.130 with SMTP id tg2mr14661999vdc.84.1373432935883; Tue, 09 Jul 2013 22:08:55 -0700 (PDT) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id sj10si8722799vdc.144.2013.07.09.22.08.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Jul 2013 22:08:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id e12so5059413vbg.2 for ; Tue, 09 Jul 2013 22:08:55 -0700 (PDT) X-Received: by 10.52.91.202 with SMTP id cg10mr15261592vdb.85.1373432935765; Tue, 09 Jul 2013 22:08:55 -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.220.149.77 with SMTP id s13csp5914vcv; Tue, 9 Jul 2013 22:08:55 -0700 (PDT) X-Received: by 10.66.252.234 with SMTP id zv10mr31417782pac.186.1373432934555; Tue, 09 Jul 2013 22:08:54 -0700 (PDT) Received: from mailout3.samsung.com (mailout3.samsung.com. [203.254.224.33]) by mx.google.com with ESMTP id nf7si18437139pbc.63.2013.07.09.22.08.53 for ; Tue, 09 Jul 2013 22:08:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of amarendra.xt@samsung.com designates 203.254.224.33 as permitted sender) client-ip=203.254.224.33; Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MPP003Z9FMAWWF0@mailout3.samsung.com>; Wed, 10 Jul 2013 14:08:53 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 25.A5.11618.56CECD15; Wed, 10 Jul 2013 14:08:53 +0900 (KST) X-AuditID: cbfee691-b7fef6d000002d62-e4-51dcec65f063 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 86.5C.21068.46CECD15; Wed, 10 Jul 2013 14:08:52 +0900 (KST) Received: from amarendra-desktop.sisodomain.com ([107.108.73.18]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MPP00JF8FMN4YT0@mmp1.samsung.com>; Wed, 10 Jul 2013 14:08:52 +0900 (KST) From: amar_g To: u-boot@lists.denx.de Cc: patches@linaro.org, sjg@chromium.org, mk7.kang@samsung.com, chander.kashyap@linaro.org, afleming@gmail.com, hs@denx.de Subject: [PATCH V2 1/1] EXYNOS: Resolve the i2c compilation error for Date: Wed, 10 Jul 2013 10:42:29 +0530 Message-id: <1373433149-26283-1-git-send-email-amarendra.xt@samsung.com> X-Mailer: git-send-email 1.7.3.rc2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsWyRsSkVjf1zZ1Ag8ObOSxuXP/JZvFw/U0W ix137jNbdBxpYbSYcvgLi8W3LdsYLd7u7WR3YPeY3XCRxWPerBMsHjtn3WX3uHNtD5vH2Ts7 GD36tqxiDGCL4rJJSc3JLEst0rdL4Mq49e4Bc0G7cMWbeavZGhhP8HcxcnJICJhITOvbygxh i0lcuLeerYuRi0NIYCmjxNf1d1lhit7M+8ECkVjEKPFg6XNGkISQwAQmie4+TRCbTUBd4smn tWANIgISEr/6r4LVMAvUSEyef4sJxBYWcJVofPARLM4ioCqxekkP2GZeAQ+JSRdbGSGWKUmc 3/gaanE3u8TLl9UQ9QIS3yYfAjqC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Z6q7YqY+ztgQ9kQrXPGwUK6hZsPXCipP8 XJPFO9s3T7m1OzJGr7KBP0HviXPam78Xkmw+76sKv3n/cJPOje8h376c/sSwp/fx3AdTttxh 73P/eWXjPk05ZtPZ7Mu+hDN2bNX4fE7dTYmlOCPRUIu5qDgRABXsQJbUAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQkEf3Zv6ooSWMgjsHq+Sco5MWil+uJQ4qirG2hBs41df6IFLgWZLcvYGBdpUIZYfcboy40G X-Original-Sender: amarendra.xt@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 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 resolves the below mentioned compilation error of i2c driver for non-FDT case Compilation error: s3c24x0_i2c.c: In function 'board_i2c_init': s3c24x0_i2c.c:544:18: error: 'CONFIG_MAX_I2C_NUM' undeclared (first use in this function) s3c24x0_i2c.c:544:18: note: each undeclared identifier is reported only once for each function it appears in s3c24x0_i2c.c:545:3: warning: implicit declaration of function Signed-off-by: Rajeshwari Shinde Signed-off-by: Amar --- Changes since V0: 1) Updated the below in response to review comments a) Added the prefix 'EXYNOS' to title of the patch. Changes since V1: 1) Updated the below in response to review comments a) Limited info on "Compilation error" message for 5 lines. b) Changed the spelling of 'mentiond' to 'mentioned'. board/samsung/smdk5250/smdk5250.c | 10 ++++++++++ drivers/i2c/s3c24x0_i2c.c | 9 +-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index ae1f077..f1d3d97 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -332,6 +332,16 @@ static int board_uart_init(void) return ret; } +void board_i2c_init(const void *blob) +{ + int i; + + for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) { + exynos_pinmux_config((PERIPH_ID_I2C0 + i), + PINMUX_FLAG_NONE); + } +} + #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c index 3fc1c5b..382e4c2 100644 --- a/drivers/i2c/s3c24x0_i2c.c +++ b/drivers/i2c/s3c24x0_i2c.c @@ -515,10 +515,10 @@ 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; @@ -540,15 +540,8 @@ 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)