From: Neil Armstrong <narmstrong@baylibre.com>
To: Carlo Caione <carlo@caione.org>
Cc: Wim Van Sebroeck <wim@iguana.be>,
Guenter Roeck <linux@roeck-us.net>,
linux-amlogic@lists.infradead.org,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 1/3] watchdog: Add Meson GXBB Watchdog Driver
Date: Fri, 27 May 2016 10:22:07 +0200 [thread overview]
Message-ID: <574803AF.5020409@baylibre.com> (raw)
In-Reply-To: <20160526100655.GB14703@mephisto>
On 05/26/2016 12:06 PM, Carlo Caione wrote:
> On 26/05/16 09:51, Neil Armstrong wrote:
>> Add watchdog specific driver for Amlogic Meson GXBB SoC.
>>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> +
>
> [...]
>> +#define DEFAULT_TIMEOUT 10 /* seconds */
>> +
>> +#define GXBB_WDT_CTRL_REG 0x0
>> +#define GXBB_WDT_CTRL1_REG 0x4
>> +#define GXBB_WDT_TCNT_REG 0x8
>> +#define GXBB_WDT_RSET_REG 0xc
>> +
>> +#define GXBB_WDT_CTRL_EE_RESET_NOW BIT(26)
>> +
>> +#define GXBB_WDT_CTRL_CLKDIV_EN BIT(25)
>> +#define GXBB_WDT_CTRL_CLK_EN BIT(24)
>> +#define GXBB_WDT_CTRL_IRQ_EN BIT(23)
>> +#define GXBB_WDT_CTRL_EE_RESET BIT(21)
>> +#define GXBB_WDT_CTRL_XTAL_SEL (0)
>> +#define GXBB_WDT_CTRL_CLK81_SEL BIT(19)
>> +#define GXBB_WDT_CTRL_EN BIT(18)
>> +#define GXBB_WDT_CTRL_DIV_MASK (BIT(18)-1)
>> +
>> +#define GXBB_WDT_CTRL1_GPIO_PULSE BIT(17)
>> +#define GXBB_WDT_CTRL1_GPIO_POL_RESET_0 BIT(16)
>> +#define GXBB_WDT_CTRL1_GPIO_POL_RESET_1 (0)
>> +#define GXBB_WDT_CTRL1_GPIO_PULSE_CNT (BIT(16)-1)
>> +
>> +#define GXBB_WDT_TCNT_SETUP_MASK (BIT(16)-1)
>> +#define GXBB_WDT_TCNT_CNT_SHIFT 16
>
> Indentation
>
> [...]
>> +int meson_gxbb_wdt_set_timeout(struct watchdog_device *wdt_dev,
>> + unsigned int timeout)
>> +{
>> + struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
>> +
>> + if (watchdog_active(wdt_dev))
>> + meson_gxbb_wdt_stop(wdt_dev);
>> +
>> + meson_gxbb_wdt_ping(wdt_dev);
>> +
>> + writel(timeout*1000, data->reg_base + GXBB_WDT_TCNT_REG);
>
> nit: spaces around "*"
>
> [...]
>> + data->clk = devm_clk_get(&pdev->dev, NULL);
>> + if (IS_ERR(data->clk))
>> + return PTR_ERR(data->clk);
>> +
>> + clk_prepare_enable(data->clk);
>
> Do we need to merge the clock controller driver before this?
It's not necessary, currently it only selects the xtal source, so it's works with the current upstream architecture.
Neil
>
> Cheers,
>
next prev parent reply other threads:[~2016-05-27 8:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 7:51 [RFC PATCH 0/3] watchdog: Add Amlogic Meson GXBB Watchdog Timer driver Neil Armstrong
2016-05-26 7:51 ` [RFC PATCH 1/3] watchdog: Add Meson GXBB Watchdog Driver Neil Armstrong
2016-05-26 10:06 ` Carlo Caione
2016-05-27 8:22 ` Neil Armstrong [this message]
2016-05-26 13:54 ` Guenter Roeck
2016-05-27 8:25 ` Neil Armstrong
2016-05-27 13:48 ` Guenter Roeck
2016-05-27 15:24 ` Neil Armstrong
2016-05-26 7:51 ` [RFC PATCH 2/3] dt-bindings: watchdog: Add Meson GXBB Watchdog bindings Neil Armstrong
2016-05-26 10:09 ` Carlo Caione
2016-05-26 7:51 ` [RFC PATCH 3/3] ARM64: dts: amlogic: meson-gxbb: Add watchdog node 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=574803AF.5020409@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=carlo@caione.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@iguana.be \
/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