Changes in kernel/arch/arm32/src/machine_func.c [66fcba2:214ec25c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/machine_func.c
r66fcba2 r214ec25c 39 39 40 40 #include <arch/machine_func.h> 41 #include <arch/mach/integratorcp/integratorcp.h>42 #include <arch/mach/testarm/testarm.h>43 41 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 #else55 #error Machine type not defined.56 #endif57 }58 42 59 43 /** Maps HW devices to the kernel address space using #hw_map. */ 60 44 void machine_init(void) 61 45 { 62 (machine_ops ->machine_init)();46 (machine_ops.machine_init)(); 63 47 } 64 48 … … 67 51 void machine_timer_irq_start(void) 68 52 { 69 (machine_ops ->machine_timer_irq_start)();53 (machine_ops.machine_timer_irq_start)(); 70 54 } 71 55 … … 74 58 void machine_cpu_halt(void) 75 59 { 76 (machine_ops ->machine_cpu_halt)();60 (machine_ops.machine_cpu_halt)(); 77 61 } 78 62 … … 84 68 uintptr_t machine_get_memory_size(void) 85 69 { 86 return (machine_ops ->machine_get_memory_size)();70 return (machine_ops.machine_get_memory_size)(); 87 71 } 88 72 … … 94 78 void machine_irq_exception(unsigned int exc_no, istate_t *istate) 95 79 { 96 (machine_ops ->machine_irq_exception)(exc_no, istate);80 (machine_ops.machine_irq_exception)(exc_no, istate); 97 81 } 98 82 … … 103 87 void machine_frame_init(void) 104 88 { 105 (machine_ops ->machine_frame_init)();89 (machine_ops.machine_frame_init)(); 106 90 } 107 91 … … 111 95 void machine_output_init(void) 112 96 { 113 (machine_ops ->machine_output_init)();97 (machine_ops.machine_output_init)(); 114 98 } 115 99 … … 119 103 void machine_input_init(void) 120 104 { 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 */ 111 void machine_genfunc() 112 { 122 113 } 123 114
Note:
See TracChangeset
for help on using the changeset viewer.