[PATCH] serial_auart: make dt aware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This allows to instantiate devices from an oftree and so allows
to select the console using /chosen/stdout-path.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 drivers/serial/serial_auart.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/serial/serial_auart.c b/drivers/serial/serial_auart.c
index 9bef576cd701..c3b9a1995f7d 100644
--- a/drivers/serial/serial_auart.c
+++ b/drivers/serial/serial_auart.c
@@ -230,9 +230,18 @@ static void auart_serial_remove(struct device_d *dev)
 	free(priv);
 }
 
+static const __maybe_unused struct of_device_id auart_serial_dt_ids[] = {
+	{
+		.compatible = "fsl,imx23-auart",
+	}, {
+		/* sentinel */
+	}
+};
+
 static struct driver_d auart_serial_driver = {
 	.name = "auart_serial",
 	.probe = auart_serial_probe,
 	.remove = auart_serial_remove,
+	.of_compatible = DRV_OF_COMPAT(auart_serial_dt_ids),
 };
 console_platform_driver(auart_serial_driver);
-- 
2.8.0.rc3


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux