Skip to content

Commit

Permalink
watchdog: sunxi: Add A31 watchdog support
Browse files Browse the repository at this point in the history
This patch adds support for the watchdog hardware found in A31 and
newer SoCs. This new hardware has registers at different offsets, and
the system reset control has been split out of the "mode" register
into a new "configuration" register.

Differences not supported by this driver include separate interrupt
lines for each watchdog, instead of sharing an interrupt line and
registers with the timer block.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Chen-Yu Tsai authored and Wim Van Sebroeck committed Oct 20, 2014
1 parent f2147de commit c5ec618
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/watchdog/sunxi_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,18 @@ static const struct sunxi_wdt_reg sun4i_wdt_reg = {
.wdt_reset_val = 0x02,
};

static const struct sunxi_wdt_reg sun6i_wdt_reg = {
.wdt_ctrl = 0x10,
.wdt_cfg = 0x14,
.wdt_mode = 0x18,
.wdt_timeout_shift = 4,
.wdt_reset_mask = 0x03,
.wdt_reset_val = 0x01,
};

static const struct of_device_id sunxi_wdt_dt_ids[] = {
{ .compatible = "allwinner,sun4i-a10-wdt", .data = &sun4i_wdt_reg },
{ .compatible = "allwinner,sun6i-a31-wdt", .data = &sun6i_wdt_reg },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, sunxi_wdt_dt_ids);
Expand Down

0 comments on commit c5ec618

Please sign in to comment.