lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 31 Mar 2021 17:54:26 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Claudiu Beznea <claudiu.beznea@...rochip.com>
Cc:     nicolas.ferre@...rochip.com, ludovic.desroches@...rochip.com,
        robh+dt@...nel.org, linux@...linux.org.uk,
        linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/24] ARM: at91: sfrbu: add sfrbu registers definitions
 for sama7g5

On 31/03/2021 13:58:54+0300, Claudiu Beznea wrote:
> Add SFRBU registers definitions for SAMA7G5.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
> ---
>  include/soc/at91/sama7-sfrbu.h | 34 ++++++++++++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
>  create mode 100644 include/soc/at91/sama7-sfrbu.h
> 
> diff --git a/include/soc/at91/sama7-sfrbu.h b/include/soc/at91/sama7-sfrbu.h
> new file mode 100644
> index 000000000000..76b740810d34
> --- /dev/null
> +++ b/include/soc/at91/sama7-sfrbu.h
> @@ -0,0 +1,34 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * Microchip SAMA7 SFRBU registers offsets and bit definitions.
> + *
> + * Copyright (C) [2020] Microchip Technology Inc. and its subsidiaries
> + *
> + * Author: Claudu Beznea <claudiu.beznea@...rochip.com>
> + */
> +
> +#ifndef __SAMA7_SFRBU_H__
> +#define __SAMA7_SFRBU_H__
> +
> +#ifdef CONFIG_SOC_SAMA7
> +
> +#define AT91_SFRBU_PSWBU			(0x00)		/* SFRBU Power Switch BU Control Register */
> +#define		AT91_SFRBU_PSWBU_PSWKEY		(0x4BD20C << 8)	/* Specific value mandatory to allow writing of other register bits */
> +#define		AT91_SFRBU_PSWBU_STATE		(1 << 2)	/* Power switch BU state */
> +#define		AT91_SFRBU_PSWBU_SOFTSWITCH	(1 << 1)	/* Power switch BU source selection */
> +#define		AT91_SFRBU_PSWBU_CTRL		(1 << 0)	/* Power switch BU control */

Please use BIT

> +
> +#define AT91_SFRBU_25LDOCR			(0x0C)		/* SFRBU 2.5V LDO Control Register */
> +#define		AT91_SFRBU_25LDOCR_LDOANAKEY	(0x3B6E18 << 8)	/* Specific value mandatory to allow writing of other register bits. */
> +#define		AT91_SFRBU_25LDOCR_STATE	(1 << 3)	/* LDOANA Switch On/Off Control */
> +#define		AT91_SFRBU_25LDOCR_LP		(1 << 2)	/* LDOANA Low-Power Mode Control */
> +#define		AT91_SFRBU_PD_VALUE_MSK		(0x3)

GENMASK

> +#define		AT91_SFRBU_25LDOCR_PD_VALUE(v)	((v) & AT91_SFRBU_PD_VALUE_MSK)	/* LDOANA Pull-down value */

this macro is not necessary, you can use FIELD_PREP with the previous
define.


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ