aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/uartlite.c
diff options
context:
space:
mode:
authorStephen Neuendorffer <stephen.neuendorffer@xilinx.com>2008-01-08 14:35:05 -0500
committerGrant Likely <grant.likely@secretlab.ca>2008-02-06 12:23:21 -0500
commit0e349b0e2d90eb1bb76d16c48d0127feebfeeb89 (patch)
treec09f26f4bae9a5431c24c105e1424d035a28b384 /drivers/serial/uartlite.c
parent911a3175997000c1fcddb2013aaa5fbbee79f0f0 (diff)
[POWERPC] Xilinx: Update compatible to use values generated by BSP generator.
Mainly, this involves two changes: 1) xilinx->xlnx (recognized standard is to use the stock ticker) 2) In order to have the device tree focus on describing what the hardware is as exactly as possible, the compatible strings contain the full IP name and IP version. Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/serial/uartlite.c')
-rw-r--r--drivers/serial/uartlite.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index c54a5ad992b1..b22023f1ec6b 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -17,10 +17,21 @@
17#include <linux/tty.h> 17#include <linux/tty.h>
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/init.h>
20#include <asm/io.h> 21#include <asm/io.h>
21#if defined(CONFIG_OF) 22#if defined(CONFIG_OF)
23#include <linux/of.h>
22#include <linux/of_device.h> 24#include <linux/of_device.h>
23#include <linux/of_platform.h> 25#include <linux/of_platform.h>
26
27/* Match table for of_platform binding */
28static struct of_device_id ulite_of_match[] __devinitdata = {
29 { .compatible = "xlnx,opb-uartlite-1.00.b", },
30 { .compatible = "xlnx,xps-uartlite-1.00.a", },
31 {}
32};
33MODULE_DEVICE_TABLE(of, ulite_of_match);
34
24#endif 35#endif
25 36
26#define ULITE_NAME "ttyUL" 37#define ULITE_NAME "ttyUL"
@@ -275,6 +286,9 @@ static void ulite_release_port(struct uart_port *port)
275 286
276static int ulite_request_port(struct uart_port *port) 287static int ulite_request_port(struct uart_port *port)
277{ 288{
289 pr_debug("ulite console: port=%p; port->mapbase=%x\n",
290 port, port->mapbase);
291
278 if (!request_mem_region(port->mapbase, ULITE_REGION, "uartlite")) { 292 if (!request_mem_region(port->mapbase, ULITE_REGION, "uartlite")) {
279 dev_err(port->dev, "Memory region busy\n"); 293 dev_err(port->dev, "Memory region busy\n");
280 return -EBUSY; 294 return -EBUSY;
@@ -383,7 +397,7 @@ static inline void __init ulite_console_of_find_device(int id)
383 const unsigned int *of_id; 397 const unsigned int *of_id;
384 int rc; 398 int rc;
385 399
386 for_each_compatible_node(np, NULL, "xilinx,uartlite") { 400 for_each_matching_node(np, ulite_of_match) {
387 of_id = of_get_property(np, "port-number", NULL); 401 of_id = of_get_property(np, "port-number", NULL);
388 if ((!of_id) || (*of_id != id)) 402 if ((!of_id) || (*of_id != id))
389 continue; 403 continue;
@@ -617,13 +631,6 @@ static int __devexit ulite_of_remove(struct of_device *op)
617 return ulite_release(&op->dev); 631 return ulite_release(&op->dev);
618} 632}
619 633
620/* Match table for of_platform binding */
621static struct of_device_id ulite_of_match[] __devinitdata = {
622 { .type = "serial", .compatible = "xilinx,uartlite", },
623 {},
624};
625MODULE_DEVICE_TABLE(of, ulite_of_match);
626
627static struct of_platform_driver ulite_of_driver = { 634static struct of_platform_driver ulite_of_driver = {
628 .owner = THIS_MODULE, 635 .owner = THIS_MODULE,
629 .name = "uartlite", 636 .name = "uartlite",