9
0
Fork 0

serial_auart: make dt aware

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@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Uwe Kleine-König 2016-04-26 11:08:34 +02:00 committed by Sascha Hauer
parent 9ac2ef5789
commit 63ae16da82
1 changed files with 9 additions and 0 deletions

View File

@ -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);