]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
colibri_pxa270: transition to driver model for serial
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>
Mon, 14 Nov 2016 20:40:28 +0000 (21:40 +0100)
committerMarek Vasut <marex@denx.de>
Wed, 23 Nov 2016 12:53:20 +0000 (13:53 +0100)
Add serial platform data to board file.
Enable driver model for PXA serial driver.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
board/toradex/colibri_pxa270/colibri_pxa270.c
configs/colibri_pxa270_defconfig
include/configs/colibri_pxa270.h

index 3def0a6fd0709533beafcea38b44a50a4761bf75..2e3e03a152716846659f43545fdf7d145de87283 100644 (file)
@@ -8,10 +8,13 @@
 
 #include <common.h>
 #include <asm/arch/hardware.h>
-#include <asm/arch/regs-mmc.h>
 #include <asm/arch/pxa.h>
-#include <netdev.h>
+#include <asm/arch/regs-mmc.h>
+#include <asm/arch/regs-uart.h>
 #include <asm/io.h>
+#include <dm/platdata.h>
+#include <dm/platform_data/serial_pxa.h>
+#include <netdev.h>
 #include <serial.h>
 #include <usb.h>
 
@@ -105,3 +108,14 @@ int board_mmc_init(bd_t *bis)
        return 0;
 }
 #endif
+
+static const struct pxa_serial_platdata serial_platdata = {
+       .base = (struct pxa_uart_regs *)FFUART_BASE,
+       .port = FFUART_INDEX,
+       .baudrate = CONFIG_BAUDRATE,
+};
+
+U_BOOT_DEVICE(pxa_serials) = {
+       .name = "serial_pxa",
+       .platdata = &serial_platdata,
+};
index 0b5c20dfed924c6c70e3b8a282ae89f63dcdb117..e0a36f13ddb49ca4eb1298c82c97ab5ccca04987 100644 (file)
@@ -16,6 +16,8 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_DM=y
+CONFIG_DM_SERIAL=y
 CONFIG_PXA_SERIAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
index 39fd94b3de345b9cd776f24650853c7cbb9d68a6..31eb5e9b9a44d8b164e84ffdcff4269f639e23da 100644 (file)
@@ -43,8 +43,6 @@
 /*
  * Serial Console Configuration
  */
-#define        CONFIG_FFUART                   1
-#define CONFIG_CONS_INDEX              3
 #define        CONFIG_BAUDRATE                 115200
 
 /*