]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/armltd/vexpress64/vexpress64.c
board_f: Drop setup_dram_config() wrapper
[people/ms/u-boot.git] / board / armltd / vexpress64 / vexpress64.c
index 7cb4e0021f66099c4c2b4a3c51c846863f0dec8a..0a224178dfdaa8e9b29099b07cf09ea78aef32b0 100644 (file)
@@ -13,6 +13,8 @@
 #include <linux/compiler.h>
 #include <dm/platdata.h>
 #include <dm/platform_data/serial_pl01x.h>
+#include "pcie.h"
+#include <asm/armv8/mmu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -27,8 +29,38 @@ U_BOOT_DEVICE(vexpress_serials) = {
        .platdata = &serial_platdata,
 };
 
+static struct mm_region vexpress64_mem_map[] = {
+       {
+               .virt = 0x0UL,
+               .phys = 0x0UL,
+               .size = 0x80000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+                        PTE_BLOCK_NON_SHARE |
+                        PTE_BLOCK_PXN | PTE_BLOCK_UXN
+       }, {
+               .virt = 0x80000000UL,
+               .phys = 0x80000000UL,
+               .size = 0xff80000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+                        PTE_BLOCK_INNER_SHARE
+       }, {
+               /* List terminator */
+               0,
+       }
+};
+
+struct mm_region *mem_map = vexpress64_mem_map;
+
+/* This function gets replaced by platforms supporting PCIe.
+ * The replacement function, eg. on Juno, initialises the PCIe bus.
+ */
+__weak void vexpress64_pcie_init(void)
+{
+}
+
 int board_init(void)
 {
+       vexpress64_pcie_init();
        return 0;
 }
 
@@ -38,6 +70,18 @@ int dram_init(void)
        return 0;
 }
 
+int dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+#ifdef PHYS_SDRAM_2
+       gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+#endif
+
+       return 0;
+}
+
 /*
  * Board specific reset that is system reset.
  */