hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/arch/arm/mach-imx/pm-imx6.c
....@@ -1,13 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2011-2014 Freescale Semiconductor, Inc.
34 * Copyright 2011 Linaro Ltd.
4
- *
5
- * The code contained herein is licensed under the GNU General Public
6
- * License. You may obtain a copy of the GNU General Public License
7
- * Version 2 or later at the following locations:
8
- *
9
- * http://www.opensource.org/licenses/gpl-license.html
10
- * http://www.gnu.org/copyleft/gpl.html
115 */
126
137 #include <linux/delay.h>
....@@ -314,7 +308,7 @@
314308 if (cpu_is_imx6sl())
315309 val |= BM_CLPCR_BYPASS_PMIC_READY;
316310 if (cpu_is_imx6sl() || cpu_is_imx6sx() || cpu_is_imx6ul() ||
317
- cpu_is_imx6ull() || cpu_is_imx6sll())
311
+ cpu_is_imx6ull() || cpu_is_imx6sll() || cpu_is_imx6ulz())
318312 val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS;
319313 else
320314 val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS;
....@@ -332,7 +326,7 @@
332326 if (cpu_is_imx6sl() || cpu_is_imx6sx())
333327 val |= BM_CLPCR_BYPASS_PMIC_READY;
334328 if (cpu_is_imx6sl() || cpu_is_imx6sx() || cpu_is_imx6ul() ||
335
- cpu_is_imx6ull() || cpu_is_imx6sll())
329
+ cpu_is_imx6ull() || cpu_is_imx6sll() || cpu_is_imx6ulz())
336330 val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS;
337331 else
338332 val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS;
....@@ -355,9 +349,11 @@
355349 *
356350 * Note that IRQ #32 is GIC SPI #0.
357351 */
358
- imx_gpc_hwirq_unmask(0);
352
+ if (mode != WAIT_CLOCKED)
353
+ imx_gpc_hwirq_unmask(0);
359354 writel_relaxed(val, ccm_base + CLPCR);
360
- imx_gpc_hwirq_mask(0);
355
+ if (mode != WAIT_CLOCKED)
356
+ imx_gpc_hwirq_mask(0);
361357
362358 return 0;
363359 }
....@@ -635,7 +631,7 @@
635631 static int imx6_pm_stby_poweroff_probe(void)
636632 {
637633 if (pm_power_off) {
638
- pr_warn("%s: pm_power_off already claimed %p %pf!\n",
634
+ pr_warn("%s: pm_power_off already claimed %p %ps!\n",
639635 __func__, pm_power_off, pm_power_off);
640636 return -EBUSY;
641637 }
....@@ -663,6 +659,8 @@
663659
664660 if (of_property_read_bool(np, "fsl,pmic-stby-poweroff"))
665661 imx6_pm_stby_poweroff_probe();
662
+
663
+ of_node_put(np);
666664 }
667665
668666 void __init imx6q_pm_init(void)