From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751772AbcGUXRH (ORCPT ); Thu, 21 Jul 2016 19:17:07 -0400 Received: from mail.windriver.com ([147.11.1.11]:37870 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbcGUXRE (ORCPT ); Thu, 21 Jul 2016 19:17:04 -0400 Date: Thu, 21 Jul 2016 19:16:02 -0400 From: Paul Gortmaker To: Arnd Bergmann CC: , , Mark Rutland , , Philipp Zabel , LKML , , Russell King , Rob Herring , Maxime Coquelin , Subject: Re: [PATCH v2 3/4] drivers: reset: Add STM32 reset driver Message-ID: <20160721231602.GK21225@windriver.com> References: <1469092768-17489-1-git-send-email-gabriel.fernandez@st.com> <1469092768-17489-4-git-send-email-gabriel.fernandez@st.com> <34955897.5sjo821nJx@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <34955897.5sjo821nJx@wuerfel> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Re: [PATCH v2 3/4] drivers: reset: Add STM32 reset driver] On 21/07/2016 (Thu 21:55) Arnd Bergmann wrote: > On Thursday, July 21, 2016 3:48:09 PM CEST Paul Gortmaker wrote: > > > diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile > > > index 5d65a93..64ebb0c 100644 > > > --- a/drivers/reset/Makefile > > > +++ b/drivers/reset/Makefile > > > @@ -4,6 +4,7 @@ obj-$(CONFIG_ARCH_SOCFPGA) += reset-socfpga.o > > > obj-$(CONFIG_ARCH_BERLIN) += reset-berlin.o > > > obj-$(CONFIG_MACH_PISTACHIO) += reset-pistachio.o > > > obj-$(CONFIG_ARCH_MESON) += reset-meson.o > > > +obj-$(CONFIG_ARCH_STM32) += reset-stm32.o > > > > In my tree, this Kconfig ARCH_STM32 is a bool, so... > > > > > obj-$(CONFIG_ARCH_SUNXI) += reset-sunxi.o > > > obj-$(CONFIG_ARCH_STI) += sti/ > > > obj-$(CONFIG_ARCH_HISI) += hisilicon/ > > > diff --git a/drivers/reset/reset-stm32.c b/drivers/reset/reset-stm32.c > > > new file mode 100644 > > > index 0000000..993af2a > > > --- /dev/null > > > +++ b/drivers/reset/reset-stm32.c > > > @@ -0,0 +1,113 @@ > > > +/* > > > + * Copyright (C) Maxime Coquelin 2015 > > > + * Author: Maxime Coquelin _ > > > + * License terms: GNU General Public License (GPL), version 2 > > > + * > > > + * Heavily based on sunxi driver from Maxime Ripard. > > > + */ > > > + > > > +#include > > > +#include > > > +#include > > > > ...we probably don't need module.h here or any of the other > > MODULE_ tags/macros either. Use the builtin for the > > register and all should be good. > > I wonder if we should have separate symbols for each reset driver > instead. Those could be allowed to be tristate, and could also > be enabled for compile testing on other architectures. I'm not quite clear on what you mean by the above. Maybe if you have a pointer to an example -- say like the work you mention below -- then I'll understand what you have in mind. P. -- > > I actually made a patch for that a while ago, to simplify the > dependencies around reset drivers. > > Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Gortmaker Subject: Re: [PATCH v2 3/4] drivers: reset: Add STM32 reset driver Date: Thu, 21 Jul 2016 19:16:02 -0400 Message-ID: <20160721231602.GK21225@windriver.com> References: <1469092768-17489-1-git-send-email-gabriel.fernandez@st.com> <1469092768-17489-4-git-send-email-gabriel.fernandez@st.com> <34955897.5sjo821nJx@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Content-Disposition: inline In-Reply-To: <34955897.5sjo821nJx@wuerfel> Sender: linux-kernel-owner@vger.kernel.org To: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, gabriel.fernandez@st.com, Mark Rutland , devicetree@vger.kernel.org, Philipp Zabel , LKML , patrice.chotard@st.com, Russell King , Rob Herring , Maxime Coquelin , alexandre.torgue@st.com List-Id: devicetree@vger.kernel.org [Re: [PATCH v2 3/4] drivers: reset: Add STM32 reset driver] On 21/07/2016 (Thu 21:55) Arnd Bergmann wrote: > On Thursday, July 21, 2016 3:48:09 PM CEST Paul Gortmaker wrote: > > > diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile > > > index 5d65a93..64ebb0c 100644 > > > --- a/drivers/reset/Makefile > > > +++ b/drivers/reset/Makefile > > > @@ -4,6 +4,7 @@ obj-$(CONFIG_ARCH_SOCFPGA) += reset-socfpga.o > > > obj-$(CONFIG_ARCH_BERLIN) += reset-berlin.o > > > obj-$(CONFIG_MACH_PISTACHIO) += reset-pistachio.o > > > obj-$(CONFIG_ARCH_MESON) += reset-meson.o > > > +obj-$(CONFIG_ARCH_STM32) += reset-stm32.o > > > > In my tree, this Kconfig ARCH_STM32 is a bool, so... > > > > > obj-$(CONFIG_ARCH_SUNXI) += reset-sunxi.o > > > obj-$(CONFIG_ARCH_STI) += sti/ > > > obj-$(CONFIG_ARCH_HISI) += hisilicon/ > > > diff --git a/drivers/reset/reset-stm32.c b/drivers/reset/reset-stm32.c > > > new file mode 100644 > > > index 0000000..993af2a > > > --- /dev/null > > > +++ b/drivers/reset/reset-stm32.c > > > @@ -0,0 +1,113 @@ > > > +/* > > > + * Copyright (C) Maxime Coquelin 2015 > > > + * Author: Maxime Coquelin _ > > > + * License terms: GNU General Public License (GPL), version 2 > > > + * > > > + * Heavily based on sunxi driver from Maxime Ripard. > > > + */ > > > + > > > +#include > > > +#include > > > +#include > > > > ...we probably don't need module.h here or any of the other > > MODULE_ tags/macros either. Use the builtin for the > > register and all should be good. > > I wonder if we should have separate symbols for each reset driver > instead. Those could be allowed to be tristate, and could also > be enabled for compile testing on other architectures. I'm not quite clear on what you mean by the above. Maybe if you have a pointer to an example -- say like the work you mention below -- then I'll understand what you have in mind. P. -- > > I actually made a patch for that a while ago, to simplify the > dependencies around reset drivers. > > Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: paul.gortmaker@windriver.com (Paul Gortmaker) Date: Thu, 21 Jul 2016 19:16:02 -0400 Subject: [PATCH v2 3/4] drivers: reset: Add STM32 reset driver In-Reply-To: <34955897.5sjo821nJx@wuerfel> References: <1469092768-17489-1-git-send-email-gabriel.fernandez@st.com> <1469092768-17489-4-git-send-email-gabriel.fernandez@st.com> <34955897.5sjo821nJx@wuerfel> Message-ID: <20160721231602.GK21225@windriver.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org [Re: [PATCH v2 3/4] drivers: reset: Add STM32 reset driver] On 21/07/2016 (Thu 21:55) Arnd Bergmann wrote: > On Thursday, July 21, 2016 3:48:09 PM CEST Paul Gortmaker wrote: > > > diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile > > > index 5d65a93..64ebb0c 100644 > > > --- a/drivers/reset/Makefile > > > +++ b/drivers/reset/Makefile > > > @@ -4,6 +4,7 @@ obj-$(CONFIG_ARCH_SOCFPGA) += reset-socfpga.o > > > obj-$(CONFIG_ARCH_BERLIN) += reset-berlin.o > > > obj-$(CONFIG_MACH_PISTACHIO) += reset-pistachio.o > > > obj-$(CONFIG_ARCH_MESON) += reset-meson.o > > > +obj-$(CONFIG_ARCH_STM32) += reset-stm32.o > > > > In my tree, this Kconfig ARCH_STM32 is a bool, so... > > > > > obj-$(CONFIG_ARCH_SUNXI) += reset-sunxi.o > > > obj-$(CONFIG_ARCH_STI) += sti/ > > > obj-$(CONFIG_ARCH_HISI) += hisilicon/ > > > diff --git a/drivers/reset/reset-stm32.c b/drivers/reset/reset-stm32.c > > > new file mode 100644 > > > index 0000000..993af2a > > > --- /dev/null > > > +++ b/drivers/reset/reset-stm32.c > > > @@ -0,0 +1,113 @@ > > > +/* > > > + * Copyright (C) Maxime Coquelin 2015 > > > + * Author: Maxime Coquelin _ > > > + * License terms: GNU General Public License (GPL), version 2 > > > + * > > > + * Heavily based on sunxi driver from Maxime Ripard. > > > + */ > > > + > > > +#include > > > +#include > > > +#include > > > > ...we probably don't need module.h here or any of the other > > MODULE_ tags/macros either. Use the builtin for the > > register and all should be good. > > I wonder if we should have separate symbols for each reset driver > instead. Those could be allowed to be tristate, and could also > be enabled for compile testing on other architectures. I'm not quite clear on what you mean by the above. Maybe if you have a pointer to an example -- say like the work you mention below -- then I'll understand what you have in mind. P. -- > > I actually made a patch for that a while ago, to simplify the > dependencies around reset drivers. > > Arnd