* [U-Boot] [PATCH v4] qe: disable qe when qe-ucode fails to be uploaded for "deep sleep"
@ 2014-04-30 8:45 Zhao Qiang
2014-05-13 16:41 ` York Sun
0 siblings, 1 reply; 2+ messages in thread
From: Zhao Qiang @ 2014-04-30 8:45 UTC (permalink / raw)
To: u-boot
when qe-ucode fails to be uploaded, "deep sleep" will hang.
if there is no qe-ucode, disable qe module for platforms
which support "deep sleep"
Signed-off-by: Zhao Qiang <B45475@freescale.com>
---
Changes for v2:
- add "#ifdef CONFIG_MPC85xx"
Changes for v3:
- modify commit msg
Changes for v4:
- modify "#ifdef CONFIG_MPC85xx" to "#ifdef CONFIG_DEEP_SLEEP"
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index b1da75e..9c5fbd1 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -14,6 +14,8 @@
#include "asm/immap_qe.h"
#include "qe.h"
+#define MPC85xx_DEVDISR_QE_DISABLE 0x1
+
qe_map_t *qe_immr = NULL;
static qe_snum_t snums[QE_NUM_OF_SNUM];
@@ -317,7 +319,9 @@ int qe_upload_firmware(const struct qe_firmware *firmware)
size_t calc_size = sizeof(struct qe_firmware);
size_t length;
const struct qe_header *hdr;
-
+#ifdef CONFIG_DEEP_SLEEP
+ ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+#endif
if (!firmware) {
printf("Invalid address\n");
return -EINVAL;
@@ -330,6 +334,9 @@ int qe_upload_firmware(const struct qe_firmware *firmware)
if ((hdr->magic[0] != 'Q') || (hdr->magic[1] != 'E') ||
(hdr->magic[2] != 'F')) {
printf("Not a microcode\n");
+#ifdef CONFIG_DEEP_SLEEP
+ setbits_be32(&gur->devdisr, MPC85xx_DEVDISR_QE_DISABLE);
+#endif
return -EPERM;
}
--
1.8.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH v4] qe: disable qe when qe-ucode fails to be uploaded for "deep sleep"
2014-04-30 8:45 [U-Boot] [PATCH v4] qe: disable qe when qe-ucode fails to be uploaded for "deep sleep" Zhao Qiang
@ 2014-05-13 16:41 ` York Sun
0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2014-05-13 16:41 UTC (permalink / raw)
To: u-boot
On 04/30/2014 03:45 AM, Zhao Qiang wrote:
> when qe-ucode fails to be uploaded, "deep sleep" will hang.
> if there is no qe-ucode, disable qe module for platforms
> which support "deep sleep"
>
> Signed-off-by: Zhao Qiang <B45475@freescale.com>
> ---
> Changes for v2:
> - add "#ifdef CONFIG_MPC85xx"
> Changes for v3:
> - modify commit msg
> Changes for v4:
> - modify "#ifdef CONFIG_MPC85xx" to "#ifdef CONFIG_DEEP_SLEEP"
>
Applied to u-boot-mpc85xx/master.
Thanks,
York
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-13 16:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30 8:45 [U-Boot] [PATCH v4] qe: disable qe when qe-ucode fails to be uploaded for "deep sleep" Zhao Qiang
2014-05-13 16:41 ` York Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox