Rev 3343 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3343 | Rev 3467 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | #include <cpu.h> |
35 | #include <cpu.h> |
36 | #include <arch.h> |
36 | #include <arch.h> |
37 | #include <genarch/ofw/ofw_tree.h> |
37 | #include <genarch/ofw/ofw_tree.h> |
38 | #include <arch/drivers/tick.h> |
38 | #include <arch/drivers/tick.h> |
39 | #include <print.h> |
39 | #include <print.h> |
- | 40 | #include <arch/cpu_node.h> |
|
40 | 41 | ||
41 | /** Perform sparc64 specific initialization of the processor structure for the |
42 | /** Perform sparc64 specific initialization of the processor structure for the |
42 | * current processor. |
43 | * current processor. |
43 | */ |
44 | */ |
44 | void cpu_arch_init(void) |
45 | void cpu_arch_init(void) |
Line 52... | Line 53... | ||
52 | CPU->arch.mid = upa_config.mid; |
53 | CPU->arch.mid = upa_config.mid; |
53 | 54 | ||
54 | /* |
55 | /* |
55 | * Detect processor frequency. |
56 | * Detect processor frequency. |
56 | */ |
57 | */ |
57 | node = ofw_tree_find_child_by_device_type(ofw_tree_lookup("/"), "cpu"); |
58 | node = ofw_tree_find_child_by_device_type(cpus_parent(), "cpu"); |
58 | while (node) { |
59 | while (node) { |
59 | ofw_tree_property_t *prop; |
60 | ofw_tree_property_t *prop; |
60 | 61 | ||
61 | prop = ofw_tree_getprop(node, "upa-portid"); |
62 | prop = ofw_tree_getprop(node, PORTID_NAME); |
62 | if (prop && prop->value) { |
63 | if (prop && prop->value) { |
63 | mid = *((uint32_t *) prop->value); |
64 | mid = *((uint32_t *) prop->value); |
64 | if (mid == CPU->arch.mid) { |
65 | if (mid == CPU->arch.mid) { |
65 | prop = ofw_tree_getprop(node, |
66 | prop = ofw_tree_getprop(node, |
66 | "clock-frequency"); |
67 | "clock-frequency"); |