* [PATCH] ARM: at91: fix pinctrl driver selection
@ 2015-12-01 10:44 Ludovic Desroches
2015-12-01 10:51 ` Nicolas Ferre
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Ludovic Desroches @ 2015-12-01 10:44 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
---
This patch is an improvement of this one (already acked by Linus and Nicolas):
https://lkml.org/lkml/2015/9/16/522
Without it, at91 pio4 driver is not compiled causing boot failure for SAMA5D2.
arch/arm/mach-at91/Kconfig | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 9267300..28656c2 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -4,7 +4,6 @@ menuconfig ARCH_AT91
select ARCH_REQUIRE_GPIOLIB
select COMMON_CLK_AT91
select PINCTRL
- select PINCTRL_AT91
select SOC_BUS
if ARCH_AT91
@@ -17,6 +16,7 @@ config SOC_SAMA5D2
select HAVE_AT91_USB_CLK
select HAVE_AT91_H32MX
select HAVE_AT91_GENERATED_CLK
+ select PINCTRL_AT91PIO4
help
Select this if ou are using one of Atmel's SAMA5D2 family SoC.
@@ -27,6 +27,7 @@ config SOC_SAMA5D3
select HAVE_AT91_UTMI
select HAVE_AT91_SMD
select HAVE_AT91_USB_CLK
+ select PINCTRL_AT91
help
Select this if you are using one of Atmel's SAMA5D3 family SoC.
This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36.
@@ -40,6 +41,7 @@ config SOC_SAMA5D4
select HAVE_AT91_SMD
select HAVE_AT91_USB_CLK
select HAVE_AT91_H32MX
+ select PINCTRL_AT91
help
Select this if you are using one of Atmel's SAMA5D4 family SoC.
@@ -50,6 +52,7 @@ config SOC_AT91RM9200
select CPU_ARM920T
select HAVE_AT91_USB_CLK
select MIGHT_HAVE_PCI
+ select PINCTRL_AT91
select SOC_SAM_V4_V5
select SRAM if PM
help
@@ -65,6 +68,7 @@ config SOC_AT91SAM9
select HAVE_AT91_UTMI
select HAVE_FB_ATMEL
select MEMORY
+ select PINCTRL_AT91
select SOC_SAM_V4_V5
select SRAM if PM
help
--
2.5.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] ARM: at91: fix pinctrl driver selection
2015-12-01 10:44 [PATCH] ARM: at91: fix pinctrl driver selection Ludovic Desroches
@ 2015-12-01 10:51 ` Nicolas Ferre
2015-12-01 11:17 ` Alexandre Belloni
2015-12-10 17:25 ` Linus Walleij
2 siblings, 0 replies; 7+ messages in thread
From: Nicolas Ferre @ 2015-12-01 10:51 UTC (permalink / raw)
To: linux-arm-kernel
Le 01/12/2015 11:44, Ludovic Desroches a ?crit :
> 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.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Yep, it's even better. I plan to send it to 4.4-fixes very soon.
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
>
> This patch is an improvement of this one (already acked by Linus and Nicolas):
> https://lkml.org/lkml/2015/9/16/522
>
> Without it, at91 pio4 driver is not compiled causing boot failure for SAMA5D2.
>
> arch/arm/mach-at91/Kconfig | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
> index 9267300..28656c2 100644
> --- a/arch/arm/mach-at91/Kconfig
> +++ b/arch/arm/mach-at91/Kconfig
> @@ -4,7 +4,6 @@ menuconfig ARCH_AT91
> select ARCH_REQUIRE_GPIOLIB
> select COMMON_CLK_AT91
> select PINCTRL
> - select PINCTRL_AT91
> select SOC_BUS
>
> if ARCH_AT91
> @@ -17,6 +16,7 @@ config SOC_SAMA5D2
> select HAVE_AT91_USB_CLK
> select HAVE_AT91_H32MX
> select HAVE_AT91_GENERATED_CLK
> + select PINCTRL_AT91PIO4
> help
> Select this if ou are using one of Atmel's SAMA5D2 family SoC.
>
> @@ -27,6 +27,7 @@ config SOC_SAMA5D3
> select HAVE_AT91_UTMI
> select HAVE_AT91_SMD
> select HAVE_AT91_USB_CLK
> + select PINCTRL_AT91
> help
> Select this if you are using one of Atmel's SAMA5D3 family SoC.
> This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36.
> @@ -40,6 +41,7 @@ config SOC_SAMA5D4
> select HAVE_AT91_SMD
> select HAVE_AT91_USB_CLK
> select HAVE_AT91_H32MX
> + select PINCTRL_AT91
> help
> Select this if you are using one of Atmel's SAMA5D4 family SoC.
>
> @@ -50,6 +52,7 @@ config SOC_AT91RM9200
> select CPU_ARM920T
> select HAVE_AT91_USB_CLK
> select MIGHT_HAVE_PCI
> + select PINCTRL_AT91
> select SOC_SAM_V4_V5
> select SRAM if PM
> help
> @@ -65,6 +68,7 @@ config SOC_AT91SAM9
> select HAVE_AT91_UTMI
> select HAVE_FB_ATMEL
> select MEMORY
> + select PINCTRL_AT91
> select SOC_SAM_V4_V5
> select SRAM if PM
> help
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM: at91: fix pinctrl driver selection
2015-12-01 10:44 [PATCH] ARM: at91: fix pinctrl driver selection Ludovic Desroches
2015-12-01 10:51 ` Nicolas Ferre
@ 2015-12-01 11:17 ` Alexandre Belloni
2015-12-10 17:25 ` Linus Walleij
2 siblings, 0 replies; 7+ messages in thread
From: Alexandre Belloni @ 2015-12-01 11:17 UTC (permalink / raw)
To: linux-arm-kernel
On 01/12/2015 at 11:44:40 +0100, Ludovic Desroches wrote :
> 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.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>
> This patch is an improvement of this one (already acked by Linus and Nicolas):
> https://lkml.org/lkml/2015/9/16/522
>
> Without it, at91 pio4 driver is not compiled causing boot failure for SAMA5D2.
>
> arch/arm/mach-at91/Kconfig | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
> index 9267300..28656c2 100644
> --- a/arch/arm/mach-at91/Kconfig
> +++ b/arch/arm/mach-at91/Kconfig
> @@ -4,7 +4,6 @@ menuconfig ARCH_AT91
> select ARCH_REQUIRE_GPIOLIB
> select COMMON_CLK_AT91
> select PINCTRL
> - select PINCTRL_AT91
> select SOC_BUS
>
> if ARCH_AT91
> @@ -17,6 +16,7 @@ config SOC_SAMA5D2
> select HAVE_AT91_USB_CLK
> select HAVE_AT91_H32MX
> select HAVE_AT91_GENERATED_CLK
> + select PINCTRL_AT91PIO4
> help
> Select this if ou are using one of Atmel's SAMA5D2 family SoC.
>
> @@ -27,6 +27,7 @@ config SOC_SAMA5D3
> select HAVE_AT91_UTMI
> select HAVE_AT91_SMD
> select HAVE_AT91_USB_CLK
> + select PINCTRL_AT91
> help
> Select this if you are using one of Atmel's SAMA5D3 family SoC.
> This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36.
> @@ -40,6 +41,7 @@ config SOC_SAMA5D4
> select HAVE_AT91_SMD
> select HAVE_AT91_USB_CLK
> select HAVE_AT91_H32MX
> + select PINCTRL_AT91
> help
> Select this if you are using one of Atmel's SAMA5D4 family SoC.
>
> @@ -50,6 +52,7 @@ config SOC_AT91RM9200
> select CPU_ARM920T
> select HAVE_AT91_USB_CLK
> select MIGHT_HAVE_PCI
> + select PINCTRL_AT91
> select SOC_SAM_V4_V5
> select SRAM if PM
> help
> @@ -65,6 +68,7 @@ config SOC_AT91SAM9
> select HAVE_AT91_UTMI
> select HAVE_FB_ATMEL
> select MEMORY
> + select PINCTRL_AT91
> select SOC_SAM_V4_V5
> select SRAM if PM
> help
> --
> 2.5.0
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM: at91: fix pinctrl driver selection
@ 2015-12-04 17:18 Alexandre Belloni
2015-12-04 17:33 ` Sudeep Holla
0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Belloni @ 2015-12-04 17:18 UTC (permalink / raw)
To: linux-arm-kernel
From: Ludovic Desroches <ludovic.desroches@atmel.com>
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: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/mach-at91/Kconfig | 6 +++++-
arch/arm/mach-at91/pm.c | 7 ++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 92673006e55c..28656c2b54a0 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -4,7 +4,6 @@ menuconfig ARCH_AT91
select ARCH_REQUIRE_GPIOLIB
select COMMON_CLK_AT91
select PINCTRL
- select PINCTRL_AT91
select SOC_BUS
if ARCH_AT91
@@ -17,6 +16,7 @@ config SOC_SAMA5D2
select HAVE_AT91_USB_CLK
select HAVE_AT91_H32MX
select HAVE_AT91_GENERATED_CLK
+ select PINCTRL_AT91PIO4
help
Select this if ou are using one of Atmel's SAMA5D2 family SoC.
@@ -27,6 +27,7 @@ config SOC_SAMA5D3
select HAVE_AT91_UTMI
select HAVE_AT91_SMD
select HAVE_AT91_USB_CLK
+ select PINCTRL_AT91
help
Select this if you are using one of Atmel's SAMA5D3 family SoC.
This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36.
@@ -40,6 +41,7 @@ config SOC_SAMA5D4
select HAVE_AT91_SMD
select HAVE_AT91_USB_CLK
select HAVE_AT91_H32MX
+ select PINCTRL_AT91
help
Select this if you are using one of Atmel's SAMA5D4 family SoC.
@@ -50,6 +52,7 @@ config SOC_AT91RM9200
select CPU_ARM920T
select HAVE_AT91_USB_CLK
select MIGHT_HAVE_PCI
+ select PINCTRL_AT91
select SOC_SAM_V4_V5
select SRAM if PM
help
@@ -65,6 +68,7 @@ config SOC_AT91SAM9
select HAVE_AT91_UTMI
select HAVE_FB_ATMEL
select MEMORY
+ select PINCTRL_AT91
select SOC_SAM_V4_V5
select SRAM if PM
help
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 80e277cfcc8b..01cbb17e6f6b 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -41,8 +41,10 @@
* implementation should be moved down into the pinctrl driver and get
* called as part of the generic suspend/resume path.
*/
+#ifdef PINCTRL_AT91
extern void at91_pinctrl_gpio_suspend(void);
extern void at91_pinctrl_gpio_resume(void);
+#endif
static struct {
unsigned long uhp_udp_mask;
@@ -151,8 +153,9 @@ static void at91_pm_suspend(suspend_state_t state)
static int at91_pm_enter(suspend_state_t state)
{
+#ifdef PINCTRL_AT91
at91_pinctrl_gpio_suspend();
-
+#endif
switch (state) {
/*
* Suspend-to-RAM is like STANDBY plus slow clock mode, so
@@ -192,7 +195,9 @@ static int at91_pm_enter(suspend_state_t state)
error:
target_state = PM_SUSPEND_ON;
+#ifdef PINCTRL_AT91
at91_pinctrl_gpio_resume();
+#endif
return 0;
}
--
2.5.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] ARM: at91: fix pinctrl driver selection
2015-12-04 17:18 Alexandre Belloni
@ 2015-12-04 17:33 ` Sudeep Holla
2015-12-04 17:53 ` Alexandre Belloni
0 siblings, 1 reply; 7+ messages in thread
From: Sudeep Holla @ 2015-12-04 17:33 UTC (permalink / raw)
To: linux-arm-kernel
On 04/12/15 17:18, Alexandre Belloni wrote:
> From: Ludovic Desroches <ludovic.desroches@atmel.com>
>
> 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: Ludovic Desroches <ludovic.desroches@atmel.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
> arch/arm/mach-at91/Kconfig | 6 +++++-
> arch/arm/mach-at91/pm.c | 7 ++++++-
> 2 files changed, 11 insertions(+), 2 deletions(-)
>
[...]
> diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
> index 80e277cfcc8b..01cbb17e6f6b 100644
> --- a/arch/arm/mach-at91/pm.c
> +++ b/arch/arm/mach-at91/pm.c
> @@ -41,8 +41,10 @@
> * implementation should be moved down into the pinctrl driver and get
> * called as part of the generic suspend/resume path.
> */
> +#ifdef PINCTRL_AT91
Accidentally glanced at this patch when my mail client got hung at this
patch :), I think you mean CONFIG_PINCTRL_AT91 here and later below.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM: at91: fix pinctrl driver selection
2015-12-04 17:33 ` Sudeep Holla
@ 2015-12-04 17:53 ` Alexandre Belloni
0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Belloni @ 2015-12-04 17:53 UTC (permalink / raw)
To: linux-arm-kernel
On 04/12/2015 at 17:33:37 +0000, Sudeep Holla wrote :
>
>
> On 04/12/15 17:18, Alexandre Belloni wrote:
> >From: Ludovic Desroches <ludovic.desroches@atmel.com>
> >
> >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: Ludovic Desroches <ludovic.desroches@atmel.com>
> >Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> >Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> >---
> > arch/arm/mach-at91/Kconfig | 6 +++++-
> > arch/arm/mach-at91/pm.c | 7 ++++++-
> > 2 files changed, 11 insertions(+), 2 deletions(-)
> >
>
> [...]
>
> >diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
> >index 80e277cfcc8b..01cbb17e6f6b 100644
> >--- a/arch/arm/mach-at91/pm.c
> >+++ b/arch/arm/mach-at91/pm.c
> >@@ -41,8 +41,10 @@
> > * implementation should be moved down into the pinctrl driver and get
> > * called as part of the generic suspend/resume path.
> > */
> >+#ifdef PINCTRL_AT91
>
> Accidentally glanced at this patch when my mail client got hung at this
> patch :), I think you mean CONFIG_PINCTRL_AT91 here and later below.
>
Raah, sure. Thanks!
> --
> Regards,
> Sudeep
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM: at91: fix pinctrl driver selection
2015-12-01 10:44 [PATCH] ARM: at91: fix pinctrl driver selection Ludovic Desroches
2015-12-01 10:51 ` Nicolas Ferre
2015-12-01 11:17 ` Alexandre Belloni
@ 2015-12-10 17:25 ` Linus Walleij
2 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2015-12-10 17:25 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Dec 1, 2015 at 11:44 AM, Ludovic Desroches
<ludovic.desroches@atmel.com> wrote:
> 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.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-12-10 17:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-01 10:44 [PATCH] ARM: at91: fix pinctrl driver selection Ludovic Desroches
2015-12-01 10:51 ` Nicolas Ferre
2015-12-01 11:17 ` Alexandre Belloni
2015-12-10 17:25 ` Linus Walleij
-- strict thread matches above, loose matches on Subject: below --
2015-12-04 17:18 Alexandre Belloni
2015-12-04 17:33 ` Sudeep Holla
2015-12-04 17:53 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).