From: Philipp Zabel <p.zabel@pengutronix.de>
To: Nava kishore Manne <nava.manne@xilinx.com>,
robh+dt@kernel.org, mark.rutland@arm.com,
michal.simek@xilinx.com, rajanv@xilinx.com, jollys@xilinx.com,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, chinnikishore369@gmail.com
Subject: Re: [PATCH 3/3] reset: reset-zynqmp: Adding support for Xilinx zynqmp reset controller.
Date: Fri, 19 Oct 2018 11:03:13 +0200 [thread overview]
Message-ID: <1539939793.3395.2.camel@pengutronix.de> (raw)
In-Reply-To: <20181020084107.28251-4-nava.manne@xilinx.com>
Hi Nava,
On Sat, 2018-10-20 at 14:11 +0530, Nava kishore Manne wrote:
> Add a reset controller driver for Xilinx Zynq UltraScale+ MPSoC.
> The zynqmp reset-controller has the ability to reset lines
> connected to different blocks and peripheral in the Soc.
>
> Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> ---
> Changes for v1:
> -None.
I had comments on RFC v3 that are not addressed yet, see below.
> --- /dev/null
> +++ b/drivers/reset/reset-zynqmp.c
> @@ -0,0 +1,117 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (C) 2018 Xilinx, Inc.
> + *
> + */
> +
> +#include <linux/io.h>
Unnecessary.
[...]
> +static int zynqmp_reset_status(struct reset_controller_dev *rcdev,
> + unsigned long id)
> +{
> + struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev);
> + int val, err;
> +
> + err = priv->eemi_ops->reset_get_status(ZYNQMP_RESET_ID + id, &val);
> + if (!err)
> + return -EINVAL;
Should return error code, and only if there is an error:
if (err)
return err;
> + return val;
> +}
> +
> +static int zynqmp_reset_reset(struct reset_controller_dev *rcdev,
> + unsigned long id)
> +{
> + struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev);
> +
> + return priv->eemi_ops->reset_assert(ZYNQMP_RESET_ID + id,
> + PM_RESET_ACTION_PULSE);
> +}
> +
> +static struct reset_control_ops zynqmp_reset_ops = {
Should be const:
static const struct reset_control_ops zynqmp_reset_ops = {
> + .reset = zynqmp_reset_reset,
> + .assert = zynqmp_reset_assert,
> + .deassert = zynqmp_reset_deassert,
> + .status = zynqmp_reset_status,
> +};
> +
> +static int zynqmp_reset_probe(struct platform_device *pdev)
> +{
> + struct zynqmp_reset_data *priv;
> +
> + priv = devm_kzalloc(&pdev->dev,
> + sizeof(*priv), GFP_KERNEL);
Fits on one line:
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
regards
Philipp
next prev parent reply other threads:[~2018-10-19 9:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-20 8:41 [PATCH 0/3] Add reset driver support for ZynqMP Nava kishore Manne
2018-10-19 8:40 ` [PATCH 1/3] firmware: xilinx: Add reset API's Nava kishore Manne
2018-10-19 8:40 ` [PATCH 2/3] dt-bindings: reset: Add bindings for ZynqMP reset driver Nava kishore Manne
2018-10-20 8:41 ` [PATCH 3/3] reset: reset-zynqmp: Adding support for Xilinx zynqmp reset controller Nava kishore Manne
2018-10-19 9:03 ` Philipp Zabel [this message]
2018-10-19 9:20 ` Nava kishore Manne
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=1539939793.3395.2.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=chinnikishore369@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jollys@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=michal.simek@xilinx.com \
--cc=nava.manne@xilinx.com \
--cc=rajanv@xilinx.com \
--cc=robh+dt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).