aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-11-04 23:59:18 -0800
committerDavid S. Miller <davem@davemloft.net>2009-11-04 23:59:18 -0800
commitd13500981e7df7f0e84d7f37f85d720cefe6043e (patch)
tree6ce86046cd8073cc295acd7b746441e17a881612 /drivers/serial
parent384a17b284b9dc92b480cf388310a25e255bac8a (diff)
downloadkernel_samsung_crespo-d13500981e7df7f0e84d7f37f85d720cefe6043e.zip
kernel_samsung_crespo-d13500981e7df7f0e84d7f37f85d720cefe6043e.tar.gz
kernel_samsung_crespo-d13500981e7df7f0e84d7f37f85d720cefe6043e.tar.bz2
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 c7883a3..5f9dec3 100644
--- a/drivers/serial/apbuart.c
+++ b/drivers/serial/apbuart.c
@@ -29,7 +29,6 @@
#include <linux/io.h>
#include <linux/serial_core.h>
#include <asm/irq.h>
-#include <asm/oplib.h>
#include "apbuart.h"
@@ -596,10 +595,9 @@ static struct of_platform_driver grlib_apbuart_of_driver = {
static void grlib_apbuart_configure(void)
{
static int enum_done;
- struct device_node *np;
+ struct device_node *np, *rp;
struct uart_port *port = NULL;
-
- int node;
+ const u32 *prop;
int freq_khz;
int v = 0, d = 0;
unsigned int addr;
@@ -610,8 +608,10 @@ static void grlib_apbuart_configure(void)
return;
/* Get bus frequency */
- node = prom_getchild(prom_root_node);
- freq_khz = prom_getint(node, "clock-frequency");
+ rp = of_find_node_by_name(NULL, "/");
+ rp = of_get_next_child(rp, NULL);
+ prop = of_get_property(rp, "clock-frequency", NULL);
+ freq_khz = *prop;
line = 0;
for_each_matching_node(np, apbuart_match) {