Skip to content

Commit 13e8664

Browse files
chintingkuoWim Van Sebroeck
authored andcommitted
watchdog: aspeed: Add support for AST2700 platform
Add AST2700 platform support to the ASPEED watchdog driver. This includes a new per-platform configuration with SCU reset status register at SCU1_070 and support for 5 reset mask registers. Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
1 parent 0eb5429 commit 13e8664

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

drivers/watchdog/aspeed_wdt.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,24 @@ static const struct aspeed_wdt_config ast2600_config = {
8383
.num_reset_masks = 2,
8484
};
8585

86+
static const struct aspeed_wdt_config ast2700_config = {
87+
.ext_pulse_width_mask = 0xfffff,
88+
.irq_shift = 0,
89+
.irq_mask = GENMASK(31, 10),
90+
.scu = {
91+
.compatible = "aspeed,ast2700-scu0",
92+
.reset_status_reg = 0x70,
93+
.wdt_reset_mask = 0xf,
94+
.wdt_reset_mask_shift = 0,
95+
},
96+
.num_reset_masks = 5,
97+
};
98+
8699
static const struct of_device_id aspeed_wdt_of_table[] = {
87100
{ .compatible = "aspeed,ast2400-wdt", .data = &ast2400_config },
88101
{ .compatible = "aspeed,ast2500-wdt", .data = &ast2500_config },
89102
{ .compatible = "aspeed,ast2600-wdt", .data = &ast2600_config },
103+
{ .compatible = "aspeed,ast2700-wdt", .data = &ast2700_config },
90104
{ },
91105
};
92106
MODULE_DEVICE_TABLE(of, aspeed_wdt_of_table);
@@ -483,7 +497,7 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
483497
}
484498

485499
if (!of_device_is_compatible(np, "aspeed,ast2400-wdt")) {
486-
u32 reset_mask[2];
500+
u32 reset_mask[5];
487501
size_t nrstmask = wdt->cfg->num_reset_masks;
488502
u32 reg = readl(wdt->base + WDT_RESET_WIDTH);
489503
int i;

0 commit comments

Comments
 (0)