Commit 8423536f authored by Ludovic Desroches's avatar Ludovic Desroches Committed by Alexandre Belloni

ARM: at91: fix pinctrl driver selection

Move the selection of the pinctrl driver to SoC family level since we
have two pinctrl drivers. It is useless to select one which is not
compatible with the SoC.

[abelloni: fixed pm.c when only sama2d2 is selected]
Signed-off-by: default avatarLudovic Desroches <ludovic.desroches@atmel.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 863c1ca7
...@@ -4,7 +4,6 @@ menuconfig ARCH_AT91 ...@@ -4,7 +4,6 @@ menuconfig ARCH_AT91
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select COMMON_CLK_AT91 select COMMON_CLK_AT91
select PINCTRL select PINCTRL
select PINCTRL_AT91
select SOC_BUS select SOC_BUS
if ARCH_AT91 if ARCH_AT91
...@@ -17,6 +16,7 @@ config SOC_SAMA5D2 ...@@ -17,6 +16,7 @@ config SOC_SAMA5D2
select HAVE_AT91_USB_CLK select HAVE_AT91_USB_CLK
select HAVE_AT91_H32MX select HAVE_AT91_H32MX
select HAVE_AT91_GENERATED_CLK select HAVE_AT91_GENERATED_CLK
select PINCTRL_AT91PIO4
help help
Select this if ou are using one of Atmel's SAMA5D2 family SoC. Select this if ou are using one of Atmel's SAMA5D2 family SoC.
...@@ -27,6 +27,7 @@ config SOC_SAMA5D3 ...@@ -27,6 +27,7 @@ config SOC_SAMA5D3
select HAVE_AT91_UTMI select HAVE_AT91_UTMI
select HAVE_AT91_SMD select HAVE_AT91_SMD
select HAVE_AT91_USB_CLK select HAVE_AT91_USB_CLK
select PINCTRL_AT91
help help
Select this if you are using one of Atmel's SAMA5D3 family SoC. Select this if you are using one of Atmel's SAMA5D3 family SoC.
This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36. This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36.
...@@ -40,6 +41,7 @@ config SOC_SAMA5D4 ...@@ -40,6 +41,7 @@ config SOC_SAMA5D4
select HAVE_AT91_SMD select HAVE_AT91_SMD
select HAVE_AT91_USB_CLK select HAVE_AT91_USB_CLK
select HAVE_AT91_H32MX select HAVE_AT91_H32MX
select PINCTRL_AT91
help help
Select this if you are using one of Atmel's SAMA5D4 family SoC. Select this if you are using one of Atmel's SAMA5D4 family SoC.
...@@ -50,6 +52,7 @@ config SOC_AT91RM9200 ...@@ -50,6 +52,7 @@ config SOC_AT91RM9200
select CPU_ARM920T select CPU_ARM920T
select HAVE_AT91_USB_CLK select HAVE_AT91_USB_CLK
select MIGHT_HAVE_PCI select MIGHT_HAVE_PCI
select PINCTRL_AT91
select SOC_SAM_V4_V5 select SOC_SAM_V4_V5
select SRAM if PM select SRAM if PM
help help
...@@ -65,6 +68,7 @@ config SOC_AT91SAM9 ...@@ -65,6 +68,7 @@ config SOC_AT91SAM9
select HAVE_AT91_UTMI select HAVE_AT91_UTMI
select HAVE_FB_ATMEL select HAVE_FB_ATMEL
select MEMORY select MEMORY
select PINCTRL_AT91
select SOC_SAM_V4_V5 select SOC_SAM_V4_V5
select SRAM if PM select SRAM if PM
help help
......
...@@ -41,8 +41,10 @@ ...@@ -41,8 +41,10 @@
* implementation should be moved down into the pinctrl driver and get * implementation should be moved down into the pinctrl driver and get
* called as part of the generic suspend/resume path. * called as part of the generic suspend/resume path.
*/ */
#ifdef CONFIG_PINCTRL_AT91
extern void at91_pinctrl_gpio_suspend(void); extern void at91_pinctrl_gpio_suspend(void);
extern void at91_pinctrl_gpio_resume(void); extern void at91_pinctrl_gpio_resume(void);
#endif
static struct { static struct {
unsigned long uhp_udp_mask; unsigned long uhp_udp_mask;
...@@ -151,8 +153,9 @@ static void at91_pm_suspend(suspend_state_t state) ...@@ -151,8 +153,9 @@ static void at91_pm_suspend(suspend_state_t state)
static int at91_pm_enter(suspend_state_t state) static int at91_pm_enter(suspend_state_t state)
{ {
#ifdef CONFIG_PINCTRL_AT91
at91_pinctrl_gpio_suspend(); at91_pinctrl_gpio_suspend();
#endif
switch (state) { switch (state) {
/* /*
* Suspend-to-RAM is like STANDBY plus slow clock mode, so * Suspend-to-RAM is like STANDBY plus slow clock mode, so
...@@ -192,7 +195,9 @@ static int at91_pm_enter(suspend_state_t state) ...@@ -192,7 +195,9 @@ static int at91_pm_enter(suspend_state_t state)
error: error:
target_state = PM_SUSPEND_ON; target_state = PM_SUSPEND_ON;
#ifdef CONFIG_PINCTRL_AT91
at91_pinctrl_gpio_resume(); at91_pinctrl_gpio_resume();
#endif
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment