From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/4] reset: Add support for the Amlogic Meson SoC Reset Controller
Date: Wed, 25 May 2016 12:14:23 +0200 [thread overview]
Message-ID: <1464171263.3545.40.camel@pengutronix.de> (raw)
In-Reply-To: <1464169758-26975-2-git-send-email-narmstrong@baylibre.com>
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
next prev parent reply other threads:[~2016-05-25 10:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 9:49 [PATCH v2 0/4] Amlogic: Meson: Add reset controller Neil Armstrong
2016-05-25 9:49 ` [PATCH v2 1/4] reset: Add support for the Amlogic Meson SoC Reset Controller Neil Armstrong
2016-05-25 10:14 ` Philipp Zabel [this message]
2016-05-26 2:42 ` Kevin Hilman
2016-05-26 11:02 ` Philipp Zabel
2016-05-26 18:42 ` Kevin Hilman
2016-05-30 16:14 ` Philipp Zabel
2016-05-25 9:49 ` [PATCH v2 2/4] dt-bindings: reset: Add bindings for the " Neil Armstrong
2016-05-25 19:10 ` Rob Herring
2016-05-26 7:30 ` Neil Armstrong
2016-05-25 9:49 ` [PATCH v2 3/4] ARM64: dts: amlogic: Enable Reset Controller on GXBB-based platforms Neil Armstrong
2016-05-25 9:49 ` [PATCH v2 4/4] ARM: dts: amlogic: Enable Reset Controller on Meson8b platforms Neil Armstrong
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=1464171263.3545.40.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--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 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).