Merge branch 'master' of git://git.denx.de/u-boot-spi
[platform/kernel/u-boot.git] / board / synopsys / axs10x / axs10x.c
index e6b69da..ffa7c15 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -34,6 +33,13 @@ int board_mmc_init(bd_t *bis)
        return 0;
 }
 
+int board_mmc_getcd(struct mmc *mmc)
+{
+       struct dwmci_host *host = mmc->priv;
+
+       return !(dwmci_readl(host, DWMCI_CDETECT) & 1);
+}
+
 #define AXS_MB_CREG    0xE0011000
 
 int board_early_init_f(void)
@@ -47,6 +53,18 @@ int board_early_init_f(void)
 }
 
 #ifdef CONFIG_ISA_ARCV2
+
+void board_jump_and_run(ulong entry, int zero, int arch, uint params)
+{
+       void (*kernel_entry)(int zero, int arch, uint params);
+
+       kernel_entry = (void (*)(int, int, uint))entry;
+
+       smp_set_core_boot_addr(entry, -1);
+       smp_kick_all_cpus();
+       kernel_entry(zero, arch, params);
+}
+
 #define RESET_VECTOR_ADDR      0x0
 
 void smp_set_core_boot_addr(unsigned long addr, int corenr)
@@ -91,3 +109,11 @@ void smp_kick_all_cpus(void)
        writel(cmd, (void __iomem *)AXC003_CREG_CPU_START);
 }
 #endif
+
+int checkboard(void)
+{
+       printf("Board: ARC Software Development Platform AXS%s\n",
+            is_isa_arcv2() ? "103" : "101");
+
+       return 0;
+};