aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2011-02-18 03:10:01 -0500
committerGrant Likely <grant.likely@secretlab.ca>2011-03-01 11:38:27 -0500
commit9f15444fefdb33509132ff5c9be60cb315c44cb2 (patch)
treea927896fe789a01bf4e885d1d2ceb32677b0b07c
parent7c9325d79a3c3d51c98812161d47876d6830c062 (diff)
tty: serial: altera_jtaguart: Add device tree support
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>
-rw-r--r--Documentation/devicetree/bindings/serial/altera_jtaguart.txt4
-rw-r--r--drivers/tty/serial/altera_jtaguart.c15
2 files changed, 17 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/serial/altera_jtaguart.txt b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
new file mode 100644
index 000000000000..c152f65f9a28
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
@@ -0,0 +1,4 @@
1Altera JTAG UART
2
3Required properties:
4- compatible : should be "ALTR,juart-1.0"
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index f9b49b5ff5e1..a20927fc3e1a 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -465,12 +465,23 @@ static int __devexit altera_jtaguart_remove(struct platform_device *pdev)
465 return 0; 465 return 0;
466} 466}
467 467
468#ifdef CONFIG_OF
469static struct of_device_id altera_jtaguart_match[] = {
470 { .compatible = "ALTR,juart-1.0", },
471 {},
472};
473MODULE_DEVICE_TABLE(of, altera_jtaguart_match);
474#else
475#define altera_jtaguart_match NULL
476#endif /* CONFIG_OF */
477
468static struct platform_driver altera_jtaguart_platform_driver = { 478static struct platform_driver altera_jtaguart_platform_driver = {
469 .probe = altera_jtaguart_probe, 479 .probe = altera_jtaguart_probe,
470 .remove = __devexit_p(altera_jtaguart_remove), 480 .remove = __devexit_p(altera_jtaguart_remove),
471 .driver = { 481 .driver = {
472 .name = DRV_NAME, 482 .name = DRV_NAME,
473 .owner = THIS_MODULE, 483 .owner = THIS_MODULE,
484 .of_match_table = altera_jtaguart_match,
474 }, 485 },
475}; 486};
476 487