Skip to content

Commit

Permalink
watchdog: imx2_wdt: Use register definition in regmap_write()
Browse files Browse the repository at this point in the history
In order to improve readability it is better to pass the register name
definition rather than to pass its hardcoded offset.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Fabio Estevam authored and Wim Van Sebroeck committed Oct 28, 2015
1 parent 9dd4e17 commit 9493c0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/watchdog/imx2_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ static int imx2_restart_handler(struct notifier_block *this, unsigned long mode,
struct imx2_wdt_device,
restart_handler);
/* Assert SRS signal */
regmap_write(wdev->regmap, 0, wcr_enable);
regmap_write(wdev->regmap, IMX2_WDT_WCR, wcr_enable);
/*
* Due to imx6q errata ERR004346 (WDOG: WDOG SRS bit requires to be
* written twice), we add another two writes to ensure there must be at
* least two writes happen in the same one 32kHz clock period. We save
* the target check here, since the writes shouldn't be a huge burden
* for other platforms.
*/
regmap_write(wdev->regmap, 0, wcr_enable);
regmap_write(wdev->regmap, 0, wcr_enable);
regmap_write(wdev->regmap, IMX2_WDT_WCR, wcr_enable);
regmap_write(wdev->regmap, IMX2_WDT_WCR, wcr_enable);

/* wait for reset to assert... */
mdelay(500);
Expand Down

0 comments on commit 9493c0d

Please sign in to comment.