Skip to contentSkip to conversation

QE/DeepSleep: add QE deepsleep support for mpc85xx

PATCH New Zhao Qiang 2 participants 2 messages Mar 25, 2015 – Apr 23, 2015 Arm (32-bit)

lore
Share & tools
lore

Zhao Qiang

author
#0 lore raw

PATCH 1/1 QE/DeepSleep: add QE deepsleep support for mpc85xx

Muram will power off during deepsleep, and the microcode of qe in muram will be lost, it should be reload when resume.

---
 arch/arm/include/asm/arch-ls102xa/config.h |  4 --
 board/freescale/common/mpc85xx_sleep.c     |  8 +++
 drivers/qe/qe.c                            | 82 ++++++++++++++++++++++++++++++
 drivers/qe/qe.h                            |  6 +++
 include/linux/immap_qe.h                   | 12 +++++
 5 files changed, 108 insertions(+), 4 deletions(-)
arch/arm/include/asm/arch-ls102xa/config.h +0 -4
index 25cc862..4f686e3 100644
@@ -105,10 +105,6 @@
 
 #define DCU_LAYER_MAX_NUM			16
 
-#define QE_MURAM_SIZE          0x6000UL
-#define MAX_QE_RISC            1
-#define QE_NUM_OF_SNUM         28
-
 #define CONFIG_SYS_FSL_SRDS_1
 
 #ifdef CONFIG_LS102XA
board/freescale/common/mpc85xx_sleep.c +8 -0
index f924e7f..9e4132c 100644
@@ -7,6 +7,9 @@
 #include <common.h>
 #include <asm/immap_85xx.h>
 #include "sleep.h"
+#ifdef CONFIG_U_QE
+#include "../../../drivers/qe/qe.h"
+#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -65,6 +68,11 @@ static void dp_resume_prepare(void)
 	disable_cpc_sram();
 #endif
 	enable_cpc();
+
+#ifdef CONFIG_U_QE
+	u_qe_resume();
+#endif
+
 }
 
 int fsl_dp_resume(void)
drivers/qe/qe.c +82 -0

94 lines not on this page · raw message

drivers/qe/qe.h +6 -0
index 33878f8..77b18e9 100644
@@ -11,6 +11,9 @@
 #define __QE_H__
 
 #include "common.h"
+#ifdef CONFIG_U_QE
+#include <linux/immap_qe.h>
+#endif
 
 #define QE_NUM_OF_BRGS	16
 #define UCC_MAX_NUM	8
@@ -288,6 +291,9 @@ void qe_reset(void);
 #ifdef CONFIG_U_QE
 void u_qe_init(void);
 int u_qe_upload_firmware(const struct qe_firmware *firmware);
+void u_qe_resume(void);
+int u_qe_firmware_resume(const struct qe_firmware *firmware,
+			 qe_map_t *qe_immrr);
 #endif
 
 #endif /* __QE_H__ */
include/linux/immap_qe.h +12 -0
index b317dcb..6d1f88e 100644
@@ -24,6 +24,18 @@
 #endif
 #endif
 
+#ifdef CONFIG_LS102XA
+#define QE_MURAM_SIZE          0x6000UL
+#define MAX_QE_RISC            1
+#define QE_NUM_OF_SNUM         28
+#endif
+
+#ifdef CONFIG_PPC
+#define QE_IMMR_OFFSET		0x00140000
+#else
+#define QE_IMMR_OFFSET		0x01400000
+#endif
+
 /* QE I-RAM */
 typedef struct qe_iram {
 	u32 iadd;		/* I-RAM Address Register */
Signature · 1 line
2.1.0.27.g96db324
Applied
#1 lore raw

PATCH 1/1 QE/DeepSleep: add QE deepsleep support for mpc85xx

Quoted 5 lines · Zhao Qiang

Muram will power off during deepsleep, and the microcode of qe in muram will be lost, it should be reload when resume.

---

Applied to fsl-qoriq master, awaiting upstream.

York