arm: am57xx: cl-som-am57x: remove board support
[oweals/u-boot.git] / arch / arm / mach-socfpga / board.c
index c23ac4ead3ed44a433b259cb308ff63e3554699e..7c8c05cc3194a61f2fbf1efe07f7459eb446d39b 100644 (file)
@@ -7,7 +7,10 @@
 
 #include <common.h>
 #include <errno.h>
+#include <fdtdec.h>
 #include <asm/arch/reset_manager.h>
+#include <asm/arch/clock_manager.h>
+#include <asm/arch/misc.h>
 #include <asm/io.h>
 
 #include <usb.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-void s_init(void) {}
+void s_init(void) {
+#ifndef CONFIG_ARM64
+       /*
+        * Preconfigure ACTLR and CPACR, make sure Write Full Line of Zeroes
+        * is disabled in ACTLR.
+        * This is optional on CycloneV / ArriaV.
+        * This is mandatory on Arria10, otherwise Linux refuses to boot.
+        */
+       asm volatile(
+               "mcr p15, 0, %0, c1, c0, 1\n"
+               "mcr p15, 0, %0, c1, c0, 2\n"
+               "isb\n"
+               "dsb\n"
+       ::"r"(0x0));
+#endif
+}
 
 /*
  * Miscellaneous platform dependent initialisations
@@ -28,6 +46,13 @@ int board_init(void)
        return 0;
 }
 
+int dram_init_banksize(void)
+{
+       fdtdec_setup_memory_banksize();
+
+       return 0;
+}
+
 #ifdef CONFIG_USB_GADGET
 struct dwc2_plat_otg_data socfpga_otg_data = {
        .usb_gusbcfg    = 0x1417,