common: add CMD_GPIO to Kconfig
[platform/kernel/u-boot.git] / include / configs / ti_armv7_keystone2.h
index acc686c..2b2c060 100644 (file)
 
 /* UART Configuration */
 #define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_MEM32
+#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
+#define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    -4
+#else
+#define CONFIG_KEYSTONE_SERIAL
+#endif
 #define CONFIG_SYS_NS16550_COM1                KS2_UART0_BASE
 #define CONFIG_SYS_NS16550_COM2                KS2_UART1_BASE
-#define CONFIG_SYS_NS16550_CLK         clk_get_rate(KS2_CLK1_6)
 #define CONFIG_CONS_INDEX              1
 
+#ifndef CONFIG_SOC_K2G
+#define CONFIG_SYS_NS16550_CLK         clk_get_rate(KS2_CLK1_6)
+#else
+#define CONFIG_SYS_NS16550_CLK         clk_get_rate(uart_pll_clk) / 2
+#endif
+
 /* SPI Configuration */
 #define CONFIG_SPI_FLASH_STMICRO
 #define CONFIG_DAVINCI_SPI
 
 /* And no support for GPIO, yet.. */
 #undef CONFIG_SPL_GPIO_SUPPORT
-#undef CONFIG_CMD_GPIO
 
 /* we may include files below only after all above definitions */
 #include <asm/arch/hardware.h>
 #include <asm/arch/clock.h>
+#ifndef CONFIG_SOC_K2G
 #define CONFIG_SYS_HZ_CLOCK            clk_get_rate(KS2_CLK1_6)
+#else
+#define CONFIG_SYS_HZ_CLOCK            external_clk[sys_clk]
+#endif
 
 #endif /* __CONFIG_KS2_EVM_H */