Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

watchdog: aspeed_wdt: Reorder output signal register configuration

If the output driving type is push-pull mode, the output
polarity should be selected in advance. Otherwise, an unexpected
value will be output at the moment of changing to push-pull mode.
Thus, output polarity, WDT18[31], must be configured before
changing driving type, WDT18[30].

Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Bonnie Lo <Bonnie_Lo@wiwynn.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20220819094905.1962513-1-chin-ting_kuo@aspeedtech.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Chin-Ting Kuo and committed by
Wim Van Sebroeck
19f04459 891862d5

+8 -8
+8 -8
drivers/watchdog/aspeed_wdt.c
··· 332 332 u32 reg = readl(wdt->base + WDT_RESET_WIDTH); 333 333 334 334 reg &= config->ext_pulse_width_mask; 335 - if (of_property_read_bool(np, "aspeed,ext-push-pull")) 336 - reg |= WDT_PUSH_PULL_MAGIC; 337 - else 338 - reg |= WDT_OPEN_DRAIN_MAGIC; 339 - 340 - writel(reg, wdt->base + WDT_RESET_WIDTH); 341 - 342 - reg &= config->ext_pulse_width_mask; 343 335 if (of_property_read_bool(np, "aspeed,ext-active-high")) 344 336 reg |= WDT_ACTIVE_HIGH_MAGIC; 345 337 else 346 338 reg |= WDT_ACTIVE_LOW_MAGIC; 339 + 340 + writel(reg, wdt->base + WDT_RESET_WIDTH); 341 + 342 + reg &= config->ext_pulse_width_mask; 343 + if (of_property_read_bool(np, "aspeed,ext-push-pull")) 344 + reg |= WDT_PUSH_PULL_MAGIC; 345 + else 346 + reg |= WDT_OPEN_DRAIN_MAGIC; 347 347 348 348 writel(reg, wdt->base + WDT_RESET_WIDTH); 349 349 }