[PATCH 06/11] dma: apbh: add devicetree probe support

Sascha Hauer s.hauer at pengutronix.de
Wed Jul 10 07:59:56 EDT 2013


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/dma/apbh_dma.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c
index fa4dd34..89948bc 100644
--- a/drivers/dma/apbh_dma.c
+++ b/drivers/dma/apbh_dma.c
@@ -649,9 +649,22 @@ static struct platform_device_id apbh_ids[] = {
         },
 };
 
+static __maybe_unused struct of_device_id apbh_dt_ids[] = {
+	{
+		.compatible = "fsl,imx23-dma-apbh",
+		.data = (unsigned long)IMX23_DMA,
+	}, {
+		.compatible = "fsl,imx28-dma-apbh",
+		.data = (unsigned long)IMX28_DMA,
+	}, {
+		/* sentinel */
+	}
+};
+
 static struct driver_d apbh_dma_driver = {
 	.name  = "dma-apbh",
 	.id_table = apbh_ids,
+	.of_compatible = DRV_OF_COMPAT(apbh_dt_ids),
 	.probe = apbh_dma_probe,
 };
 coredevice_platform_driver(apbh_dma_driver);
-- 
1.8.3.2




More information about the barebox mailing list