Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: at91: pm: move SAM9X60's PM under its own SoC config flag

Move SAM9X60's PM part under SoC config flag. This allows the building
of SAM9X60 platform withouth depending on CONFIG_SOC_AT91SAM9 flag,
allowing us to select only necessary config flags for SAM9X60.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/1575035505-6310-4-git-send-email-claudiu.beznea@microchip.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Claudiu Beznea and committed by
Alexandre Belloni
eb0df9b7 fe7ff55d

+36 -19
+1
arch/arm/mach-at91/Makefile
··· 6 6 # CPU-specific support 7 7 obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o 8 8 obj-$(CONFIG_SOC_AT91SAM9) += at91sam9.o 9 + obj-$(CONFIG_SOC_SAM9X60) += sam9x60.o 9 10 obj-$(CONFIG_SOC_SAMA5) += sama5.o 10 11 obj-$(CONFIG_SOC_SAMV7) += samv7.o 11 12
-18
arch/arm/mach-at91/at91sam9.c
··· 31 31 .init_machine = at91sam9_init, 32 32 .dt_compat = at91_dt_board_compat, 33 33 MACHINE_END 34 - 35 - static void __init sam9x60_init(void) 36 - { 37 - of_platform_default_populate(NULL, NULL, NULL); 38 - 39 - sam9x60_pm_init(); 40 - } 41 - 42 - static const char *const sam9x60_dt_board_compat[] __initconst = { 43 - "microchip,sam9x60", 44 - NULL 45 - }; 46 - 47 - DT_MACHINE_START(sam9x60_dt, "Microchip SAM9X60") 48 - /* Maintainer: Microchip */ 49 - .init_machine = sam9x60_init, 50 - .dt_compat = sam9x60_dt_board_compat, 51 - MACHINE_END
+1 -1
arch/arm/mach-at91/pm.c
··· 805 805 806 806 void __init sam9x60_pm_init(void) 807 807 { 808 - if (!IS_ENABLED(CONFIG_SOC_AT91SAM9)) 808 + if (!IS_ENABLED(CONFIG_SOC_SAM9X60)) 809 809 return; 810 810 811 811 at91_pm_modes_init();
+34
arch/arm/mach-at91/sam9x60.c
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + /* 3 + * Setup code for SAM9X60. 4 + * 5 + * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries 6 + * 7 + * Author: Claudiu Beznea <claudiu.beznea@microchip.com> 8 + */ 9 + 10 + #include <linux/of.h> 11 + #include <linux/of_platform.h> 12 + 13 + #include <asm/mach/arch.h> 14 + #include <asm/system_misc.h> 15 + 16 + #include "generic.h" 17 + 18 + static void __init sam9x60_init(void) 19 + { 20 + of_platform_default_populate(NULL, NULL, NULL); 21 + 22 + sam9x60_pm_init(); 23 + } 24 + 25 + static const char *const sam9x60_dt_board_compat[] __initconst = { 26 + "microchip,sam9x60", 27 + NULL 28 + }; 29 + 30 + DT_MACHINE_START(sam9x60_dt, "Microchip SAM9X60") 31 + /* Maintainer: Microchip */ 32 + .init_machine = sam9x60_init, 33 + .dt_compat = sam9x60_dt_board_compat, 34 + MACHINE_END