summaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-01-27 22:45:16 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-01-28 08:18:44 +0100
commitf0535fe5eee24fd78643dcd2e448c2f7d0c386ee (patch)
tree4144b79b8487e1f2d3ff13373cb70454d3d320e5 /drivers/serial
parent846f27cf928ff24b54cfe8512945ae4fcb2bd52a (diff)
downloadbarebox-f0535fe5eee24fd78643dcd2e448c2f7d0c386ee.tar.gz
barebox-f0535fe5eee24fd78643dcd2e448c2f7d0c386ee.tar.xz
serial: stm_serial: Add devicetree support
This adds device tree support for the stm serial driver. This driver really is a AMBA primecell, so the amba-pl011 could be used. However, the current code tries to get the apb_pclk before the clocks are registered, so this does not work. Use the stm driver instead until a solution is found. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/stm-serial.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/serial/stm-serial.c b/drivers/serial/stm-serial.c
index e5f57dc6e7..8bb242b14d 100644
--- a/drivers/serial/stm-serial.c
+++ b/drivers/serial/stm-serial.c
@@ -189,9 +189,18 @@ static void stm_serial_remove(struct device_d *dev)
free(priv);
}
+static __maybe_unused struct of_device_id stm_serial_dt_ids[] = {
+ {
+ .compatible = "arm,pl011",
+ }, {
+ /* sentinel */
+ }
+};
+
static struct driver_d stm_serial_driver = {
.name = "stm_serial",
.probe = stm_serial_probe,
.remove = stm_serial_remove,
+ .of_compatible = DRV_OF_COMPAT(stm_serial_dt_ids),
};
console_platform_driver(stm_serial_driver);