aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/fsl_soc.c
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2007-08-29 16:08:40 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-10-03 21:35:43 -0400
commit6d817aa71fddea859ba02d1a0b326da930ce6b50 (patch)
treeb06061acb38cf5592c7a6480b9cd64b76679913c /arch/powerpc/sysdev/fsl_soc.c
parent26f571d7c968dbd30656fc1421eeb0d9088aaad9 (diff)
[POWERPC] CPM: Change from fsl,brg-frequency to brg/clock-frequency
As suggested by David Gibson, now that we have a separate node for the baud rate generators, it's better to use the standard clock-frequency property than a cpm-node-level fsl,brg-frequency property. This patch updates existing places where fsl,brg-frequency is used. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_soc.c')
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index d028e8da027b..30523667df4e 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -73,22 +73,26 @@ static u32 brgfreq = -1;
73u32 get_brgfreq(void) 73u32 get_brgfreq(void)
74{ 74{
75 struct device_node *node; 75 struct device_node *node;
76 const unsigned int *prop;
77 int size;
76 78
77 if (brgfreq != -1) 79 if (brgfreq != -1)
78 return brgfreq; 80 return brgfreq;
79 81
80 node = of_find_compatible_node(NULL, NULL, "fsl,cpm1"); 82 node = of_find_compatible_node(NULL, NULL, "fsl,cpm-brg");
81 if (!node)
82 node = of_find_compatible_node(NULL, NULL, "fsl,cpm2");
83 if (!node)
84 node = of_find_node_by_type(NULL, "cpm");
85 if (node) { 83 if (node) {
86 int size; 84 prop = of_get_property(node, "clock-frequency", &size);
87 const unsigned int *prop; 85 if (prop && size == 4)
86 brgfreq = *prop;
88 87
89 prop = of_get_property(node, "fsl,brg-frequency", &size); 88 of_node_put(node);
90 if (!prop) 89 return brgfreq;
91 prop = of_get_property(node, "brg-frequency", &size); 90 }
91
92 /* Legacy device binding -- will go away when no users are left. */
93 node = of_find_node_by_type(NULL, "cpm");
94 if (node) {
95 prop = of_get_property(node, "brg-frequency", &size);
92 if (prop && size == 4) 96 if (prop && size == 4)
93 brgfreq = *prop; 97 brgfreq = *prop;
94 98