[PATCH 1/6] ahci-generic: add oftree support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Wed Feb 13 05:06:39 EST 2013


calxeda use the generic driver but have it's own compatible cf Linux kernel
Documentation

Cc: Rob Herring <rob.herring at calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 drivers/ata/ahci.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 3aff3f3..2d6e422 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -671,10 +671,19 @@ static int ahci_probe(struct device_d *dev)
 	return ret;
 }
 
+static __maybe_unused struct of_device_id ahci_dt_ids[] = {
+	{
+		.compatible = "calxeda,hb-ahci",
+	}, {
+		/* sentinel */
+	}
+};
+
 static struct driver_d ahci_driver = {
 	.name   = "ahci",
 	.probe  = ahci_probe,
 	.info	= ahci_info,
+	.of_compatible = DRV_OF_COMPAT(ahci_dt_ids),
 };
 
 static int ahci_init(void)
-- 
1.7.10.4




More information about the barebox mailing list