]> git.sur5r.net Git - u-boot/commitdiff
dm: imx: Move cm_fx6 to use driver model for serial and GPIO
authorSimon Glass <sjg@chromium.org>
Thu, 2 Oct 2014 01:57:28 +0000 (19:57 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 22 Oct 2014 16:36:56 +0000 (10:36 -0600)
Now that serial and GPIO are available for iMX.6, move cm_fx6 over as an
example.

Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
board/compulab/cm_fx6/cm_fx6.c
include/configs/cm_fx6.h

index f0edc8f9f0825612109c38c11f920f52f8fe4fbe..f77ff48a1c3fb69f7bc04ec22f8cf95ac291122b 100644 (file)
@@ -9,11 +9,13 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <fsl_esdhc.h>
 #include <miiphy.h>
 #include <netdev.h>
 #include <fdt_support.h>
 #include <sata.h>
+#include <serial_mxc.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/iomux.h>
@@ -564,3 +566,11 @@ u32 get_board_rev(void)
        return cl_eeprom_get_board_rev();
 }
 
+static struct mxc_serial_platdata cm_fx6_mxc_serial_plat = {
+       .reg = (struct mxc_uart *)UART4_BASE,
+};
+
+U_BOOT_DEVICE(cm_fx6_serial) = {
+       .name   = "serial_mxc",
+       .platdata = &cm_fx6_mxc_serial_plat,
+};
index 7cf241e31d7725b826671d8f70c0b4df3ac119ef..a20c3733212ca39d2dc9509a63b703746aad5c0a 100644 (file)
 #define CONFIG_MACH_TYPE               4273
 #define CONFIG_SYS_HZ                  1000
 
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_DM
+#define CONFIG_CMD_DM
+
+#define CONFIG_DM_GPIO
+#define CONFIG_CMD_GPIO
+
+#define CONFIG_DM_SERIAL
+#define CONFIG_SYS_MALLOC_F_LEN                (1 << 10)
+#endif
+
 /* Display information on boot */
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO