Changeset cefb126 in mainline for kernel/arch/arm32/src/machine_func.c
- Timestamp:
- 2010-07-02T14:19:30Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 89c57b6
- Parents:
- fe7abd0 (diff), e3ee9b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/machine_func.c
rfe7abd0 rcefb126 39 39 40 40 #include <arch/machine_func.h> 41 #include <arch/mach/integratorcp/integratorcp.h> 42 #include <arch/mach/testarm/testarm.h> 41 43 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 } 42 58 43 59 /** Maps HW devices to the kernel address space using #hw_map. */ 44 60 void machine_init(void) 45 61 { 46 (machine_ops .machine_init)();62 (machine_ops->machine_init)(); 47 63 } 48 64 … … 51 67 void machine_timer_irq_start(void) 52 68 { 53 (machine_ops .machine_timer_irq_start)();69 (machine_ops->machine_timer_irq_start)(); 54 70 } 55 71 … … 58 74 void machine_cpu_halt(void) 59 75 { 60 (machine_ops .machine_cpu_halt)();76 (machine_ops->machine_cpu_halt)(); 61 77 } 62 78 … … 68 84 uintptr_t machine_get_memory_size(void) 69 85 { 70 return (machine_ops .machine_get_memory_size)();86 return (machine_ops->machine_get_memory_size)(); 71 87 } 72 88 … … 78 94 void machine_irq_exception(unsigned int exc_no, istate_t *istate) 79 95 { 80 (machine_ops .machine_irq_exception)(exc_no, istate);96 (machine_ops->machine_irq_exception)(exc_no, istate); 81 97 } 82 98 … … 87 103 void machine_frame_init(void) 88 104 { 89 (machine_ops .machine_frame_init)();105 (machine_ops->machine_frame_init)(); 90 106 } 91 107 … … 95 111 void machine_output_init(void) 96 112 { 97 (machine_ops .machine_output_init)();113 (machine_ops->machine_output_init)(); 98 114 } 99 115 … … 103 119 void machine_input_init(void) 104 120 { 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 { 121 (machine_ops->machine_input_init)(); 113 122 } 114 123
Note:
See TracChangeset
for help on using the changeset viewer.