From patchwork Tue Jul 9 12:44:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amar X-Patchwork-Id: 18285 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 226F825DFF for ; Tue, 9 Jul 2013 12:41:09 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id bv4sf6828047qab.2 for ; Tue, 09 Jul 2013 05:41: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=EPx1Ck/a8uIn6lEbQiPKjNvovvj+p8avqr1EUB4S6e0=; b=KAd9LXEAkH4A33wcZn3/N6KX5DOZlU5lvga78/F9VAkteAxY6PRo5qYklqhsQasRIr 6/K5HlSumZCy99gqRmb0XUFzvR3gCm16VXmhHH7xSbMC7tZrtlP+q3VydOSLS0VLIvvs 8C+ELh0KyoVb7kE88Iom0awqFK3skcQ2vevf1nF8is/BihGWBrUu2d6RK3iJfQuQ8wSE u3c/++aCxf5hQcxKc5rLiG4n6lKH4A6ko6HZAtSMjA5s1y049FqswFvJ7uLi0Wx8Osxx UZGAT+iCleaN63OfYZbLN66P1xm8Mu68/rYyA+utSom++wIVDxIocJ0/xZ7v71JNZS1Z B1Jg== X-Received: by 10.236.54.135 with SMTP id i7mr14624470yhc.33.1373373668470; Tue, 09 Jul 2013 05:41:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.58.4 with SMTP id m4ls2272031qeq.52.gmail; Tue, 09 Jul 2013 05:41:08 -0700 (PDT) X-Received: by 10.221.24.75 with SMTP id rd11mr16283932vcb.81.1373373668188; Tue, 09 Jul 2013 05:41:08 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id p4si7604268vcm.96.2013.07.09.05.41.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Jul 2013 05:41:08 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 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.179; Received: by mail-ve0-f179.google.com with SMTP id d10so4551779vea.38 for ; Tue, 09 Jul 2013 05:41:08 -0700 (PDT) X-Received: by 10.221.21.74 with SMTP id qr10mr16117404vcb.25.1373373668065; Tue, 09 Jul 2013 05:41:08 -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 s13csp27567vcv; Tue, 9 Jul 2013 05:41:07 -0700 (PDT) X-Received: by 10.68.166.5 with SMTP id zc5mr26401100pbb.16.1373373666986; Tue, 09 Jul 2013 05:41:06 -0700 (PDT) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id so1si16499790pab.119.2013.07.09.05.41.06 for ; Tue, 09 Jul 2013 05:41:06 -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 epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MPO004125W55MQ0@mailout4.samsung.com>; Tue, 09 Jul 2013 21:41:05 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.125]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 2B.C7.08825.1E40CD15; Tue, 09 Jul 2013 21:41:05 +0900 (KST) X-AuditID: cbfee68e-b7f276d000002279-ab-51dc04e1f129 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id C8.D3.28381.1E40CD15; Tue, 09 Jul 2013 21:41:05 +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 <0MPO00LTI5VYO620@mmp1.samsung.com>; Tue, 09 Jul 2013 21:41:05 +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 V0 1/1] Resolve i2c compilation error for non-FDT case Date: Tue, 09 Jul 2013 18:14:29 +0530 Message-id: <1373373869-20357-1-git-send-email-amarendra.xt@samsung.com> X-Mailer: git-send-email 1.7.3.rc2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJLMWRmVeSWpSXmKPExsWyRsSkVvchy51Ag01LNS1uXP/JZvFw/U0W ix137jNb3PjVxmrRcaSF0WLK4S8sFt+2bGO0eLu3k92Bw2N2w0UWj3mzTrB47Jx1l93jzrU9 bB5n7+xg9OjbsooxgC2KyyYlNSezLLVI3y6BK+PViutsBdeEKz5sfM/UwLhLoIuRk0NCwERi zofrrBC2mMSFe+vZQGwhgaWMEm/PmMHUTFjZCBTnAoovYpTY+K+NCcKZwCSxsaWTHaSKTUBd 4smntWCTRAQMJKY/2Q5mMwvUSEyef4sJxBYWcJPYvuASC4jNIqAq8XvNA7BtvAIeEr3N+5gg tilJnN/4mhVkgYRAP7vExmkn2SEaB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9QJFopuyXjOtOdO9Faz/I+qN6zTnqYvN7mWXZ7f/E1k BqOJp+C5Zoc5b/JFGIW3PNXn/uwgEyzRsiQ+1kx8OWfU1T88X5YGsYWFbZyfutDI0Oz1H8kf CdNm/FOUzrH9ZhnTpiJpq9gk+kLXJddi+beHSizFGYmGWsxFxYkAE5SpidoCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQn0CRCQYIieMKEXpZe5lECfdJnUq3zhV5K/Y8uWXHmp5lcOdcWCYvVzD7xzc+w/AKArlR9j X-Original-Sender: amarendra.xt@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.179 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 | 9 +++++++++ drivers/i2c/s3c24x0_i2c.c | 9 +-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index ae1f077..262398f 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -332,6 +332,15 @@ 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)