arm: at91: wdt: Convert watchdog driver to dm
Subsystems (4)
PATCH 1/1 arm: at91: wdt: Convert watchdog driver to dm
Convert the Watchdog driver for AT91SAM9x processors to support the driver model and device tree
--- arch/arm/mach-at91/include/mach/at91_wdt.h | 12 +++- drivers/watchdog/Kconfig | 7 ++ drivers/watchdog/Makefile | 2 +- drivers/watchdog/at91sam9_wdt.c | 105 +++++++++++++++++++++-------- 4 files changed, 95 insertions(+), 31 deletions(-)
arch/arm/mach-at91/include/mach/at91_wdt.h +9 -3
@@ -4,7 +4,7 @@* * Copyright (C) 2008 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> * Copyright (C) 2007 Andrew Victor -* Copyright (C) 2007 Atmel Corporation. +* Copyright (C) 2018 Microchip Technology Inc. * * Watchdog Timer (WDT) - System peripherals regsters. * Based on AT91SAM9261 datasheet revision D.
@@ -27,15 +27,21 @@ typedef struct at91_wdt {#endif +/* Watchdog Control Register */ +#define AT91_WDT_CR 0x00#define AT91_WDT_CR_WDRSTT 1#define AT91_WDT_CR_KEY 0xa5000000/* KEY Password */ -#define AT91_WDT_MR_WDV (x) (x & 0xfff) +/* Watchdog Mode Register*/ +#define AT91_WDT_MR 0X04 +#define AT91_WDT_MR_WDV (0xfff << 0) +#define AT91_WDT_MR_SET_WDV (x) ((x) & AT91_WDT_MR_WDV)#define AT91_WDT_MR_WDFIEN 0x00001000#define AT91_WDT_MR_WDRSTEN 0x00002000#define AT91_WDT_MR_WDRPROC 0x00004000#define AT91_WDT_MR_WDDIS 0x00008000 -#define AT91_WDT_MR_WDD (x) ((x & 0xfff) << 16) +#define AT91_WDT_MR_WDD (0xfff << 16) +#define AT91_WDT_MR_SET_WDD (x) (((x) << 16) & AT91_WDT_MR_WDD)#define AT91_WDT_MR_WDDBGHLT 0x10000000#define AT91_WDT_MR_WDIDLEHLT 0x20000000
drivers/watchdog/Kconfig +7 -0
@@ -111,4 +111,11 @@ config XILINX_TB_WATCHDOG Select this to enable Xilinx Axi watchdog timer, which can be found on some Xilinx Microblaze Platforms. +config WDT_AT91 + bool "AT91 watchdog timer support" + depends on WDT + help + Select this to enable Microchip watchdog timer, which can be found on + some AT91 devices. + endmenu
drivers/watchdog/Makefile +1 -1
@@ -3,7 +3,7 @@ # (C) Copyright 2008 # Wolfgang Denk, DENX Software Engineering, wd at denx.de. -obj-$(CONFIG_AT91SAM9_WATCHDOG) += at91sam9_wdt.o +obj-$(CONFIG_WDT_AT91) += at91sam9_wdt.o obj-$(CONFIG_FTWDT010_WATCHDOG) += ftwdt010_wdt.o ifneq (,$(filter $(SOC), mx31 mx35 mx5 mx6 mx7 vf610)) obj-y += imx_watchdog.o
drivers/watchdog/at91sam9_wdt.c +78 -27
148 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 1/1 arm: at91: wdt: Convert watchdog driver to dm
Quoted 10 lines · Prasanthi Chellakumar
Convert the Watchdog driver for AT91SAM9x processors to support the driver model and device tree
Signed-off-by Prasanthi Chellakumar <[email protected]>--- arch/arm/mach-at91/include/mach/at91_wdt.h | 12 +++- drivers/watchdog/Kconfig | 7 ++ drivers/watchdog/Makefile | 2 +- drivers/watchdog/at91sam9_wdt.c | 105 +++++++++++++++++++++-------- 4 files changed, 95 insertions(+), 31 deletions(-)
Thanks for doing the conversion. It's fine to rename the config option
to match the rest of the WDT drivers but you need to update all of the existing users now too, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180810/01ddcb3d/attachment.sig>
PATCH 1/1 arm: at91: wdt: Convert watchdog driver to dm
Quoted 12 lines · Tom Rini
Quoted 10 lines · Prasanthi Chellakumar
Convert the Watchdog driver for AT91SAM9x processors to support the driver model and device tree
Signed-off-by Prasanthi Chellakumar <[email protected]>--- arch/arm/mach-at91/include/mach/at91_wdt.h | 12 +++- drivers/watchdog/Kconfig | 7 ++ drivers/watchdog/Makefile | 2 +- drivers/watchdog/at91sam9_wdt.c | 105 +++++++++++++++++++++-------- 4 files changed, 95 insertions(+), 31 deletions(-)
Quoted 4 lines
Thanks for doing the conversion. It's fine to rename the config option
to match the rest of the WDT drivers but you need to update all of the existing users now too, thanks!
Noted. Thanks for reviewing.
Prasanthi