* [PATCH 1/2] arm: mach-imx: move snvs module
@ 2024-11-08 11:10 Ian Ray
2024-11-08 11:10 ` [PATCH 2/2] arm: mach-imx: imx8m: re-use SNVS init routine Ian Ray
0 siblings, 1 reply; 5+ messages in thread
From: Ian Ray @ 2024-11-08 11:10 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, NXP i.MX U-Boot Team, Tom Rini
Cc: Ian Ray, u-boot
Move snvs module for future re-use.
Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
---
arch/arm/mach-imx/Makefile | 2 ++
arch/arm/mach-imx/mx7/Makefile | 2 +-
arch/arm/mach-imx/{mx7 => }/snvs.c | 0
arch/arm/mach-imx/snvs.h | 6 ++++++
4 files changed, 9 insertions(+), 1 deletion(-)
rename arch/arm/mach-imx/{mx7 => }/snvs.c (100%)
create mode 100644 arch/arm/mach-imx/snvs.h
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 21d955b4ae..0de207c068 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -293,3 +293,5 @@ obj-$(CONFIG_ARCH_IMXRT) += imxrt/
obj-$(CONFIG_SPL_BOOTROM_SUPPORT) += spl_imx_romapi.o
obj-$(CONFIG_IMX8_ROMAPI) += romapi.o
+
+obj-$(CONFIG_MX7) += snvs.o
diff --git a/arch/arm/mach-imx/mx7/Makefile b/arch/arm/mach-imx/mx7/Makefile
index f1436e2d0d..fec228a616 100644
--- a/arch/arm/mach-imx/mx7/Makefile
+++ b/arch/arm/mach-imx/mx7/Makefile
@@ -3,5 +3,5 @@
# (C) Copyright 2015 Freescale Semiconductor, Inc.
#
-obj-y := soc.o clock.o clock_slice.o ddr.o snvs.o
+obj-y := soc.o clock.o clock_slice.o ddr.o
obj-$(CONFIG_ARMV7_PSCI) += psci-mx7.o psci-suspend.o
diff --git a/arch/arm/mach-imx/mx7/snvs.c b/arch/arm/mach-imx/snvs.c
similarity index 100%
rename from arch/arm/mach-imx/mx7/snvs.c
rename to arch/arm/mach-imx/snvs.c
diff --git a/arch/arm/mach-imx/snvs.h b/arch/arm/mach-imx/snvs.h
new file mode 100644
index 0000000000..4ce9781ca6
--- /dev/null
+++ b/arch/arm/mach-imx/snvs.h
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2018 Linaro
+ */
+
+void init_snvs(void);
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] arm: mach-imx: imx8m: re-use SNVS init routine
2024-11-08 11:10 [PATCH 1/2] arm: mach-imx: move snvs module Ian Ray
@ 2024-11-08 11:10 ` Ian Ray
2024-11-08 13:50 ` Fabio Estevam
0 siblings, 1 reply; 5+ messages in thread
From: Ian Ray @ 2024-11-08 11:10 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, NXP i.MX U-Boot Team, Tom Rini
Cc: Ian Ray, u-boot
Allow unpriv access to SNVS LP for imx8m and imx8mp.
Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
---
arch/arm/mach-imx/Makefile | 2 +-
arch/arm/mach-imx/imx8m/soc.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 0de207c068..011cca5d97 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -294,4 +294,4 @@ obj-$(CONFIG_ARCH_IMXRT) += imxrt/
obj-$(CONFIG_SPL_BOOTROM_SUPPORT) += spl_imx_romapi.o
obj-$(CONFIG_IMX8_ROMAPI) += romapi.o
-obj-$(CONFIG_MX7) += snvs.o
+obj-$(CONFIG_MX7)$(CONFIG_IMX8M) += snvs.o
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index a72329ea91..459503b0d6 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -34,6 +34,8 @@
#include <linux/bitfield.h>
#include <linux/sizes.h>
+#include "../snvs.h"
+
DECLARE_GLOBAL_DATA_PTR;
#if defined(CONFIG_IMX_HAB)
@@ -571,6 +573,8 @@ static void imx8m_setup_snvs(void)
writel(SNVS_LPPGDR_INIT, SNVS_BASE_ADDR + SNVS_LPLVDR);
/* Clear interrupt status */
writel(0xffffffff, SNVS_BASE_ADDR + SNVS_LPSR);
+
+ init_snvs();
}
static void imx8m_setup_csu_tzasc(void)
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] arm: mach-imx: imx8m: re-use SNVS init routine
2024-11-08 11:10 ` [PATCH 2/2] arm: mach-imx: imx8m: re-use SNVS init routine Ian Ray
@ 2024-11-08 13:50 ` Fabio Estevam
2024-11-08 13:53 ` Ian Ray
0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2024-11-08 13:50 UTC (permalink / raw)
To: Ian Ray; +Cc: Stefano Babic, NXP i.MX U-Boot Team, Tom Rini, u-boot
On Fri, Nov 8, 2024 at 8:11 AM Ian Ray <ian.ray@gehealthcare.com> wrote:
>
> Allow unpriv access to SNVS LP for imx8m and imx8mp.
Please expand the commit log and include the rationale/usecase.
Explain why you need to allow unprivileged access to SNVS LP.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] arm: mach-imx: imx8m: re-use SNVS init routine
2024-11-08 13:50 ` Fabio Estevam
@ 2024-11-08 13:53 ` Ian Ray
2024-11-08 13:57 ` Fabio Estevam
0 siblings, 1 reply; 5+ messages in thread
From: Ian Ray @ 2024-11-08 13:53 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Stefano Babic, NXP i.MX U-Boot Team, Tom Rini, u-boot
On Fri, Nov 08, 2024 at 10:50:38AM -0300, Fabio Estevam wrote:
> On Fri, Nov 8, 2024 at 8:11???AM Ian Ray <ian.ray@gehealthcare.com> wrote:
> >
> > Allow unpriv access to SNVS LP for imx8m and imx8mp.
>
> Please expand the commit log and include the rationale/usecase.
>
> Explain why you need to allow unprivileged access to SNVS LP.
Hi Fabio,
Would it be ok to reference 723f8359c144eb29f0fb07291f9a2294bd2a3fd6?
Regards,
Ian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] arm: mach-imx: imx8m: re-use SNVS init routine
2024-11-08 13:53 ` Ian Ray
@ 2024-11-08 13:57 ` Fabio Estevam
0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2024-11-08 13:57 UTC (permalink / raw)
To: Ian Ray; +Cc: Stefano Babic, NXP i.MX U-Boot Team, Tom Rini, u-boot
On Fri, Nov 8, 2024 at 10:53 AM Ian Ray <ian.ray@gehealthcare.com> wrote:
> Hi Fabio,
>
> Would it be ok to reference 723f8359c144eb29f0fb07291f9a2294bd2a3fd6?
Yes, that certainly helps. This commit has a well-written commit log and is very
useful.
Feel free to reference this commit and even copy/adapt parts of it
into your patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-11-08 13:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-08 11:10 [PATCH 1/2] arm: mach-imx: move snvs module Ian Ray
2024-11-08 11:10 ` [PATCH 2/2] arm: mach-imx: imx8m: re-use SNVS init routine Ian Ray
2024-11-08 13:50 ` Fabio Estevam
2024-11-08 13:53 ` Ian Ray
2024-11-08 13:57 ` Fabio Estevam
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.