]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/st/stv0991/stv0991.c
karo: tx6: rework PMIC code to allow for different configs for same chip
[karo-tx-uboot.git] / board / st / stv0991 / stv0991.c
index 989fb5e558c1937276b62d0e71b64fa8431f7c79..add1ce1a79a6f54e7994e50875e01dbee1010fa3 100644 (file)
 #include <asm/arch/gpio.h>
 #include <netdev.h>
 #include <asm/io.h>
+#include <dm/platdata.h>
+#include <dm/platform_data/serial_pl01x.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
 struct gpio_regs *const gpioa_regs =
                (struct gpio_regs *) GPIOA_BASE_ADDR;
 
+#ifndef CONFIG_OF_CONTROL
+static const struct pl01x_serial_platdata serial_platdata = {
+       .base = 0x80406000,
+       .type = TYPE_PL011,
+       .clock = 2700 * 1000,
+};
+
+U_BOOT_DEVICE(stv09911_serials) = {
+       .name = "serial_pl01x",
+       .platdata = &serial_platdata,
+};
+#endif
+
 #ifdef CONFIG_SHOW_BOOT_PROGRESS
 void show_boot_progress(int progress)
 {
@@ -40,12 +55,20 @@ int board_eth_enable(void)
        return 0;
 }
 
+int board_qspi_enable(void)
+{
+       stv0991_pinmux_config(QSPI_CS_CLK_PAD);
+       clock_setup(QSPI_CLOCK_CFG);
+       return 0;
+}
+
 /*
  * Miscellaneous platform dependent initialisations
  */
 int board_init(void)
 {
        board_eth_enable();
+       board_qspi_enable();
        return 0;
 }
 
@@ -81,7 +104,7 @@ int board_eth_init(bd_t *bis)
 {
        int ret = 0;
 
-#if defined(CONFIG_DESIGNWARE_ETH)
+#if defined(CONFIG_ETH_DESIGNWARE)
        u32 interface = PHY_INTERFACE_MODE_MII;
        if (designware_initialize(GMAC_BASE_ADDR, interface) >= 0)
                ret++;