From patchwork Tue Jul 9 14:05:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amar X-Patchwork-Id: 18287 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C837025E04 for ; Tue, 9 Jul 2013 14:02:09 +0000 (UTC) Received: by mail-we0-f197.google.com with SMTP id w56sf5676390wes.0 for ; Tue, 09 Jul 2013 07:02:08 -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=c0ysg7dVpLb4U4GC7yeoMSPH4CwJuLmPndGqPj75eU4=; b=JOcUm9ZqBDphF4S8taO4wJ+PbwrKTbZaAaszj6HozzEicq/3RLbajmpD3DP4oYOuWd 20PeBpu/Ce9JZmR0INPWLIpaIXRhsksjQiHBDM8DqyOIf/BxnanWT2K+HPT73csoKi62 uqNy4RvE5aK9inEHQnT2ZSezeRUBi6zdrdTouD73dQ2j0eK1FoyYfWgoWuGhNz8Jglj7 buLmicnl7IsccE+lAL9+IeOdX0frESHeyY65xlo3CbewiWDY+yzAuUFGnO2qsEO0nNi6 5QGZEuMPA02/9sFAqZLITY5S3o5Br439I9PsPm400JnBuiq8VQuIIPLR1/YqdPnUZ2gk Xohg== X-Received: by 10.180.187.238 with SMTP id fv14mr20129543wic.0.1373378528141; Tue, 09 Jul 2013 07:02:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.87.200 with SMTP id ba8ls1307355wib.5.gmail; Tue, 09 Jul 2013 07:02:07 -0700 (PDT) X-Received: by 10.194.176.71 with SMTP id cg7mr14986578wjc.18.1373378527205; Tue, 09 Jul 2013 07:02:07 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id w5si8616979wix.54.2013.07.09.07.02.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Jul 2013 07:02:07 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 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.180; Received: by mail-ve0-f180.google.com with SMTP id pa12so4654294veb.11 for ; Tue, 09 Jul 2013 07:02:06 -0700 (PDT) X-Received: by 10.220.164.138 with SMTP id e10mr16441684vcy.27.1373378525972; Tue, 09 Jul 2013 07:02:05 -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 s13csp31686vcv; Tue, 9 Jul 2013 07:02:05 -0700 (PDT) X-Received: by 10.66.163.73 with SMTP id yg9mr28142796pab.77.1373378525048; Tue, 09 Jul 2013 07:02:05 -0700 (PDT) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id zk10si6937731pac.214.2013.07.09.07.02.04 for ; Tue, 09 Jul 2013 07:02:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of amarendra.xt@samsung.com designates 203.254.224.34 as permitted sender) client-ip=203.254.224.34; Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MPO002X69NFLZN0@mailout4.samsung.com>; Tue, 09 Jul 2013 23:02:03 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.124]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 7A.86.29708.BD71CD15; Tue, 09 Jul 2013 23:02:03 +0900 (KST) X-AuditID: cbfee690-b7f6f6d00000740c-c3-51dc17db4be0 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 14.41.28381.BD71CD15; Tue, 09 Jul 2013 23:02:03 +0900 (KST) Received: from amarendra-desktop.sisodomain.com ([107.108.73.18]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MPO006D99NAYE00@mmp2.samsung.com>; Tue, 09 Jul 2013 23:02:03 +0900 (KST) From: amar_g To: u-boot@lists.denx.de, jh80.chung@samsung.com Cc: patches@linaro.org, sjg@chromium.org, mk7.kang@samsung.com, chander.kashyap@linaro.org, afleming@gmail.com, hs@denx.de Subject: [PATCH V1 1/1] EXYNOS: Resolve the i2c compilation error for Date: Tue, 09 Jul 2013 19:35:40 +0530 Message-id: <1373378740-25734-1-git-send-email-amarendra.xt@samsung.com> X-Mailer: git-send-email 1.7.3.rc2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBLMWRmVeSWpSXmKPExsWyRsSkRve2+J1Ag96lmhY3rv9ks3i4/iaL xY4795ktbvxqY7XoONLCaDHl8BcWi29btjFavN3bye7A4TG74SKLx7xZJ1g8ds66y+5x59oe No+zd3YwevRtWcUYwBbFZZOSmpNZllqkb5fAlfH8w2emgpvCFS8unmNrYNwj0MXIwSEhYCLx vsOmi5ETyBSTuHBvPVsXIxeHkMBSRokHPZOYIRImEr9vb2aFSExnlFjVupEdJCEkMIFJYs52 FRCbTUBd4smntawgtoiAgcT0J9vBbGaBGonJ828xgdjCAq4S7Z/Pg9ksAqoS+1f2MYLYvAIe Ets+NLNALFOSOL/xNdgyCYHJ7BJr5z1lhWgQkPg2+RALxNW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5sbPWoeWAvsedSnBqTxAeNifVCjofb k6eeXaq2ctntqPlPLm++6vrYjOmzUZZFOf/UEKnUmb0zE/YncrZvZniyRfrsm/jz1i4Pl5zR FtJa5j5zd9Qka7vzV5JlUt5/nfVf+l5Yq7/Is7V7lFiKMxINtZiLihMBPUnLStkCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQnlYNG0qXU9HU/7PFha7QHk/AofjplZtnk9fjruN+LBpxheIH1AXpFgDCe52sOU4d/AAUaL X-Original-Sender: amarendra.xt@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 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 mentiond 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 'exynos_pinmux_config' [-Wimplicit-function-declaration] s3c24x0_i2c.c:545:25: error: 'PERIPH_ID_I2C0' undeclared (first use in this function) s3c24x0_i2c.c:546:10: error: 'PINMUX_FLAG_NONE' undeclared (first use in this function) make[1]: *** [/home/albert/src/u-boot-arm/build/VCMA9/drivers/i2c/s3c24x0_i2c.o] Error 1 make: *** [/home/albert/src/u-boot-arm/build/VCMA9/drivers/i2c/libi2c.o] Error 2 Signed-off-by: Rajeshwari Shinde Signed-off-by: Amar --- 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)