.azure-pipelines.yml: add Qemu tests for MIPS Malta board
[platform/kernel/u-boot.git] / board / davinci / da8xxevm / omapl138_lcdk.c
index fe1bf44..adb56c6 100644 (file)
@@ -9,14 +9,15 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <net.h>
-#include <netdev.h>
-#include <spi.h>
-#include <spi_flash.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/davinci_nand.h>
 #include <asm/io.h>
+#include <ns16550.h>
+#include <dm/platdata.h>
 #include <linux/errno.h>
 #include <asm/mach-types.h>
 #include <asm/arch/davinci_misc.h>
@@ -227,23 +228,6 @@ int board_init(void)
        return 0;
 }
 
-#ifdef CONFIG_DRIVER_TI_EMAC
-
-/*
- * Initializes on-board ethernet controllers.
- */
-int board_eth_init(bd_t *bis)
-{
-       if (!davinci_emac_initialize()) {
-               printf("Error: Ethernet init failed!\n");
-               return -1;
-       }
-
-       return 0;
-}
-
-#endif /* CONFIG_DRIVER_TI_EMAC */
-
 #define CFG_MAC_ADDR_SPI_BUS   0
 #define CFG_MAC_ADDR_SPI_CS    0
 #define CFG_MAC_ADDR_SPI_MAX_HZ        CONFIG_SF_DEFAULT_SPEED
@@ -359,7 +343,6 @@ static struct davinci_mmc mmc_sd0 = {
        .reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE,
        .host_caps = MMC_MODE_4BIT,     /* DA850 supports only 4-bit SD/MMC */
        .voltages = MMC_VDD_32_33 | MMC_VDD_33_34,
-       .version = MMC_CTLR_VERSION_2,
 };
 
 int board_mmc_init(bd_t *bis)
@@ -371,3 +354,26 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 #endif
+
+#ifdef CONFIG_SPL_BUILD
+static const struct ns16550_platdata serial_pdata = {
+       .base = DAVINCI_UART2_BASE,
+       .reg_shift = 2,
+       .clock = 228000000,
+       .fcr = UART_FCR_DEFVAL,
+};
+
+U_BOOT_DEVICE(omapl138_uart) = {
+       .name = "ns16550_serial",
+       .platdata = &serial_pdata,
+};
+
+U_BOOT_DEVICE(omapl138_mmc) = {
+       .name = "davinci_mmc",
+};
+
+void spl_board_init(void)
+{
+       davinci_configure_pin_mux(mmc0_pins, ARRAY_SIZE(mmc0_pins));
+}
+#endif