MLK-18051 arm: imx: fix the audio bus hang when tee enabled
authorBai Ping <ping.bai@nxp.com>
Mon, 23 Apr 2018 09:55:16 +0000 (17:55 +0800)
committerBai Ping <ping.bai@nxp.com>
Tue, 24 Apr 2018 01:52:35 +0000 (09:52 +0800)
fix audio bus mode hang issue on imx6sl. The root cause of
this issue is that busfreq mode passed to TEE side is wrong,
it will lead to ccm setting is wrong in TEE.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Tested-by: Anson huang <anson.huang@nxp.com>
arch/arm/mach-imx/cpuidle-imx6sl.c

index ed7cb52..4abfe17 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
- * Copyright 2017 NXP.
+ * Copyright 2017-2018 NXP.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -81,11 +81,11 @@ static int imx6sl_enter_wait(struct cpuidle_device *dev,
 
        if ((mode == BUS_FREQ_AUDIO) || (mode == BUS_FREQ_ULTRA_LOW)) {
                /*
-                * bit 1 used for low power mode;
-                * bit 2 used for the ldo2p5_dummmy enable
+                * bit 2 used for low power mode;
+                * bit 1 used for the ldo2p5_dummmy enable
                 */
                if (psci_ops.cpu_suspend) {
-                       psci_ops.cpu_suspend((MX6SL_POWERDWN_IDLE_PARAM | ((BUS_FREQ_AUDIO ? 1 : 0) << 2) |
+                       psci_ops.cpu_suspend((MX6SL_POWERDWN_IDLE_PARAM | ((mode == BUS_FREQ_AUDIO ? 1 : 0) << 2) |
                                (ldo2p5_dummy_enable ? 1 : 0) << 1), __pa(cpu_resume));
                } else {
                        imx6sl_wfi_in_iram_fn(wfi_iram_base, (mode == BUS_FREQ_AUDIO) ? 1 : 0,