aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-11-05 02:59:18 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-05 02:59:18 -0500
commitd13500981e7df7f0e84d7f37f85d720cefe6043e (patch)
tree6ce86046cd8073cc295acd7b746441e17a881612 /drivers/serial
parent384a17b284b9dc92b480cf388310a25e255bac8a (diff)
apbuart: Kill dependency on deprecated Sparc-only PROM interfaces.
Use the proper modern OF ones instead. Noticed by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/apbuart.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c
index c7883a36be9d..5f9dec38db81 100644
--- a/drivers/serial/apbuart.c
+++ b/drivers/serial/apbuart.c
@@ -29,7 +29,6 @@
29#include <linux/io.h> 29#include <linux/io.h>
30#include <linux/serial_core.h> 30#include <linux/serial_core.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/oplib.h>
33 32
34#include "apbuart.h" 33#include "apbuart.h"
35 34
@@ -596,10 +595,9 @@ static struct of_platform_driver grlib_apbuart_of_driver = {
596static void grlib_apbuart_configure(void) 595static void grlib_apbuart_configure(void)
597{ 596{
598 static int enum_done; 597 static int enum_done;
599 struct device_node *np; 598 struct device_node *np, *rp;
600 struct uart_port *port = NULL; 599 struct uart_port *port = NULL;
601 600 const u32 *prop;
602 int node;
603 int freq_khz; 601 int freq_khz;
604 int v = 0, d = 0; 602 int v = 0, d = 0;
605 unsigned int addr; 603 unsigned int addr;
@@ -610,8 +608,10 @@ static void grlib_apbuart_configure(void)
610 return; 608 return;
611 609
612 /* Get bus frequency */ 610 /* Get bus frequency */
613 node = prom_getchild(prom_root_node); 611 rp = of_find_node_by_name(NULL, "/");
614 freq_khz = prom_getint(node, "clock-frequency"); 612 rp = of_get_next_child(rp, NULL);
613 prop = of_get_property(rp, "clock-frequency", NULL);
614 freq_khz = *prop;
615 615
616 line = 0; 616 line = 0;
617 for_each_matching_node(np, apbuart_match) { 617 for_each_matching_node(np, apbuart_match) {