From: "Sören Brinkmann" <soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org> To: Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org> Cc: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Wolfram Sang" <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org> Subject: Re: [PATCH] i2c: cadence: fix Kconfig dependency Date: Mon, 7 Apr 2014 09:18:10 -0700 [thread overview] Message-ID: <4c4d2ba5-f5f6-4589-8a48-6a88d1c16098@VA3EHSMHS046.ehs.local> (raw) In-Reply-To: <1396854155.872298456-PhO68MlTG7BsdVUOrk1QfQ@public.gmane.org> On Mon, 2014-04-07 at 11:02AM +0400, Alexander Shiyan wrote: > Mon, 7 Apr 2014 08:56:57 +0200 от Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>: > > 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 <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org> > > > > > --- > > > > > 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 <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Signed-off-by: Soren Brinkmann <soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org> --- 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. -- 1.9.1.1.gbb9f595
WARNING: multiple messages have this Message-ID (diff)
From: soren.brinkmann@xilinx.com (Sören Brinkmann) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] i2c: cadence: fix Kconfig dependency Date: Mon, 7 Apr 2014 09:18:10 -0700 [thread overview] Message-ID: <4c4d2ba5-f5f6-4589-8a48-6a88d1c16098@VA3EHSMHS046.ehs.local> (raw) In-Reply-To: <1396854155.872298456@f287.i.mail.ru> On Mon, 2014-04-07 at 11:02AM +0400, Alexander Shiyan wrote: > Mon, 7 Apr 2014 08:56:57 +0200 ?? Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>: > > 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 <wsa@the-dreams.de> > > > > > --- > > > > > 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 <fengguang.wu@intel.com> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> --- 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. -- 1.9.1.1.gbb9f595
next prev parent reply other threads:[~2014-04-07 16:18 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-04-06 19:07 [PATCH] i2c: cadence: fix Kconfig dependency Wolfram Sang 2014-04-06 19:07 ` Wolfram Sang [not found] ` <1396811227-8851-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org> 2014-04-06 22:13 ` Sören Brinkmann 2014-04-06 22:13 ` Sören Brinkmann 2014-04-07 6:31 ` Uwe Kleine-König 2014-04-07 6:31 ` Uwe Kleine-König 2014-04-07 6:37 ` Alexander Shiyan 2014-04-07 6:37 ` Alexander Shiyan [not found] ` <1396852656.682914397-OsTKtXgVMwVsdVUOrk1QfQ@public.gmane.org> 2014-04-07 6:56 ` Uwe Kleine-König 2014-04-07 6:56 ` Uwe Kleine-König [not found] ` <20140407065657.GO29751-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2014-04-07 7:02 ` Alexander Shiyan 2014-04-07 7:02 ` Alexander Shiyan [not found] ` <1396854155.872298456-PhO68MlTG7BsdVUOrk1QfQ@public.gmane.org> 2014-04-07 16:18 ` Sören Brinkmann [this message] 2014-04-07 16:18 ` Sören Brinkmann [not found] ` <4c4d2ba5-f5f6-4589-8a48-6a88d1c16098-+Ck8Kgl/v09cIS6rUbAYerjjLBE8jN/0@public.gmane.org> 2014-05-21 8:29 ` Wolfram Sang 2014-05-21 8:29 ` Wolfram Sang 2014-05-21 16:00 ` Sören Brinkmann 2014-05-21 16:00 ` Sören Brinkmann [not found] ` <78a702ca-5001-444a-b2df-a64de17ffcb6-neA4ZlFjCT0GPAd83OwqBWYJ4DzVTqeXkX/xN29GLwg@public.gmane.org> 2014-05-22 4:58 ` Michal Simek 2014-05-22 4:58 ` Michal Simek 2014-04-07 15:36 ` Sören Brinkmann 2014-04-07 15:36 ` Sören Brinkmann [not found] ` <dfab53fa-8b3c-4eb0-90b8-7df779ce68da-8XeO8fnFoNFDUMyIFHz4objjLBE8jN/0@public.gmane.org> 2014-04-07 17:50 ` Uwe Kleine-König 2014-04-07 17:50 ` Uwe Kleine-König [not found] ` <20140407063100.GN29751-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2014-04-07 6:39 ` Michal Simek 2014-04-07 6:39 ` Michal Simek [not found] ` <5342481B.6020600-pSz03upnqPeHXe+LvDLADg@public.gmane.org> 2014-04-07 6:56 ` Wolfram Sang 2014-04-07 6:56 ` Wolfram Sang 2014-04-07 7:00 ` Michal Simek 2014-04-07 7:00 ` Michal Simek 2014-04-08 8:33 ` Michal Simek 2014-04-08 8:33 ` Michal Simek 2014-04-07 15:37 ` Sören Brinkmann 2014-04-07 15:37 ` Sören Brinkmann 2014-04-07 16:14 ` Sören Brinkmann 2014-04-07 16:14 ` Sören Brinkmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4c4d2ba5-f5f6-4589-8a48-6a88d1c16098@VA3EHSMHS046.ehs.local \ --to=soren.brinkmann-gjffaj9ahvfqt0dzr+alfa@public.gmane.org \ --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=shc_work-JGs/UdohzUI@public.gmane.org \ --cc=u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \ --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.