Merge branch 'master' of git://www.denx.de/git/u-boot-imx
[oweals/u-boot.git] / arch / powerpc / cpu / mpc85xx / fdt.c
index 3665ec6b6c8fb7a93f804ec808d3075c3db6c231..d4c3d9df9b8fe314fe17d97ef51d6371aaf2d09b 100644 (file)
@@ -134,6 +134,21 @@ void ft_fixup_cpu(void *blob, u64 memory_limit)
                        printf("Failed to reserve memory for spin table: %s\n",
                                fdt_strerror(off));
        }
+#ifdef CONFIG_DEEP_SLEEP
+#ifdef CONFIG_SPL_MMC_BOOT
+       off = fdt_add_mem_rsv(blob, CONFIG_SYS_MMC_U_BOOT_START,
+               CONFIG_SYS_MMC_U_BOOT_SIZE);
+       if (off < 0)
+               printf("Failed to reserve memory for SD deep sleep: %s\n",
+                      fdt_strerror(off));
+#elif defined(CONFIG_SPL_SPI_BOOT)
+       off = fdt_add_mem_rsv(blob, CONFIG_SYS_SPI_FLASH_U_BOOT_START,
+               CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE);
+       if (off < 0)
+               printf("Failed to reserve memory for SPI deep sleep: %s\n",
+                      fdt_strerror(off));
+#endif
+#endif
 }
 #endif
 
@@ -699,7 +714,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
                ccsr_sec_t __iomem *sec;
 
                sec = (void __iomem *)CONFIG_SYS_FSL_SEC_ADDR;
-               fdt_fixup_crypto_node(blob, in_be32(&sec->secvid_ms));
+               fdt_fixup_crypto_node(blob, sec_in32(&sec->secvid_ms));
        }
 #endif