[PATCH 15/15] ARM i.MX: Add devicetree support for clocksource driver
Sascha Hauer
s.hauer at pengutronix.de
Wed Sep 12 16:06:47 EDT 2012
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/mach-imx/clocksource.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
index 166710c..31a5f25 100644
--- a/arch/arm/mach-imx/clocksource.c
+++ b/arch/arm/mach-imx/clocksource.c
@@ -138,6 +138,18 @@ static int imx_gpt_probe(struct device_d *dev)
return 0;
}
+static __maybe_unused struct of_device_id imx_gpt_dt_ids[] = {
+ {
+ .compatible = "fsl,imx1-gpt",
+ .data = (unsigned long)®s_imx1,
+ }, {
+ .compatible = "fsl,imx31-gpt",
+ .data = (unsigned long)®s_imx31,
+ }, {
+ /* sentinel */
+ }
+};
+
static struct platform_device_id imx_gpt_ids[] = {
{
.name = "imx1-gpt",
@@ -153,6 +165,7 @@ static struct platform_device_id imx_gpt_ids[] = {
static struct driver_d imx_gpt_driver = {
.name = "imx-gpt",
.probe = imx_gpt_probe,
+ .of_compatible = DRV_OF_COMPAT(imx_gpt_dt_ids),
.id_table = imx_gpt_ids,
};
--
1.7.10.4
More information about the barebox
mailing list