| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright 2011-2014 Freescale Semiconductor, Inc. |
|---|
| 3 | 4 | * 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 |
|---|
| 11 | 5 | */ |
|---|
| 12 | 6 | |
|---|
| 13 | 7 | #include <linux/delay.h> |
|---|
| .. | .. |
|---|
| 314 | 308 | if (cpu_is_imx6sl()) |
|---|
| 315 | 309 | val |= BM_CLPCR_BYPASS_PMIC_READY; |
|---|
| 316 | 310 | 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()) |
|---|
| 318 | 312 | val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS; |
|---|
| 319 | 313 | else |
|---|
| 320 | 314 | val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS; |
|---|
| .. | .. |
|---|
| 332 | 326 | if (cpu_is_imx6sl() || cpu_is_imx6sx()) |
|---|
| 333 | 327 | val |= BM_CLPCR_BYPASS_PMIC_READY; |
|---|
| 334 | 328 | 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()) |
|---|
| 336 | 330 | val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS; |
|---|
| 337 | 331 | else |
|---|
| 338 | 332 | val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS; |
|---|
| .. | .. |
|---|
| 355 | 349 | * |
|---|
| 356 | 350 | * Note that IRQ #32 is GIC SPI #0. |
|---|
| 357 | 351 | */ |
|---|
| 358 | | - imx_gpc_hwirq_unmask(0); |
|---|
| 352 | + if (mode != WAIT_CLOCKED) |
|---|
| 353 | + imx_gpc_hwirq_unmask(0); |
|---|
| 359 | 354 | writel_relaxed(val, ccm_base + CLPCR); |
|---|
| 360 | | - imx_gpc_hwirq_mask(0); |
|---|
| 355 | + if (mode != WAIT_CLOCKED) |
|---|
| 356 | + imx_gpc_hwirq_mask(0); |
|---|
| 361 | 357 | |
|---|
| 362 | 358 | return 0; |
|---|
| 363 | 359 | } |
|---|
| .. | .. |
|---|
| 635 | 631 | static int imx6_pm_stby_poweroff_probe(void) |
|---|
| 636 | 632 | { |
|---|
| 637 | 633 | 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", |
|---|
| 639 | 635 | __func__, pm_power_off, pm_power_off); |
|---|
| 640 | 636 | return -EBUSY; |
|---|
| 641 | 637 | } |
|---|
| .. | .. |
|---|
| 663 | 659 | |
|---|
| 664 | 660 | if (of_property_read_bool(np, "fsl,pmic-stby-poweroff")) |
|---|
| 665 | 661 | imx6_pm_stby_poweroff_probe(); |
|---|
| 662 | + |
|---|
| 663 | + of_node_put(np); |
|---|
| 666 | 664 | } |
|---|
| 667 | 665 | |
|---|
| 668 | 666 | void __init imx6q_pm_init(void) |
|---|