If you have a machine based on a Motorola IMX CPU you
can enable its onboard serial port by enabling this option.
+config NULLDEV_SERIAL
+ bool "Null serial device"
+ help
+ Select this to enable null serial device support. A null serial
+ device merely acts as a placeholder for a serial device and does
+ nothing for all it's operation.
+
config PIC32_SERIAL
bool "Support for Microchip PIC32 on-chip UART"
depends on DM_SERIAL && MACH_PIC32
obj-$(CONFIG_MSM_SERIAL) += serial_msm.o
obj-$(CONFIG_MVEBU_A3700_UART) += serial_mvebu_a3700.o
obj-$(CONFIG_MPC8XX_CONS) += serial_mpc8xx.o
+obj-$(CONFIG_NULLDEV_SERIAL) += serial_nulldev.o
ifndef CONFIG_SPL_BUILD
obj-$(CONFIG_USB_TTY) += usbtty.o
--- /dev/null
+/*
+ * Copyright (c) 2015 National Instruments
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <serial.h>
+
+static int nulldev_serial_setbrg(struct udevice *dev, int baudrate)
+{
+ return 0;
+}
+
+static int nulldev_serial_getc(struct udevice *dev)
+{
+ return -EAGAIN;
+}
+
+static int nulldev_serial_input(struct udevice *dev)
+{
+ return 0;
+}
+
+static int nulldev_serial_putc(struct udevice *dev, const char ch)
+{
+ return 0;
+}
+
+static const struct udevice_id nulldev_serial_ids[] = {
+ { .compatible = "nulldev-serial" },
+ { }
+};
+
+
+const struct dm_serial_ops nulldev_serial_ops = {
+ .putc = nulldev_serial_putc,
+ .getc = nulldev_serial_getc,
+ .setbrg = nulldev_serial_setbrg,
+};
+
+U_BOOT_DRIVER(serial_nulldev) = {
+ .name = "serial_nulldev",
+ .id = UCLASS_SERIAL,
+ .of_match = nulldev_serial_ids,
+ .ops = &nulldev_serial_ops,
+};