From patchwork Mon Apr 7 16:18:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 3946321 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 440D69F369 for ; Mon, 7 Apr 2014 16:18:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5819E2024C for ; Mon, 7 Apr 2014 16:18:48 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E18BE2022A for ; Mon, 7 Apr 2014 16:18:46 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WXCFu-0008Gp-GV; Mon, 07 Apr 2014 16:18:42 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WXCFs-0003WP-6k; Mon, 07 Apr 2014 16:18:40 +0000 Received: from va3ehsobe001.messaging.microsoft.com ([216.32.180.11] helo=va3outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WXCFo-0003Vn-UV for linux-arm-kernel@lists.infradead.org; Mon, 07 Apr 2014 16:18:37 +0000 Received: from mail95-va3-R.bigfish.com (10.7.14.229) by VA3EHSOBE003.bigfish.com (10.7.40.23) with Microsoft SMTP Server id 14.1.225.23; Mon, 7 Apr 2014 16:18:01 +0000 Received: from mail95-va3 (localhost [127.0.0.1]) by mail95-va3-R.bigfish.com (Postfix) with ESMTP id 347E13401B9; Mon, 7 Apr 2014 16:18:01 +0000 (UTC) X-Forefront-Antispam-Report: CIP:149.199.60.83; KIP:(null); UIP:(null); IPV:NLI; H:xsj-gw1; RD:unknown-60-83.xilinx.com; EFVD:NLI X-SpamScore: -2 X-BigFish: VPS-2(zz98dIc89bh936eI1432I4015Izz1f42h2148h1ee6h1de0h1fdah2149h2073h2146h1202h1e76h2189h1d1ah1d2ah21bch1fc6h208chzz1de098h8275bh1de097hz2fh95h839h93fhc61hd24hf0ah119dh1288h12a5h12a9h12bdh137ah13b6h1441h14ddh1504h1537h153bh162dh1631h1758h18e1h1946h19b5h1b0ah224fh1d0ch1d2eh1d3fh1dfeh1dffh1e1dh1fe8h1ff5h209eh2216h2336h2438h2461h2487h24ach24d7h2516h2545h255eh25f6h2605h268bh26d3h906i2673i1155h) Received-SPF: pass (mail95-va3: domain of xilinx.com designates 149.199.60.83 as permitted sender) client-ip=149.199.60.83; envelope-from=soren.brinkmann@xilinx.com; helo=xsj-gw1 ; helo=xsj-gw1 ; Received: from mail95-va3 (localhost.localdomain [127.0.0.1]) by mail95-va3 (MessageSwitch) id 1396887479469411_16588; Mon, 7 Apr 2014 16:17:59 +0000 (UTC) Received: from VA3EHSMHS046.bigfish.com (unknown [10.7.14.247]) by mail95-va3.bigfish.com (Postfix) with ESMTP id 64A7A36004E; Mon, 7 Apr 2014 16:17:59 +0000 (UTC) Received: from xsj-gw1 (149.199.60.83) by VA3EHSMHS046.bigfish.com (10.7.99.56) with Microsoft SMTP Server id 14.16.227.3; Mon, 7 Apr 2014 16:17:57 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-smtp1) by xsj-gw1 with esmtp (Exim 4.63) (envelope-from ) id 1WXCFP-0005Dq-Ix; Mon, 07 Apr 2014 09:18:11 -0700 Date: Mon, 7 Apr 2014 09:18:10 -0700 From: =?utf-8?B?U8O2cmVu?= Brinkmann To: Alexander Shiyan Subject: Re: [PATCH] i2c: cadence: fix Kconfig dependency References: <1396811227-8851-1-git-send-email-wsa@the-dreams.de> <1396852656.682914397@f273.i.mail.ru> <20140407065657.GO29751@pengutronix.de> <1396854155.872298456@f287.i.mail.ru> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1396854155.872298456@f287.i.mail.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-RCIS-Action: ALLOW Message-ID: <4c4d2ba5-f5f6-4589-8a48-6a88d1c16098@VA3EHSMHS046.ehs.local> X-OriginatorOrg: xilinx.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140407_121837_050538_DE2DE2B7 X-CRM114-Status: GOOD ( 24.65 ) X-Spam-Score: -2.6 (--) Cc: Wolfram Sang , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, 2014-04-07 at 11:02AM +0400, Alexander Shiyan wrote: > Mon, 7 Apr 2014 08:56:57 +0200 ?? Uwe Kleine-König : > > Hello, > ... > > > > On Sun, Apr 06, 2014 at 09:07:07PM +0200, Wolfram Sang wrote: > > > > > During development, the driver first really needed to depend on > > > > > COMMON_CLK only. Later, it was switched to writel_relaxed, but it was > > > > > forgotten to update the dependencies, so build errors occured: > > > > > > > > > > config: make ARCH=i386 allyesconfig > > > > > > > > > > All error/warnings: > > > > > > > > > > drivers/i2c/busses/i2c-cadence.c: In function 'cdns_i2c_clear_bus_hold': > > > > > >> drivers/i2c/busses/i2c-cadence.c:168:3: error: implicit declaration > > > > > >> of function 'writel_relaxed' [-Werror=implicit-function-declaration] > > > > > > > > > > Use a very safe dependency for now. > > > > > > > > > > Signed-off-by: Wolfram Sang > > > > > --- > > > > > drivers/i2c/busses/Kconfig | 2 +- > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig > > > > > index 93165ff453ab..3d3b9b3577c5 100644 > > > > > --- a/drivers/i2c/busses/Kconfig > > > > > +++ b/drivers/i2c/busses/Kconfig > > > > > @@ -378,7 +378,7 @@ config I2C_BLACKFIN_TWI_CLK_KHZ > > > > > > > > > > config I2C_CADENCE > > > > > tristate "Cadence I2C Controller" > > > > > - depends on COMMON_CLK > > > > > + depends on ARCH_ZYNQ > > > > I'd suggest: > > > > > > > > depends on ARM && (ARCH_ZYNC || COMPILE_TEST) > > > > > > ARCH_ZYNC || (ARM && COMPILE_TEST) > > > > > > Same, but more clear. > > "more clear" might be subjective, at least for me I don't see a benefit > > from one over the other. > > > > hmm, considering a (hypothetical) driver that depends on I2C and is > > available on Zync but compiles on ARM, it would need either: > > No. Look at drivers/i2c/Kconfig: I'd propose the below fix. The relaxed IO helpers are currently available on ARM only and the clock notifier used, depends on COMMON_CLK. I2C-related dependencies should be okay due to the location in Kconfig of this option. Thanks, Sören ---------------8<---------------8<----------------8<-----------------8<-----------8<------- Date: Sun, 6 Apr 2014 15:19:34 -0700 Subject: [PATCH] i2c: cadence: Add dependency on ARM Due to switching to the (read|write)l_relaxed IO helpers, building this driver fails on non-ARM architectures, which don't provide these helpers with the following error: All error/warnings: drivers/i2c/busses/i2c-cadence.c: In function 'cdns_i2c_clear_bus_hold': >> drivers/i2c/busses/i2c-cadence.c:168:3: error: implicit declaration of function 'writel_relaxed' [-Werror=implicit-function-declaration] cdns_i2c_writereg(reg & ~CDNS_I2C_CR_HOLD, CDNS_I2C_CR_OFFSET); ^ cc1: some warnings being treated as errors Make the driver additionally depend on CONFIG_ARM to fix this. Reported-by: kbuild test robot Signed-off-by: Soren Brinkmann --- drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 66e68e48218f..9f546eecd322 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -377,7 +377,7 @@ config I2C_BLACKFIN_TWI_CLK_KHZ config I2C_CADENCE tristate "Cadence I2C Controller" - depends on COMMON_CLK + depends on ARM && COMMON_CLK help Say yes here to select Cadence I2C Host Controller. This controller is e.g. used by Xilinx Zynq.