]> Pileus Git - ~andy/linux/commitdiff
tty: serial: altera_jtaguart: Add device tree support
authorTobias Klauser <tklauser@distanz.ch>
Fri, 18 Feb 2011 08:10:01 +0000 (09:10 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Tue, 1 Mar 2011 16:38:27 +0000 (09:38 -0700)
Advertise the possibility to use this driver with device tree if
CONFIG_OF is set.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Documentation/devicetree/bindings/serial/altera_jtaguart.txt [new file with mode: 0644]
drivers/tty/serial/altera_jtaguart.c

diff --git a/Documentation/devicetree/bindings/serial/altera_jtaguart.txt b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
new file mode 100644 (file)
index 0000000..c152f65
--- /dev/null
@@ -0,0 +1,4 @@
+Altera JTAG UART
+
+Required properties:
+- compatible : should be "ALTR,juart-1.0"
index f9b49b5ff5e1363acabf812f354fe24856152de6..a20927fc3e1aff5a47417278b3bd9835cf576b75 100644 (file)
@@ -465,12 +465,23 @@ static int __devexit altera_jtaguart_remove(struct platform_device *pdev)
        return 0;
 }
 
+#ifdef CONFIG_OF
+static struct of_device_id altera_jtaguart_match[] = {
+       { .compatible = "ALTR,juart-1.0", },
+       {},
+};
+MODULE_DEVICE_TABLE(of, altera_jtaguart_match);
+#else
+#define altera_jtaguart_match NULL
+#endif /* CONFIG_OF */
+
 static struct platform_driver altera_jtaguart_platform_driver = {
        .probe  = altera_jtaguart_probe,
        .remove = __devexit_p(altera_jtaguart_remove),
        .driver = {
-               .name   = DRV_NAME,
-               .owner  = THIS_MODULE,
+               .name           = DRV_NAME,
+               .owner          = THIS_MODULE,
+               .of_match_table = altera_jtaguart_match,
        },
 };