Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/machine_func.c

    r66fcba2 r214ec25c  
    3939
    4040#include <arch/machine_func.h>
    41 #include <arch/mach/integratorcp/integratorcp.h>
    42 #include <arch/mach/testarm/testarm.h>
    4341
    44 /** Pointer to machine_ops structure being used. */
    45 struct arm_machine_ops *machine_ops;
    46 
    47 /** Initialize machine_ops pointer. */
    48 void machine_ops_init(void)
    49 {
    50 #if defined(MACHINE_testarm)
    51         machine_ops = &gxemul_machine_ops;
    52 #elif defined(MACHINE_integratorcp)
    53         machine_ops = &icp_machine_ops;
    54 #else
    55 #error Machine type not defined.
    56 #endif
    57 }
    5842
    5943/** Maps HW devices to the kernel address space using #hw_map. */
    6044void machine_init(void)
    6145{
    62         (machine_ops->machine_init)();
     46        (machine_ops.machine_init)();
    6347}
    6448
     
    6751void machine_timer_irq_start(void)
    6852{
    69         (machine_ops->machine_timer_irq_start)();
     53        (machine_ops.machine_timer_irq_start)();
    7054}
    7155
     
    7458void machine_cpu_halt(void)
    7559{
    76         (machine_ops->machine_cpu_halt)();
     60        (machine_ops.machine_cpu_halt)();
    7761}
    7862
     
    8468uintptr_t machine_get_memory_size(void)
    8569{
    86         return (machine_ops->machine_get_memory_size)();
     70        return (machine_ops.machine_get_memory_size)();
    8771}
    8872
     
    9478void machine_irq_exception(unsigned int exc_no, istate_t *istate)
    9579{
    96         (machine_ops->machine_irq_exception)(exc_no, istate);
     80        (machine_ops.machine_irq_exception)(exc_no, istate);
    9781}
    9882
     
    10387void machine_frame_init(void)
    10488{
    105         (machine_ops->machine_frame_init)();
     89        (machine_ops.machine_frame_init)();
    10690}
    10791
     
    11195void machine_output_init(void)
    11296{
    113         (machine_ops->machine_output_init)();
     97        (machine_ops.machine_output_init)();
    11498}
    11599
     
    119103void machine_input_init(void)
    120104{
    121         (machine_ops->machine_input_init)();
     105        (machine_ops.machine_input_init)();
     106}
     107
     108/*
     109 * Generic function to use, if sepcific function doesn't define any of the above functions.
     110 */
     111void machine_genfunc()
     112{
    122113}
    123114
Note: See TracChangeset for help on using the changeset viewer.