summaryrefslogtreecommitdiffstats
path: root/drivers/serial/serial_imx.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-08-14 10:05:07 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-09-17 18:14:40 +0200
commit2fef30b560941ec1fcb46ef8ed3746f7609e6bb5 (patch)
tree351be76809174c982d62ac25aeeb4e5d8583c17e /drivers/serial/serial_imx.c
parent6a2262de50b2000dd353f1a2d3b00316bc9e18c1 (diff)
downloadbarebox-2fef30b560941ec1fcb46ef8ed3746f7609e6bb5.tar.gz
serial i.MX: oftree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/serial/serial_imx.c')
-rw-r--r--drivers/serial/serial_imx.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/serial/serial_imx.c b/drivers/serial/serial_imx.c
index 1e1e8e3..9d15038 100644
--- a/drivers/serial/serial_imx.c
+++ b/drivers/serial/serial_imx.c
@@ -357,10 +357,23 @@ static void imx_serial_remove(struct device_d *dev)
free(priv);
}
+static __maybe_unused struct of_device_id imx_serial_dt_ids[] = {
+ {
+ .compatible = "fsl,imx1-uart",
+ .data = 0,
+ }, {
+ .compatible = "fsl,imx21-uart",
+ .data = 1,
+ }, {
+ /* sentinel */
+ }
+};
+
static struct driver_d imx_serial_driver = {
- .name = "imx_serial",
- .probe = imx_serial_probe,
+ .name = "imx_serial",
+ .probe = imx_serial_probe,
.remove = imx_serial_remove,
+ .of_compatible = DRV_OF_COMPAT(imx_serial_dt_ids),
};
static int imx_serial_init(void)