Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1406811

Re: [PATCH v2 1/4] reset: Add support for the Amlogic Meson SoC Reset Controller

From Philipp Zabel <p.zabel@pengutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/4] reset: Add support for the Amlogic Meson SoC Reset Controller
Date 2016-05-25 12:20 +0200
Message-ID <rCE4V-8dd-17@gated-at.bofh.it> (permalink)
References <rCDBU-7Ok-25@gated-at.bofh.it> <rCDBU-7Ok-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Neil,

looks fine, just two comments below.

Am Mittwoch, den 25.05.2016, 11:49 +0200 schrieb Neil Armstrong:
> This patch adds the platform driver for the Amlogic Meson SoC Reset
> Controller.
> 
> The Meson8b and GXBB SoCs are supported.
> 
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>  drivers/reset/Makefile      |   1 +
>  drivers/reset/reset-meson.c | 137 ++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 138 insertions(+)
>  create mode 100644 drivers/reset/reset-meson.c
> 
[...]
> diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
> new file mode 100644
> index 0000000..98087ae
> --- /dev/null
> +++ b/drivers/reset/reset-meson.c
[...]
> +static int meson_reset_reset(struct reset_controller_dev *rcdev,
> +			      unsigned long id)
> +{
> +	struct meson_reset *data =
> +		container_of(rcdev, struct meson_reset, rcdev);
> +	unsigned int bank = id / BITS_PER_REG;
> +	unsigned int offset = id % BITS_PER_REG;
> +	void *reg_addr = data->reg_base + (bank << 2);

We lost the __iomem here.

> +
> +	if (bank >= REG_COUNT)
> +		return -EINVAL;
> +
> +	writel(BIT(offset), reg_addr);
> +
> +	return 0;
> +}
> +
> +static const struct reset_control_ops meson_reset_ops = {
> +	.reset		= meson_reset_reset,
> +};
> +
> +static const struct of_device_id meson_reset_dt_ids[] = {
> +	 { .compatible = "amlogic,meson8b-reset", },
> +	 { .compatible = "amlogic,meson-gxbb-reset", },
> +	 { /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);
[...]
> +MODULE_ALIAS("platform:meson_reset");

And I think you can drop the MODULE_ALIAS since of: modaliases will be
generated from the MODULE_DEVICE_TABLE above. This driver is only ever
going to be probed from device tree, isn't it?

> +MODULE_AUTHOR("Neil Armstrong <narmstrong@baylibre.com>");
> +MODULE_DESCRIPTION("Amlogic Meson Reset Controller driver");
> +MODULE_LICENSE("Dual BSD/GPL");

regards
Philipp

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/4] reset: Add support for the Amlogic Meson SoC Reset Controller Neil Armstrong <narmstrong@baylibre.com> - 2016-05-25 11:50 +0200
  Re: [PATCH v2 1/4] reset: Add support for the Amlogic Meson SoC  Reset Controller Philipp Zabel <p.zabel@pengutronix.de> - 2016-05-25 12:20 +0200
  Re: [PATCH v2 1/4] reset: Add support for the Amlogic Meson SoC  Reset Controller Philipp Zabel <p.zabel@pengutronix.de> - 2016-05-26 13:10 +0200
    Re: [PATCH v2 1/4] reset: Add support for the Amlogic Meson SoC Reset Controller Kevin Hilman <khilman@baylibre.com> - 2016-05-26 20:50 +0200
      Re: [PATCH v2 1/4] reset: Add support for the Amlogic Meson SoC  Reset Controller Philipp Zabel <p.zabel@pengutronix.de> - 2016-05-30 18:20 +0200

csiph-web