aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-17 21:22:08 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-17 21:22:08 -0400
commitb71a107c66ad952c9d35ec046a803efc89a80556 (patch)
treeeb1f77af4f14974ba40a413d7679b3a451295a3d /arch/powerpc/platforms
parent4b337c5f245b6587ba844ac7bb13c313a2912f7b (diff)
parente7c5a4f292e0d1f4ba9a3a94b2c8e8b71e35b25a (diff)
Merge commit 'gcl/merge' into next
Manual merge of: drivers/net/fec_mpc52xx.c
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/512x/clock.c10
-rw-r--r--arch/powerpc/platforms/512x/mpc512x.h1
-rw-r--r--arch/powerpc/platforms/512x/mpc512x_shared.c23
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_common.c32
4 files changed, 6 insertions, 60 deletions
diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c
index 1bcff94eb924..84544d072043 100644
--- a/arch/powerpc/platforms/512x/clock.c
+++ b/arch/powerpc/platforms/512x/clock.c
@@ -24,7 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <linux/of_platform.h> 26#include <linux/of_platform.h>
27#include <asm/mpc512x.h> 27#include <asm/mpc5xxx.h>
28#include <asm/clk_interface.h> 28#include <asm/clk_interface.h>
29 29
30#undef CLK_DEBUG 30#undef CLK_DEBUG
@@ -83,13 +83,13 @@ static void dump_clocks(void)
83 mutex_lock(&clocks_mutex); 83 mutex_lock(&clocks_mutex);
84 printk(KERN_INFO "CLOCKS:\n"); 84 printk(KERN_INFO "CLOCKS:\n");
85 list_for_each_entry(p, &clocks, node) { 85 list_for_each_entry(p, &clocks, node) {
86 printk(KERN_INFO " %s %ld", p->name, p->rate); 86 pr_info(" %s=%ld", p->name, p->rate);
87 if (p->parent) 87 if (p->parent)
88 printk(KERN_INFO " %s %ld", p->parent->name, 88 pr_cont(" %s=%ld", p->parent->name,
89 p->parent->rate); 89 p->parent->rate);
90 if (p->flags & CLK_HAS_CTRL) 90 if (p->flags & CLK_HAS_CTRL)
91 printk(KERN_INFO " reg/bit %d/%d", p->reg, p->bit); 91 pr_cont(" reg/bit=%d/%d", p->reg, p->bit);
92 printk("\n"); 92 pr_cont("\n");
93 } 93 }
94 mutex_unlock(&clocks_mutex); 94 mutex_unlock(&clocks_mutex);
95} 95}
diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h
index 9c03693cb009..22a5352407e0 100644
--- a/arch/powerpc/platforms/512x/mpc512x.h
+++ b/arch/powerpc/platforms/512x/mpc512x.h
@@ -11,7 +11,6 @@
11 11
12#ifndef __MPC512X_H__ 12#ifndef __MPC512X_H__
13#define __MPC512X_H__ 13#define __MPC512X_H__
14extern unsigned long mpc512x_find_ips_freq(struct device_node *node);
15extern void __init mpc512x_init_IRQ(void); 14extern void __init mpc512x_init_IRQ(void);
16void __init mpc512x_declare_of_platform_devices(void); 15void __init mpc512x_declare_of_platform_devices(void);
17#endif /* __MPC512X_H__ */ 16#endif /* __MPC512X_H__ */
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c
index d8cd579f3191..434d683df5a0 100644
--- a/arch/powerpc/platforms/512x/mpc512x_shared.c
+++ b/arch/powerpc/platforms/512x/mpc512x_shared.c
@@ -24,29 +24,6 @@
24 24
25#include "mpc512x.h" 25#include "mpc512x.h"
26 26
27unsigned long
28mpc512x_find_ips_freq(struct device_node *node)
29{
30 struct device_node *np;
31 const unsigned int *p_ips_freq = NULL;
32
33 of_node_get(node);
34 while (node) {
35 p_ips_freq = of_get_property(node, "bus-frequency", NULL);
36 if (p_ips_freq)
37 break;
38
39 np = of_get_parent(node);
40 of_node_put(node);
41 node = np;
42 }
43 if (node)
44 of_node_put(node);
45
46 return p_ips_freq ? *p_ips_freq : 0;
47}
48EXPORT_SYMBOL(mpc512x_find_ips_freq);
49
50void __init mpc512x_init_IRQ(void) 27void __init mpc512x_init_IRQ(void)
51{ 28{
52 struct device_node *np; 29 struct device_node *np;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 8e3dd5a0f228..a46bad0c2339 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -47,36 +47,6 @@ static DEFINE_SPINLOCK(mpc52xx_lock);
47static struct mpc52xx_gpt __iomem *mpc52xx_wdt; 47static struct mpc52xx_gpt __iomem *mpc52xx_wdt;
48static struct mpc52xx_cdm __iomem *mpc52xx_cdm; 48static struct mpc52xx_cdm __iomem *mpc52xx_cdm;
49 49
50/**
51 * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
52 * @node: device node
53 *
54 * Returns IPB bus frequency, or 0 if the bus frequency cannot be found.
55 */
56unsigned int
57mpc52xx_find_ipb_freq(struct device_node *node)
58{
59 struct device_node *np;
60 const unsigned int *p_ipb_freq = NULL;
61
62 of_node_get(node);
63 while (node) {
64 p_ipb_freq = of_get_property(node, "bus-frequency", NULL);
65 if (p_ipb_freq)
66 break;
67
68 np = of_get_parent(node);
69 of_node_put(node);
70 node = np;
71 }
72 if (node)
73 of_node_put(node);
74
75 return p_ipb_freq ? *p_ipb_freq : 0;
76}
77EXPORT_SYMBOL(mpc52xx_find_ipb_freq);
78
79
80/* 50/*
81 * Configure the XLB arbiter settings to match what Linux expects. 51 * Configure the XLB arbiter settings to match what Linux expects.
82 */ 52 */
@@ -221,7 +191,7 @@ unsigned int mpc52xx_get_xtal_freq(struct device_node *node)
221 if (!mpc52xx_cdm) 191 if (!mpc52xx_cdm)
222 return 0; 192 return 0;
223 193
224 freq = mpc52xx_find_ipb_freq(node); 194 freq = mpc5xxx_get_bus_frequency(node);
225 if (!freq) 195 if (!freq)
226 return 0; 196 return 0;
227 197