drivers: soc: atmel: use GENMASK
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Fri, 22 Jan 2021 12:21:32 +0000 (14:21 +0200)
committerNicolas Ferre <nicolas.ferre@microchip.com>
Tue, 26 Jan 2021 09:02:28 +0000 (10:02 +0100)
Use GENMASK() to define CIDR match mask.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/1611318097-8970-3-git-send-email-claudiu.beznea@microchip.com
drivers/soc/atmel/soc.c

index 698d21f..c3f920e 100644 (file)
@@ -27,7 +27,7 @@
 #define AT91_CHIPID_EXID               0x04
 #define AT91_CIDR_VERSION(x)           ((x) & 0x1f)
 #define AT91_CIDR_EXT                  BIT(31)
-#define AT91_CIDR_MATCH_MASK           0x7fffffe0
+#define AT91_CIDR_MATCH_MASK           GENMASK(30, 5)
 
 static const struct at91_soc __initconst socs[] = {
 #ifdef CONFIG_SOC_AT91RM9200