Re: [PATCH v3 05/15] ARM: at91: watchdog: implement at91_wdt_disable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ahmad.

On Mon, Apr 01, 2019 at 12:18:13PM +0200, Ahmad Fatoum wrote:
> Low level init code might want to disable the watchdog in PBL.
> Provide a helper to do so.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
> ---
>  arch/arm/mach-at91/include/mach/at91_wdt.h | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm/mach-at91/include/mach/at91_wdt.h b/arch/arm/mach-at91/include/mach/at91_wdt.h
> index 36d37b9d2d64..d295d35d1b5c 100644
> --- a/arch/arm/mach-at91/include/mach/at91_wdt.h
> +++ b/arch/arm/mach-at91/include/mach/at91_wdt.h
> @@ -35,4 +35,20 @@
>  #define		AT91_WDT_WDUNF		(1 << 0)		/* Watchdog Underflow */
>  #define		AT91_WDT_WDERR		(1 << 1)		/* Watchdog Error */
>  
> +#ifndef __ASSEMBLY__
> +// SPDX-License-Identifier: BSD-1-Clause
> +/*
> + * Copyright (c) 2006, Atmel Corporation
> + */
> +
> +#include <asm-generic/io.h>
> +
> +static inline void at91_wdt_disable(void __iomem *wdt_base)

As we are copying a lot of code from at91bootstrap could
we then use the same name for this function:
driver/at91_wdt.c:void at91_disable_wdt(void)

In at91bootstrap the address is a build time constant,
but passing it as an value is better.
So that part I do not ask you to consider to copy.

	Sam

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux