Commit 02ae8f8df61540c11b84bd16120ead4a72cd4220

Authored by Peng Fan
1 parent 07dd1b9d69

MLK-20542 imx8qm: xen: mek: add magic number

Write magic number in board early init, and clear magic when booting
Linux.

This is to let XEN know the current EL1 code is U-Boot or Linux
when reset/reboot. This is just a workaround because CM41 could not
communicate with XEN now, even XEN knows that EL1 is reseting/rebooting.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit 8132f6b5848d45cab795bb472d6484130985415d)

Showing 1 changed file with 7 additions and 2 deletions Side-by-side Diff

board/freescale/imx8qm_mek/imx8qm_mek.c
... ... @@ -67,8 +67,10 @@
67 67 sc_err_t sciErr = 0;
68 68  
69 69 /* When start u-boot in XEN VM, directly return */
70   - if (IS_ENABLED(CONFIG_XEN))
  70 + if (IS_ENABLED(CONFIG_XEN)) {
  71 + writel(0xF53535F5, (void __iomem *)0x80000000);
71 72 return 0;
  73 + }
72 74  
73 75 ipcHndl = gd->arch.ipc_channel_handle;
74 76  
75 77  
... ... @@ -457,8 +459,11 @@
457 459 "dma_lpuart0",
458 460 };
459 461  
460   - if (IS_ENABLED(CONFIG_XEN))
  462 + if (IS_ENABLED(CONFIG_XEN)) {
  463 + /* Clear magic number to let xen know uboot is over */
  464 + writel(0x0, (void __iomem *)0x80000000);
461 465 return;
  466 + }
462 467  
463 468 power_off_pd_devices(power_on_devices, ARRAY_SIZE(power_on_devices));
464 469 }