Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67315
b: refs/heads/master
c: f923473
h: refs/heads/master
i:
  67313: 8311029
  67311: 88c3dd9
v: v3
  • Loading branch information
Scott Wood authored and Kumar Gala committed Sep 14, 2007
1 parent 4b6a3ef commit 2232712
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 683d00b03eb09a140e25d7f1457d347277bc2619
refs/heads/master: f9234736112bf193e5ab451abbfbdf279cc53137
27 changes: 17 additions & 10 deletions trunk/arch/powerpc/sysdev/fsl_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ phys_addr_t get_immrbase(void)

soc = of_find_node_by_type(NULL, "soc");
if (soc) {
unsigned int size;
int size;
const void *prop = of_get_property(soc, "reg", &size);

if (prop)
immrbase = of_translate_address(soc, prop);
of_node_put(soc);
};
}

return immrbase;
}
Expand All @@ -76,16 +76,23 @@ u32 get_brgfreq(void)
if (brgfreq != -1)
return brgfreq;

node = of_find_node_by_type(NULL, "cpm");
node = of_find_compatible_node(NULL, NULL, "fsl,cpm1");
if (!node)
node = of_find_compatible_node(NULL, NULL, "fsl,cpm2");
if (!node)
node = of_find_node_by_type(NULL, "cpm");
if (node) {
unsigned int size;
const unsigned int *prop = of_get_property(node,
"brg-frequency", &size);
int size;
const unsigned int *prop;

if (prop)
prop = of_get_property(node, "fsl,brg-frequency", &size);
if (!prop)
prop = of_get_property(node, "brg-frequency", &size);
if (prop && size == 4)
brgfreq = *prop;

of_node_put(node);
};
}

return brgfreq;
}
Expand All @@ -103,14 +110,14 @@ u32 get_baudrate(void)

node = of_find_node_by_type(NULL, "serial");
if (node) {
unsigned int size;
int size;
const unsigned int *prop = of_get_property(node,
"current-speed", &size);

if (prop)
fs_baudrate = *prop;
of_node_put(node);
};
}

return fs_baudrate;
}
Expand Down

0 comments on commit 2232712

Please sign in to comment.