Changeset 1787e527 in mainline for kernel/genarch/include/ofw/ebus.h
- Timestamp:
- 2009-11-16T21:22:54Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5ebdf94
- Parents:
- fcbd1be (diff), 9c70ed6 (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 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/include/ofw/ebus.h
rfcbd1be r1787e527 1 1 /* 2 * Copyright (c) 2006 J osef Cejka2 * Copyright (c) 2006 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libcmips32 30 * @{ 31 */ 32 /** @file 33 * @ingroup libcmips32eb 34 */ 29 #ifndef KERN_EBUS_H_ 30 #define KERN_EBUS_H_ 35 31 36 #ifndef LIBC_mips32_STACKARG_H_ 37 #define LIBC_mips32_STACKARG_H_ 32 #include <genarch/ofw/ofw_tree.h> 33 #include <arch/types.h> 34 #include <ddi/irq.h> 35 #include <typedefs.h> 38 36 39 /* dont allow to define it second time in stdarg.h */ 40 #define __VARARGS_DEFINED 37 typedef struct { 38 uint32_t space; 39 uint32_t addr; 40 uint32_t size; 41 } __attribute__ ((packed)) ofw_ebus_reg_t; 41 42 42 #include <sys/types.h> 43 typedef struct { 44 uint32_t child_space; 45 uint32_t child_base; 46 uint32_t parent_space; 47 48 /* Group phys.mid and phys.lo together */ 49 uint64_t parent_base; 50 uint32_t size; 51 } __attribute__ ((packed)) ofw_ebus_range_t; 43 52 44 /** 45 * va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not) 46 * To satisfy this, paddings must be sometimes inserted. 47 */ 53 typedef struct { 54 uint32_t space; 55 uint32_t addr; 56 uint32_t intr; 57 uint32_t controller_handle; 58 uint32_t controller_ino; 59 } __attribute__ ((packed)) ofw_ebus_intr_map_t; 48 60 49 typedef uint8_t* va_list; 61 typedef struct { 62 uint32_t space_mask; 63 uint32_t addr_mask; 64 uint32_t intr_mask; 65 } __attribute__ ((packed)) ofw_ebus_intr_mask_t; 50 66 51 #define va_start(ap, lst) \ 52 ((ap) = (va_list)&(lst) + sizeof(lst)) 53 54 #define va_arg(ap, type) \ 55 (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uint32_t)((ap) + 2*4 - 1) & (~3)) : ((uint32_t)((ap) + 2*8 -1) & (~7)) )))[-1]) 56 57 #define va_end(ap) 67 extern bool ofw_ebus_apply_ranges(ofw_tree_node_t *, ofw_ebus_reg_t *, 68 uintptr_t *); 69 extern bool ofw_ebus_map_interrupt(ofw_tree_node_t *, ofw_ebus_reg_t *, 70 uint32_t, int *, cir_t *, void **); 58 71 59 72 #endif 60 61 /** @}62 */
Note:
See TracChangeset
for help on using the changeset viewer.