diff mbox

[v3,2/4] watchdog: meson: Add meson8b SoC specific data

Message ID 1446985137-25498-3-git-send-email-carlo@caione.org (mailing list archive)
State New, archived
Headers show

Commit Message

Carlo Caione Nov. 8, 2015, 12:18 p.m. UTC
From: Carlo Caione <carlo@endlessm.com>

Add SoC specific data in the watchdog driver for the meson8b SoC.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
---
 drivers/watchdog/meson_wdt.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Guenter Roeck Nov. 9, 2015, 3:03 p.m. UTC | #1
On 11/08/2015 04:18 AM, Carlo Caione wrote:
> From: Carlo Caione <carlo@endlessm.com>
>
> Add SoC specific data in the watchdog driver for the meson8b SoC.
>
> Signed-off-by: Carlo Caione <carlo@endlessm.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/meson_wdt.c | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
> index 89734f0..3ec1e91 100644
> --- a/drivers/watchdog/meson_wdt.c
> +++ b/drivers/watchdog/meson_wdt.c
> @@ -52,6 +52,12 @@ static struct meson_wdt_data meson6_wdt_data = {
>   	.count_unit		= 100000, /* 10 us */
>   };
>
> +static struct meson_wdt_data meson8b_wdt_data = {
> +	.enable			= BIT(19),
> +	.terminal_count_mask	= 0xffff,
> +	.count_unit		= 7812, /* 128 us */
> +};
> +
>   struct meson_wdt_dev {
>   	struct watchdog_device wdt_dev;
>   	void __iomem *wdt_base;
> @@ -153,6 +159,7 @@ static const struct watchdog_ops meson_wdt_ops = {
>
>   static const struct of_device_id meson_wdt_dt_ids[] = {
>   	{ .compatible = "amlogic,meson6-wdt", .data = &meson6_wdt_data },
> +	{ .compatible = "amlogic,meson8b-wdt", .data = &meson8b_wdt_data },
>   	{ /* sentinel */ }
>   };
>   MODULE_DEVICE_TABLE(of, meson_wdt_dt_ids);
>
diff mbox

Patch

diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
index 89734f0..3ec1e91 100644
--- a/drivers/watchdog/meson_wdt.c
+++ b/drivers/watchdog/meson_wdt.c
@@ -52,6 +52,12 @@  static struct meson_wdt_data meson6_wdt_data = {
 	.count_unit		= 100000, /* 10 us */
 };
 
+static struct meson_wdt_data meson8b_wdt_data = {
+	.enable			= BIT(19),
+	.terminal_count_mask	= 0xffff,
+	.count_unit		= 7812, /* 128 us */
+};
+
 struct meson_wdt_dev {
 	struct watchdog_device wdt_dev;
 	void __iomem *wdt_base;
@@ -153,6 +159,7 @@  static const struct watchdog_ops meson_wdt_ops = {
 
 static const struct of_device_id meson_wdt_dt_ids[] = {
 	{ .compatible = "amlogic,meson6-wdt", .data = &meson6_wdt_data },
+	{ .compatible = "amlogic,meson8b-wdt", .data = &meson8b_wdt_data },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, meson_wdt_dt_ids);