LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/2] ARM: at91: fix compilation errors after SAMA7G5
@ 2021-07-19 8:03 Claudiu Beznea
2021-07-19 8:03 ` [PATCH 1/2] ARM: at91: fix link error Claudiu Beznea
2021-07-19 8:03 ` [PATCH 2/2] clk: at91: add register definition for sama7g5's master clock Claudiu Beznea
0 siblings, 2 replies; 7+ messages in thread
From: Claudiu Beznea @ 2021-07-19 8:03 UTC (permalink / raw)
To: linux, nicolas.ferre, alexandre.belloni, ludovic.desroches,
mturquette, sboyd
Cc: eugen.hristev, linux-arm-kernel, linux-kernel, linux-clk, sfr,
Claudiu Beznea
This series fix compilation errors after the merge of AT91 SAMA7G5 SoC
support.
Claudiu Beznea (2):
ARM: at91: fix link error
clk: at91: add register definition for sama7g5's master clock
arch/arm/mach-at91/Kconfig | 3 +++
include/linux/clk/at91_pmc.h | 26 ++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] ARM: at91: fix link error
2021-07-19 8:03 [PATCH 0/2] ARM: at91: fix compilation errors after SAMA7G5 Claudiu Beznea
@ 2021-07-19 8:03 ` Claudiu Beznea
2021-07-19 12:40 ` Nicolas Ferre
2021-07-19 8:03 ` [PATCH 2/2] clk: at91: add register definition for sama7g5's master clock Claudiu Beznea
1 sibling, 1 reply; 7+ messages in thread
From: Claudiu Beznea @ 2021-07-19 8:03 UTC (permalink / raw)
To: linux, nicolas.ferre, alexandre.belloni, ludovic.desroches,
mturquette, sboyd
Cc: eugen.hristev, linux-arm-kernel, linux-kernel, linux-clk, sfr,
Claudiu Beznea
PM support for SAMA7G5 has been submitted to mailing list before SAMA7G5
soc support thus the SAMA7G5 was not present in AT91 Kconfig file at
that moment. SoC support for SAMA7G5 hasn't added the proper PM flags to
Kconfig thus the link error bellow:
arch/arm/mach-at91/sama7.o: In function `sama7_dt_device_init':
sama7.c:(.init.text+0x18): undefined reference to `sama7_pm_init'
make: *** [Makefile:1176: vmlinux] Error 1
Add proper flags to AT91 Kconfig file to solve the issue.
Fixes: 5617a08dd9e1 ("ARM: at91: pm: add pm support for SAMA7G5")
Fixes: 18d694ecd91e ("ARM: at91: add new SoC sama7g5")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
arch/arm/mach-at91/Kconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index f52b46bccd85..b09bb2279f7f 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -204,6 +204,9 @@ config ATMEL_PM
config SOC_SAMA7
bool
select ARM_GIC
+ select ATMEL_PM if PM
+ select ATMEL_SDRAMC
select MEMORY
select SOC_SAM_V7
+ select SRAM if PM
endif
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] clk: at91: add register definition for sama7g5's master clock
2021-07-19 8:03 [PATCH 0/2] ARM: at91: fix compilation errors after SAMA7G5 Claudiu Beznea
2021-07-19 8:03 ` [PATCH 1/2] ARM: at91: fix link error Claudiu Beznea
@ 2021-07-19 8:03 ` Claudiu Beznea
2021-07-19 12:46 ` Nicolas Ferre
1 sibling, 1 reply; 7+ messages in thread
From: Claudiu Beznea @ 2021-07-19 8:03 UTC (permalink / raw)
To: linux, nicolas.ferre, alexandre.belloni, ludovic.desroches,
mturquette, sboyd
Cc: eugen.hristev, linux-arm-kernel, linux-kernel, linux-clk, sfr,
Claudiu Beznea
Add register definitions for SAMA7G5's master clock. These would be
also used by architecture specific power saving code.
Fixes: 6cb0e54412a3 ("ARM: at91: pm: add support for MCK1..4 save/restore for ulp modes")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
Hi Stephen,
This is a part from patch at [1]. I keep it at minimum (only definitions)
for faster acceptance as the build is broken on arm multi_v7_defconfig
without it).
In next version of patch at [1] I will update it accordingly.
Thank you,
Claudiu Beznea
[1] https://lore.kernel.org/linux-clk/20210401122726.28528-5-claudiu.beznea@microchip.com/
include/linux/clk/at91_pmc.h | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/include/linux/clk/at91_pmc.h b/include/linux/clk/at91_pmc.h
index a4f82e836a7c..ccb3f034bfa9 100644
--- a/include/linux/clk/at91_pmc.h
+++ b/include/linux/clk/at91_pmc.h
@@ -137,6 +137,32 @@
#define AT91_PMC_PLLADIV2_ON (1 << 12)
#define AT91_PMC_H32MXDIV BIT(24)
+#define AT91_PMC_MCR_V2 0x30 /* Master Clock Register [SAMA7G5 only] */
+#define AT91_PMC_MCR_V2_ID_MSK (0xF)
+#define AT91_PMC_MCR_V2_ID(_id) ((_id) & AT91_PMC_MCR_V2_ID_MSK)
+#define AT91_PMC_MCR_V2_CMD (1 << 7)
+#define AT91_PMC_MCR_V2_DIV (7 << 8)
+#define AT91_PMC_MCR_V2_DIV1 (0 << 8)
+#define AT91_PMC_MCR_V2_DIV2 (1 << 8)
+#define AT91_PMC_MCR_V2_DIV4 (2 << 8)
+#define AT91_PMC_MCR_V2_DIV8 (3 << 8)
+#define AT91_PMC_MCR_V2_DIV16 (4 << 8)
+#define AT91_PMC_MCR_V2_DIV32 (5 << 8)
+#define AT91_PMC_MCR_V2_DIV64 (6 << 8)
+#define AT91_PMC_MCR_V2_DIV3 (7 << 8)
+#define AT91_PMC_MCR_V2_CSS (0x1F << 16)
+#define AT91_PMC_MCR_V2_CSS_MD_SLCK (0 << 16)
+#define AT91_PMC_MCR_V2_CSS_TD_SLCK (1 << 16)
+#define AT91_PMC_MCR_V2_CSS_MAINCK (2 << 16)
+#define AT91_PMC_MCR_V2_CSS_MCK0 (3 << 16)
+#define AT91_PMC_MCR_V2_CSS_SYSPLL (5 << 16)
+#define AT91_PMC_MCR_V2_CSS_DDRPLL (6 << 16)
+#define AT91_PMC_MCR_V2_CSS_IMGPLL (7 << 16)
+#define AT91_PMC_MCR_V2_CSS_BAUDPLL (8 << 16)
+#define AT91_PMC_MCR_V2_CSS_AUDIOPLL (9 << 16)
+#define AT91_PMC_MCR_V2_CSS_ETHPLL (10 << 16)
+#define AT91_PMC_MCR_V2_EN (1 << 28)
+
#define AT91_PMC_XTALF 0x34 /* Main XTAL Frequency Register [SAMA7G5 only] */
#define AT91_PMC_USB 0x38 /* USB Clock Register [some SAM9 only] */
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] ARM: at91: fix link error
2021-07-19 8:03 ` [PATCH 1/2] ARM: at91: fix link error Claudiu Beznea
@ 2021-07-19 12:40 ` Nicolas Ferre
2021-07-19 13:17 ` Claudiu.Beznea
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Ferre @ 2021-07-19 12:40 UTC (permalink / raw)
To: Claudiu Beznea, linux, alexandre.belloni, ludovic.desroches,
mturquette, sboyd
Cc: eugen.hristev, linux-arm-kernel, linux-kernel, linux-clk, sfr
Hi Claudiu,
On 19/07/2021 at 10:03, Claudiu Beznea wrote:
> PM support for SAMA7G5 has been submitted to mailing list before SAMA7G5
> soc support thus the SAMA7G5 was not present in AT91 Kconfig file at
> that moment. SoC support for SAMA7G5 hasn't added the proper PM flags to
> Kconfig thus the link error bellow:
>
> arch/arm/mach-at91/sama7.o: In function `sama7_dt_device_init':
> sama7.c:(.init.text+0x18): undefined reference to `sama7_pm_init'
> make: *** [Makefile:1176: vmlinux] Error 1
>
> Add proper flags to AT91 Kconfig file to solve the issue.
>
> Fixes: 5617a08dd9e1 ("ARM: at91: pm: add pm support for SAMA7G5")
> Fixes: 18d694ecd91e ("ARM: at91: add new SoC sama7g5")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
> arch/arm/mach-at91/Kconfig | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
> index f52b46bccd85..b09bb2279f7f 100644
> --- a/arch/arm/mach-at91/Kconfig
> +++ b/arch/arm/mach-at91/Kconfig
> @@ -204,6 +204,9 @@ config ATMEL_PM
> config SOC_SAMA7
> bool
> select ARM_GIC
> + select ATMEL_PM if PM
> + select ATMEL_SDRAMC
> select MEMORY
> select SOC_SAM_V7
> + select SRAM if PM
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
I squashed this patch in 18d694ecd91e ("ARM: at91: add new SoC
sama7g5"), verified that it compiles and rebased the at91-soc branch on
it. The commit message is as follow (wrapped):
ARM: at91: add new SoC sama7g5
Add new SoC from at91 family : sama7g5
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
[claudiu.beznea@microchip.com: Select PLL, generic clock and UTMI
support, add PM configs]
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link:
https://lore.kernel.org/r/20210409113116.482199-1-eugen.hristev@microchip.com
Link:
https://lore.kernel.org/r/20210719080317.1045832-2-claudiu.beznea@microchip.com
Added lore link will allow us to trace this part of the discussion.
Here is the new branch:
https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git/log/?h=at91-soc
Tell me if it's good for you.
Thanks for having fixed that so quickly. Best regards,
Nicolas
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] clk: at91: add register definition for sama7g5's master clock
2021-07-19 8:03 ` [PATCH 2/2] clk: at91: add register definition for sama7g5's master clock Claudiu Beznea
@ 2021-07-19 12:46 ` Nicolas Ferre
2021-07-27 1:19 ` Stephen Boyd
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Ferre @ 2021-07-19 12:46 UTC (permalink / raw)
To: Claudiu Beznea, linux, alexandre.belloni, ludovic.desroches,
mturquette, sboyd
Cc: eugen.hristev, linux-arm-kernel, linux-kernel, linux-clk, sfr
On 19/07/2021 at 10:03, Claudiu Beznea wrote:
> Add register definitions for SAMA7G5's master clock. These would be
> also used by architecture specific power saving code.
>
> Fixes: 6cb0e54412a3 ("ARM: at91: pm: add support for MCK1..4 save/restore for ulp modes")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> ---
>
> Hi Stephen,
>
> This is a part from patch at [1]. I keep it at minimum (only definitions)
> for faster acceptance as the build is broken on arm multi_v7_defconfig
> without it).
> In next version of patch at [1] I will update it accordingly.
Stephen,
Before hearing from you I inserted this patch in our at91-soc branch
that is part of linux-next. With this at least the build don't break
anymore.
Tell me if you want to have an immutable branch that we could share with
it on top of 5.14-rc1 or if it's fine if we add the same patch in both
of our trees.
Best regards,
Nicolas
> [1] https://lore.kernel.org/linux-clk/20210401122726.28528-5-claudiu.beznea@microchip.com/
>
> include/linux/clk/at91_pmc.h | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/include/linux/clk/at91_pmc.h b/include/linux/clk/at91_pmc.h
> index a4f82e836a7c..ccb3f034bfa9 100644
> --- a/include/linux/clk/at91_pmc.h
> +++ b/include/linux/clk/at91_pmc.h
> @@ -137,6 +137,32 @@
> #define AT91_PMC_PLLADIV2_ON (1 << 12)
> #define AT91_PMC_H32MXDIV BIT(24)
>
> +#define AT91_PMC_MCR_V2 0x30 /* Master Clock Register [SAMA7G5 only] */
> +#define AT91_PMC_MCR_V2_ID_MSK (0xF)
> +#define AT91_PMC_MCR_V2_ID(_id) ((_id) & AT91_PMC_MCR_V2_ID_MSK)
> +#define AT91_PMC_MCR_V2_CMD (1 << 7)
> +#define AT91_PMC_MCR_V2_DIV (7 << 8)
> +#define AT91_PMC_MCR_V2_DIV1 (0 << 8)
> +#define AT91_PMC_MCR_V2_DIV2 (1 << 8)
> +#define AT91_PMC_MCR_V2_DIV4 (2 << 8)
> +#define AT91_PMC_MCR_V2_DIV8 (3 << 8)
> +#define AT91_PMC_MCR_V2_DIV16 (4 << 8)
> +#define AT91_PMC_MCR_V2_DIV32 (5 << 8)
> +#define AT91_PMC_MCR_V2_DIV64 (6 << 8)
> +#define AT91_PMC_MCR_V2_DIV3 (7 << 8)
> +#define AT91_PMC_MCR_V2_CSS (0x1F << 16)
> +#define AT91_PMC_MCR_V2_CSS_MD_SLCK (0 << 16)
> +#define AT91_PMC_MCR_V2_CSS_TD_SLCK (1 << 16)
> +#define AT91_PMC_MCR_V2_CSS_MAINCK (2 << 16)
> +#define AT91_PMC_MCR_V2_CSS_MCK0 (3 << 16)
> +#define AT91_PMC_MCR_V2_CSS_SYSPLL (5 << 16)
> +#define AT91_PMC_MCR_V2_CSS_DDRPLL (6 << 16)
> +#define AT91_PMC_MCR_V2_CSS_IMGPLL (7 << 16)
> +#define AT91_PMC_MCR_V2_CSS_BAUDPLL (8 << 16)
> +#define AT91_PMC_MCR_V2_CSS_AUDIOPLL (9 << 16)
> +#define AT91_PMC_MCR_V2_CSS_ETHPLL (10 << 16)
> +#define AT91_PMC_MCR_V2_EN (1 << 28)
> +
> #define AT91_PMC_XTALF 0x34 /* Main XTAL Frequency Register [SAMA7G5 only] */
>
> #define AT91_PMC_USB 0x38 /* USB Clock Register [some SAM9 only] */
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] ARM: at91: fix link error
2021-07-19 12:40 ` Nicolas Ferre
@ 2021-07-19 13:17 ` Claudiu.Beznea
0 siblings, 0 replies; 7+ messages in thread
From: Claudiu.Beznea @ 2021-07-19 13:17 UTC (permalink / raw)
To: Nicolas.Ferre, linux, alexandre.belloni, Ludovic.Desroches,
mturquette, sboyd
Cc: Eugen.Hristev, linux-arm-kernel, linux-kernel, linux-clk, sfr
On 19.07.2021 15:40, Nicolas Ferre wrote:
> Hi Claudiu,
>
> On 19/07/2021 at 10:03, Claudiu Beznea wrote:
>> PM support for SAMA7G5 has been submitted to mailing list before SAMA7G5
>> soc support thus the SAMA7G5 was not present in AT91 Kconfig file at
>> that moment. SoC support for SAMA7G5 hasn't added the proper PM flags to
>> Kconfig thus the link error bellow:
>>
>> arch/arm/mach-at91/sama7.o: In function `sama7_dt_device_init':
>> sama7.c:(.init.text+0x18): undefined reference to `sama7_pm_init'
>> make: *** [Makefile:1176: vmlinux] Error 1
>>
>> Add proper flags to AT91 Kconfig file to solve the issue.
>>
>> Fixes: 5617a08dd9e1 ("ARM: at91: pm: add pm support for SAMA7G5")
>> Fixes: 18d694ecd91e ("ARM: at91: add new SoC sama7g5")
>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>> ---
>> arch/arm/mach-at91/Kconfig | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
>> index f52b46bccd85..b09bb2279f7f 100644
>> --- a/arch/arm/mach-at91/Kconfig
>> +++ b/arch/arm/mach-at91/Kconfig
>> @@ -204,6 +204,9 @@ config ATMEL_PM
>> config SOC_SAMA7
>> bool
>> select ARM_GIC
>> + select ATMEL_PM if PM
>> + select ATMEL_SDRAMC
>> select MEMORY
>> select SOC_SAM_V7
>> + select SRAM if PM
>
> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
>
> I squashed this patch in 18d694ecd91e ("ARM: at91: add new SoC sama7g5"),
> verified that it compiles and rebased the at91-soc branch on it. The commit
> message is as follow (wrapped):
>
> ARM: at91: add new SoC sama7g5
>
> Add new SoC from at91 family : sama7g5
>
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> [claudiu.beznea@microchip.com: Select PLL, generic clock and UTMI support,
> add PM configs]
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> Link:
> https://lore.kernel.org/r/20210409113116.482199-1-eugen.hristev@microchip.com
> Link:
> https://lore.kernel.org/r/20210719080317.1045832-2-claudiu.beznea@microchip.com
>
>
> Added lore link will allow us to trace this part of the discussion.
> Here is the new branch:
> https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git/log/?h=at91-soc
>
> Tell me if it's good for you.
Hi Nicolas,
It's good for me.
Thank you,
Claudiu
>
> Thanks for having fixed that so quickly. Best regards,
> Nicolas
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] clk: at91: add register definition for sama7g5's master clock
2021-07-19 12:46 ` Nicolas Ferre
@ 2021-07-27 1:19 ` Stephen Boyd
0 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2021-07-27 1:19 UTC (permalink / raw)
To: Claudiu Beznea, Nicolas Ferre, alexandre.belloni, linux,
ludovic.desroches, mturquette
Cc: eugen.hristev, linux-arm-kernel, linux-kernel, linux-clk, sfr
Quoting Nicolas Ferre (2021-07-19 05:46:00)
> On 19/07/2021 at 10:03, Claudiu Beznea wrote:
> > Add register definitions for SAMA7G5's master clock. These would be
> > also used by architecture specific power saving code.
> >
> > Fixes: 6cb0e54412a3 ("ARM: at91: pm: add support for MCK1..4 save/restore for ulp modes")
> > Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>
> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
>
> > ---
> >
> > Hi Stephen,
> >
> > This is a part from patch at [1]. I keep it at minimum (only definitions)
> > for faster acceptance as the build is broken on arm multi_v7_defconfig
> > without it).
> > In next version of patch at [1] I will update it accordingly.
>
> Stephen,
>
> Before hearing from you I inserted this patch in our at91-soc branch
> that is part of linux-next. With this at least the build don't break
> anymore.
I don't think I need the patches? I'll try to remember this patch if I
apply some patch that needs this in the future and probably just
duplicate the commit to make things simpler.
>
> Tell me if you want to have an immutable branch that we could share with
> it on top of 5.14-rc1 or if it's fine if we add the same patch in both
> of our trees.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-07-27 1:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-19 8:03 [PATCH 0/2] ARM: at91: fix compilation errors after SAMA7G5 Claudiu Beznea
2021-07-19 8:03 ` [PATCH 1/2] ARM: at91: fix link error Claudiu Beznea
2021-07-19 12:40 ` Nicolas Ferre
2021-07-19 13:17 ` Claudiu.Beznea
2021-07-19 8:03 ` [PATCH 2/2] clk: at91: add register definition for sama7g5's master clock Claudiu Beznea
2021-07-19 12:46 ` Nicolas Ferre
2021-07-27 1:19 ` Stephen Boyd
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).