All of lore.kernel.org
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] remoteproc: Supply controller driver for ST's Remote Processors
Date: Thu, 27 Aug 2015 07:45:39 +0100	[thread overview]
Message-ID: <20150827064539.GD19409@x1> (raw)
In-Reply-To: <55DDF252.2010901@mentor.com>

On Wed, 26 Aug 2015, Nathan Lynch wrote:

> On 08/26/2015 08:08 AM, Lee Jones wrote:
> > --- /dev/null
> > +++ b/drivers/remoteproc/st_remoteproc.c
> > @@ -0,0 +1,300 @@
> > +/*
> > + * ST's Remote Processor Control Driver
> > + *
> > + * Copyright (C) 2015 STMicroelectronics - All Rights Reserved
> > + *
> > + * Author: Ludovic Barre <ludovic.barre@st.com>
> 
> When submitting code you didn't write, I'd say it's better practice to
> clearly indicate its provenance in the commit message.  E.g. something
> like "Driver based on code authored by Ludovic Barre for ST".  And
> obtain signoffs etc if possible.
> 
> 
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License as published by
> > + * the Free Software Foundation; either version 2 of the License.
> 
> Please review the wording here.  It's unclear whether this is intended
> to be v2-only or v2 or later.
> 
> 
> > +static int st_rproc_stop(struct rproc *rproc)
> > +{
> > +	struct st_rproc *st_rproc = rproc->priv;
> > +	int err = 0;
> > +
> > +	if (st_rproc->config->sw_reset) {
> > +		err = reset_control_assert(st_rproc->sw_reset);
> > +		if (err)
> > +			dev_warn(&rproc->dev, "Failed to assert S/W Reset\n");
> > +	}
> > +
> > +	if (st_rproc->config->pwr_reset) {
> > +		err = reset_control_assert(st_rproc->pwr_reset);
> > +		if (err)
> > +			dev_warn(&rproc->dev, "Failed to assert Power Reset\n");
> > +	}
> > +
> > +	clk_disable(st_rproc->clk);
> > +
> > +	return 0;
> > +}
> 
> Seems like st_rproc_stop should propagate errors back to its caller
> instead of always returning 0.

Good points, will fix.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Nathan Lynch <Nathan_Lynch-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ@public.gmane.org
Subject: Re: [PATCH 2/4] remoteproc: Supply controller driver for ST's Remote Processors
Date: Thu, 27 Aug 2015 07:45:39 +0100	[thread overview]
Message-ID: <20150827064539.GD19409@x1> (raw)
In-Reply-To: <55DDF252.2010901-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>

On Wed, 26 Aug 2015, Nathan Lynch wrote:

> On 08/26/2015 08:08 AM, Lee Jones wrote:
> > --- /dev/null
> > +++ b/drivers/remoteproc/st_remoteproc.c
> > @@ -0,0 +1,300 @@
> > +/*
> > + * ST's Remote Processor Control Driver
> > + *
> > + * Copyright (C) 2015 STMicroelectronics - All Rights Reserved
> > + *
> > + * Author: Ludovic Barre <ludovic.barre-qxv4g6HH51o@public.gmane.org>
> 
> When submitting code you didn't write, I'd say it's better practice to
> clearly indicate its provenance in the commit message.  E.g. something
> like "Driver based on code authored by Ludovic Barre for ST".  And
> obtain signoffs etc if possible.
> 
> 
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License as published by
> > + * the Free Software Foundation; either version 2 of the License.
> 
> Please review the wording here.  It's unclear whether this is intended
> to be v2-only or v2 or later.
> 
> 
> > +static int st_rproc_stop(struct rproc *rproc)
> > +{
> > +	struct st_rproc *st_rproc = rproc->priv;
> > +	int err = 0;
> > +
> > +	if (st_rproc->config->sw_reset) {
> > +		err = reset_control_assert(st_rproc->sw_reset);
> > +		if (err)
> > +			dev_warn(&rproc->dev, "Failed to assert S/W Reset\n");
> > +	}
> > +
> > +	if (st_rproc->config->pwr_reset) {
> > +		err = reset_control_assert(st_rproc->pwr_reset);
> > +		if (err)
> > +			dev_warn(&rproc->dev, "Failed to assert Power Reset\n");
> > +	}
> > +
> > +	clk_disable(st_rproc->clk);
> > +
> > +	return 0;
> > +}
> 
> Seems like st_rproc_stop should propagate errors back to its caller
> instead of always returning 0.

Good points, will fix.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Nathan Lynch <Nathan_Lynch@mentor.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, ohad@wizery.com,
	devicetree@vger.kernel.org, kernel@stlinux.com
Subject: Re: [PATCH 2/4] remoteproc: Supply controller driver for ST's Remote Processors
Date: Thu, 27 Aug 2015 07:45:39 +0100	[thread overview]
Message-ID: <20150827064539.GD19409@x1> (raw)
In-Reply-To: <55DDF252.2010901@mentor.com>

On Wed, 26 Aug 2015, Nathan Lynch wrote:

> On 08/26/2015 08:08 AM, Lee Jones wrote:
> > --- /dev/null
> > +++ b/drivers/remoteproc/st_remoteproc.c
> > @@ -0,0 +1,300 @@
> > +/*
> > + * ST's Remote Processor Control Driver
> > + *
> > + * Copyright (C) 2015 STMicroelectronics - All Rights Reserved
> > + *
> > + * Author: Ludovic Barre <ludovic.barre@st.com>
> 
> When submitting code you didn't write, I'd say it's better practice to
> clearly indicate its provenance in the commit message.  E.g. something
> like "Driver based on code authored by Ludovic Barre for ST".  And
> obtain signoffs etc if possible.
> 
> 
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License as published by
> > + * the Free Software Foundation; either version 2 of the License.
> 
> Please review the wording here.  It's unclear whether this is intended
> to be v2-only or v2 or later.
> 
> 
> > +static int st_rproc_stop(struct rproc *rproc)
> > +{
> > +	struct st_rproc *st_rproc = rproc->priv;
> > +	int err = 0;
> > +
> > +	if (st_rproc->config->sw_reset) {
> > +		err = reset_control_assert(st_rproc->sw_reset);
> > +		if (err)
> > +			dev_warn(&rproc->dev, "Failed to assert S/W Reset\n");
> > +	}
> > +
> > +	if (st_rproc->config->pwr_reset) {
> > +		err = reset_control_assert(st_rproc->pwr_reset);
> > +		if (err)
> > +			dev_warn(&rproc->dev, "Failed to assert Power Reset\n");
> > +	}
> > +
> > +	clk_disable(st_rproc->clk);
> > +
> > +	return 0;
> > +}
> 
> Seems like st_rproc_stop should propagate errors back to its caller
> instead of always returning 0.

Good points, will fix.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2015-08-27  6:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 13:07 [PATCH 0/4] remoteproc: Add driver for STMicroelectronics platforms Lee Jones
2015-08-26 13:07 ` Lee Jones
2015-08-26 13:08 ` [PATCH 1/4] remoteproc: dt: Provide bindings for ST's Remote Processor Controller driver Lee Jones
2015-08-26 13:08   ` Lee Jones
2015-08-26 13:08   ` Lee Jones
2015-08-26 15:59   ` Nathan Lynch
2015-08-26 15:59     ` Nathan Lynch
2015-08-26 15:59     ` Nathan Lynch
2015-08-26 16:40     ` Lee Jones
2015-08-26 16:40       ` Lee Jones
2015-08-26 16:40       ` Lee Jones
2015-08-26 13:08 ` [PATCH 2/4] remoteproc: Supply controller driver for ST's Remote Processors Lee Jones
2015-08-26 13:08   ` Lee Jones
2015-08-26 17:07   ` Nathan Lynch
2015-08-26 17:07     ` Nathan Lynch
2015-08-26 17:07     ` Nathan Lynch
2015-08-27  6:45     ` Lee Jones [this message]
2015-08-27  6:45       ` Lee Jones
2015-08-27  6:45       ` Lee Jones
2015-08-26 13:08 ` [PATCH 3/4] ARM: STiH407: Add nodes for RemoteProc Lee Jones
2015-08-26 13:08   ` Lee Jones
2015-08-26 13:08   ` Lee Jones
2015-08-26 13:08 ` [PATCH 4/4] remoteproc: debugfs: Add ability to boot remote processor using debugfs Lee Jones
2015-08-26 13:08   ` Lee Jones
2015-08-26 17:08   ` Nathan Lynch
2015-08-26 17:08     ` Nathan Lynch
2015-08-26 17:08     ` Nathan Lynch
2015-08-27  6:44     ` Lee Jones
2015-08-27  6:44       ` Lee Jones
2015-08-27  6:44       ` Lee Jones

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=20150827064539.GD19409@x1 \
    --to=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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: link
Be 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.