Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/ppc32.c

    r2902e1bb r4a99c57  
    4747#include <mm/page.h>
    4848#include <mm/km.h>
     49#include <time/clock.h>
    4950#include <abi/proc/uarg.h>
    5051#include <console/console.h>
     
    99100        interrupt_init();
    100101       
     102        ofw_tree_node_t *cpus_node;
     103        ofw_tree_node_t *cpu_node;
     104        ofw_tree_property_t *freq_prop;
     105
     106        cpus_node = ofw_tree_lookup("/cpus");
     107        if (!cpus_node)
     108                panic("Could not find cpus node.");
     109
     110        cpu_node = cpus_node->child;
     111        if (!cpu_node)
     112                panic("Could not find first cpu.");     
     113
     114        freq_prop = ofw_tree_getprop(cpu_node, "timebase-frequency");
     115        if (!freq_prop)
     116                panic("Could not get frequency property.");
     117
     118        uint32_t freq;
     119        freq = *((uint32_t *) freq_prop->value);
     120
    101121        /* Start decrementer */
    102         start_decrementer();
    103 }
    104 
     122        decrementer_start(freq / HZ);
     123}
     124
     125#ifdef CONFIG_FB
    105126static bool display_register(ofw_tree_node_t *node, void *arg)
    106127{
     
    169190        return true;
    170191}
     192#endif
    171193
    172194void arch_post_mm_init(void)
Note: See TracChangeset for help on using the changeset viewer.