Thread (27 messages) 27 messages, 3 authors, 2018-11-05
STALE2765d

[PATCH V3 07/10] ARM: imx: add initial support for imx7ulp

From: aisheng.dong@nxp.com (A.s. Dong)
Date: 2018-11-02 08:54:11

-----Original Message-----
From: Fabio Estevam [mailto:festevam at gmail.com]
Sent: Friday, November 2, 2018 2:21 AM
[...]
On Wed, Oct 31, 2018 at 12:13 PM A.s. Dong [off-list ref]
wrote:
quoted
+static void __init imx7ulp_init_machine(void) {
+       imx7ulp_pm_init();
+
+       mxc_set_cpu_type(MXC_CPU_IMX7ULP);
+       imx_print_silicon_rev("i.MX7ULP", IMX_CHIP_REVISION_1_0);
Why do you hardcode it as revision 1.0?
Because so far there're still no way to restrieve SoC version as we did
via anatop before. So we encode it to 1.0 temporarily on which this code
was initially based.

I think I can change it to unknown directly to reflect the real situation.
e.g.
imx_print_silicon_rev("i.MX7ULP", IMX_CHIP_REVISION_UNKNOWN) 
quoted
+void __init imx7ulp_pm_init(void)
+{
+       struct device_node *np;
+       void __iomem *smc1_base;
+
+       np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-smc1");
+       smc1_base = of_iomap(np, 0);
+       WARN_ON(!smc1_base);
+
+       /* Partial Stop mode 3 with system/bus clock enabled */
+       writel_relaxed(PSTOPO_PSTOP3 << BP_PMCTRL_PSTOPO,
+                      smc1_base + SMC_PMCTRL);
You should call  iounmap(smc1__base); after smc1__base is no longer used.
Good suggestion, will add it.

Regards
Dong Aisheng
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help