* [PATCH v2 1/3] ARM: socfpga: Clean unused functions
@ 2018-10-09 11:20 Clément Péron
2018-10-09 11:20 ` [PATCH v2 2/3] ARM: socfpga: Turn on all peripheral clocks for a system reboot Clément Péron
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Clément Péron @ 2018-10-09 11:20 UTC (permalink / raw)
To: Dinh Nguyen, Russell King, linux-arm-kernel, linux-kernel, stable
Cc: Clément Péron
These functions are unused externally, removed them and declare
the one used locally as static.
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
arch/arm/mach-socfpga/core.h | 2 --
arch/arm/mach-socfpga/socfpga.c | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/mach-socfpga/core.h b/arch/arm/mach-socfpga/core.h
index 65e1817d8afe..92cae0a9213f 100644
--- a/arch/arm/mach-socfpga/core.h
+++ b/arch/arm/mach-socfpga/core.h
@@ -34,8 +34,6 @@
#define RSTMGR_MPUMODRST_CPU1 0x2 /* CPU1 Reset */
-extern void socfpga_init_clocks(void);
-extern void socfpga_sysmgr_init(void);
void socfpga_init_l2_ecc(void);
void socfpga_init_ocram_ecc(void);
void socfpga_init_arria10_l2_ecc(void);
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
index dde14f7bf2c3..5fb6f79059a8 100644
--- a/arch/arm/mach-socfpga/socfpga.c
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -32,7 +32,7 @@ void __iomem *rst_manager_base_addr;
void __iomem *sdr_ctl_base_addr;
unsigned long socfpga_cpu1start_addr;
-void __init socfpga_sysmgr_init(void)
+static void __init socfpga_sysmgr_init(void)
{
struct device_node *np;
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/3] ARM: socfpga: Turn on all peripheral clocks for a system reboot
2018-10-09 11:20 [PATCH v2 1/3] ARM: socfpga: Clean unused functions Clément Péron
@ 2018-10-09 11:20 ` Clément Péron
2018-10-09 11:20 ` [PATCH v2 3/3] ARM: socfpga: Turn on ARM errata for L2 cache Clément Péron
2018-10-23 8:47 ` [PATCH v2 1/3] ARM: socfpga: Clean unused functions Clément Péron
2 siblings, 0 replies; 7+ messages in thread
From: Clément Péron @ 2018-10-09 11:20 UTC (permalink / raw)
To: Dinh Nguyen, Russell King, linux-arm-kernel, linux-kernel, stable
Cc: Dinh Nguyen, Clément Péron
From: Dinh Nguyen <dinguyen@altera.com>
When doing a software reboot, all peripheral clocks must get turned on for the
L3 interconnect to work.
This code is needed when doing a "reboot" from user-space and a peripheral
clock as been gated off. Why would a peripheral clock get gated? An example
use case would be a .ko that gets insmod and rmmod during runtime. The insmod
would turn on the IP's clock, and the rmmod would turn off the IP's clock.
Doing a "reboot" would cause the system to hang.
Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
v2:
- Remove fixes tag in commit log
arch/arm/mach-socfpga/core.h | 3 +++
arch/arm/mach-socfpga/socfpga.c | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/arch/arm/mach-socfpga/core.h b/arch/arm/mach-socfpga/core.h
index 92cae0a9213f..17c8a97c04d9 100644
--- a/arch/arm/mach-socfpga/core.h
+++ b/arch/arm/mach-socfpga/core.h
@@ -52,4 +52,7 @@ extern unsigned long socfpga_cpu1start_addr;
#define SOCFPGA_SCU_VIRT_BASE 0xfee00000
+/* Clock manager defines */
+#define SOCFPGA_ENABLE_PLL_REG 0xA0
+
#endif
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
index 5fb6f79059a8..c9c881f7c67c 100644
--- a/arch/arm/mach-socfpga/socfpga.c
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -31,6 +31,7 @@ void __iomem *sys_manager_base_addr;
void __iomem *rst_manager_base_addr;
void __iomem *sdr_ctl_base_addr;
unsigned long socfpga_cpu1start_addr;
+void __iomem *clkmgr_base_addr;
static void __init socfpga_sysmgr_init(void)
{
@@ -51,6 +52,10 @@ static void __init socfpga_sysmgr_init(void)
np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr");
rst_manager_base_addr = of_iomap(np, 0);
+ np = of_find_compatible_node(NULL, NULL, "altr,clk-mgr");
+ clkmgr_base_addr = of_iomap(np, 0);
+ WARN_ON(!clkmgr_base_addr);
+
np = of_find_compatible_node(NULL, NULL, "altr,sdr-ctl");
sdr_ctl_base_addr = of_iomap(np, 0);
}
@@ -80,6 +85,9 @@ static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd)
{
u32 temp;
+ /* Turn on all periph PLL clocks */
+ writel(0xffff, clkmgr_base_addr + SOCFPGA_ENABLE_PLL_REG);
+
temp = readl(rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL);
if (mode == REBOOT_HARD)
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/3] ARM: socfpga: Turn on ARM errata for L2 cache
2018-10-09 11:20 [PATCH v2 1/3] ARM: socfpga: Clean unused functions Clément Péron
2018-10-09 11:20 ` [PATCH v2 2/3] ARM: socfpga: Turn on all peripheral clocks for a system reboot Clément Péron
@ 2018-10-09 11:20 ` Clément Péron
2018-10-23 8:47 ` [PATCH v2 1/3] ARM: socfpga: Clean unused functions Clément Péron
2 siblings, 0 replies; 7+ messages in thread
From: Clément Péron @ 2018-10-09 11:20 UTC (permalink / raw)
To: Dinh Nguyen, Russell King, linux-arm-kernel, linux-kernel, stable
Cc: Clément Péron
From: Dinh Nguyen <dinguyen@kernel.org>
Turn on these ARM and PL310 errata for SoCFPGA:
ARM_ERRATA_754322
ARM_ERRATA_764369
ARM_ERRATA_775420
PL310_ERRATA_588369
PL310_ERRATA_727915
PL310_ERRATA_753970
PL310_ERRATA_769419
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
v2:
- Remove fixes tag in commit log
arch/arm/mach-socfpga/Kconfig | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
index 4adb901dd5eb..a04660918d71 100644
--- a/arch/arm/mach-socfpga/Kconfig
+++ b/arch/arm/mach-socfpga/Kconfig
@@ -11,6 +11,13 @@ menuconfig ARCH_SOCFPGA
select HAVE_ARM_TWD if SMP
select MFD_SYSCON
select PCI_DOMAINS if PCI
+ select ARM_ERRATA_754322
+ select ARM_ERRATA_764369 if SMP
+ select ARM_ERRATA_775420
+ select PL310_ERRATA_588369
+ select PL310_ERRATA_727915
+ select PL310_ERRATA_753970 if PL310
+ select PL310_ERRATA_769419
if ARCH_SOCFPGA
config SOCFPGA_SUSPEND
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] ARM: socfpga: Clean unused functions
2018-10-09 11:20 [PATCH v2 1/3] ARM: socfpga: Clean unused functions Clément Péron
2018-10-09 11:20 ` [PATCH v2 2/3] ARM: socfpga: Turn on all peripheral clocks for a system reboot Clément Péron
2018-10-09 11:20 ` [PATCH v2 3/3] ARM: socfpga: Turn on ARM errata for L2 cache Clément Péron
@ 2018-10-23 8:47 ` Clément Péron
2018-10-23 8:52 ` Russell King - ARM Linux
2 siblings, 1 reply; 7+ messages in thread
From: Clément Péron @ 2018-10-23 8:47 UTC (permalink / raw)
To: Dinh Nguyen, Russell King, linux-arm-kernel, linux-kernel, stable
Hi Dinh / Russell,
Could you have a look at these patchs please ?
Thanks,
Clement
On Tue, 9 Oct 2018 at 13:20, Clément Péron <peron.clem@gmail.com> wrote:
>
> These functions are unused externally, removed them and declare
> the one used locally as static.
>
> Signed-off-by: Clément Péron <peron.clem@gmail.com>
> ---
> arch/arm/mach-socfpga/core.h | 2 --
> arch/arm/mach-socfpga/socfpga.c | 2 +-
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-socfpga/core.h b/arch/arm/mach-socfpga/core.h
> index 65e1817d8afe..92cae0a9213f 100644
> --- a/arch/arm/mach-socfpga/core.h
> +++ b/arch/arm/mach-socfpga/core.h
> @@ -34,8 +34,6 @@
>
> #define RSTMGR_MPUMODRST_CPU1 0x2 /* CPU1 Reset */
>
> -extern void socfpga_init_clocks(void);
> -extern void socfpga_sysmgr_init(void);
> void socfpga_init_l2_ecc(void);
> void socfpga_init_ocram_ecc(void);
> void socfpga_init_arria10_l2_ecc(void);
> diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
> index dde14f7bf2c3..5fb6f79059a8 100644
> --- a/arch/arm/mach-socfpga/socfpga.c
> +++ b/arch/arm/mach-socfpga/socfpga.c
> @@ -32,7 +32,7 @@ void __iomem *rst_manager_base_addr;
> void __iomem *sdr_ctl_base_addr;
> unsigned long socfpga_cpu1start_addr;
>
> -void __init socfpga_sysmgr_init(void)
> +static void __init socfpga_sysmgr_init(void)
> {
> struct device_node *np;
>
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] ARM: socfpga: Clean unused functions
2018-10-23 8:47 ` [PATCH v2 1/3] ARM: socfpga: Clean unused functions Clément Péron
@ 2018-10-23 8:52 ` Russell King - ARM Linux
[not found] ` <CAJiuCcdKFKmwB5mqW-bP+4A4HtVr=1z9avxoDPrD3NL9X9i8MQ@mail.gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Russell King - ARM Linux @ 2018-10-23 8:52 UTC (permalink / raw)
To: Clément Péron
Cc: Dinh Nguyen, linux-arm-kernel, linux-kernel, stable
On Tue, Oct 23, 2018 at 10:47:05AM +0200, Clément Péron wrote:
> Hi Dinh / Russell,
>
> Could you have a look at these patchs please ?
Nothing to do with me - it's up to the socfpga maintainer and arm-soc
maintainers.
> Thanks,
> Clement
>
> On Tue, 9 Oct 2018 at 13:20, Clément Péron <peron.clem@gmail.com> wrote:
> >
> > These functions are unused externally, removed them and declare
> > the one used locally as static.
> >
> > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > ---
> > arch/arm/mach-socfpga/core.h | 2 --
> > arch/arm/mach-socfpga/socfpga.c | 2 +-
> > 2 files changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/arch/arm/mach-socfpga/core.h b/arch/arm/mach-socfpga/core.h
> > index 65e1817d8afe..92cae0a9213f 100644
> > --- a/arch/arm/mach-socfpga/core.h
> > +++ b/arch/arm/mach-socfpga/core.h
> > @@ -34,8 +34,6 @@
> >
> > #define RSTMGR_MPUMODRST_CPU1 0x2 /* CPU1 Reset */
> >
> > -extern void socfpga_init_clocks(void);
> > -extern void socfpga_sysmgr_init(void);
> > void socfpga_init_l2_ecc(void);
> > void socfpga_init_ocram_ecc(void);
> > void socfpga_init_arria10_l2_ecc(void);
> > diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
> > index dde14f7bf2c3..5fb6f79059a8 100644
> > --- a/arch/arm/mach-socfpga/socfpga.c
> > +++ b/arch/arm/mach-socfpga/socfpga.c
> > @@ -32,7 +32,7 @@ void __iomem *rst_manager_base_addr;
> > void __iomem *sdr_ctl_base_addr;
> > unsigned long socfpga_cpu1start_addr;
> >
> > -void __init socfpga_sysmgr_init(void)
> > +static void __init socfpga_sysmgr_init(void)
> > {
> > struct device_node *np;
> >
> > --
> > 2.17.1
> >
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] ARM: socfpga: Clean unused functions
[not found] ` <CAJiuCcdKFKmwB5mqW-bP+4A4HtVr=1z9avxoDPrD3NL9X9i8MQ@mail.gmail.com>
@ 2018-11-08 15:38 ` Dinh Nguyen
2018-11-08 16:23 ` Clément Péron
0 siblings, 1 reply; 7+ messages in thread
From: Dinh Nguyen @ 2018-11-08 15:38 UTC (permalink / raw)
To: Clément Péron
Cc: linux-arm-kernel, linux-kernel, stable, Russell King
Hi Clément,
On 11/2/18 10:58 AM, Clément Péron wrote:
> Hi Dinh,
>
> Could you have a look at this serie ?
>
I've applied 1/3 and 3/3. I need to look over 2/3 to determine if that
patch is still valid. I think a better solution would be to set a clock
as critical so that it doesn't get gated.
Thanks,
Dinh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] ARM: socfpga: Clean unused functions
2018-11-08 15:38 ` Dinh Nguyen
@ 2018-11-08 16:23 ` Clément Péron
0 siblings, 0 replies; 7+ messages in thread
From: Clément Péron @ 2018-11-08 16:23 UTC (permalink / raw)
To: Dinh Nguyen; +Cc: linux-arm-kernel, linux-kernel, stable, Russell King
Hi Dinh
On Thu, 8 Nov 2018 at 16:38, Dinh Nguyen <dinguyen@kernel.org> wrote:
>
> Hi Clément,
>
> On 11/2/18 10:58 AM, Clément Péron wrote:
> > Hi Dinh,
> >
> > Could you have a look at this serie ?
> >
>
> I've applied 1/3 and 3/3. I need to look over 2/3 to determine if that
> patch is still valid. I think a better solution would be to set a clock
> as critical so that it doesn't get gated.
Ok,
Thanks,
Clément
>
> Thanks,
> Dinh
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-11-08 16:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 11:20 [PATCH v2 1/3] ARM: socfpga: Clean unused functions Clément Péron
2018-10-09 11:20 ` [PATCH v2 2/3] ARM: socfpga: Turn on all peripheral clocks for a system reboot Clément Péron
2018-10-09 11:20 ` [PATCH v2 3/3] ARM: socfpga: Turn on ARM errata for L2 cache Clément Péron
2018-10-23 8:47 ` [PATCH v2 1/3] ARM: socfpga: Clean unused functions Clément Péron
2018-10-23 8:52 ` Russell King - ARM Linux
[not found] ` <CAJiuCcdKFKmwB5mqW-bP+4A4HtVr=1z9avxoDPrD3NL9X9i8MQ@mail.gmail.com>
2018-11-08 15:38 ` Dinh Nguyen
2018-11-08 16:23 ` Clément Péron
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).