Changeset 1787e527 in mainline for kernel/genarch/include/ofw/pci.h
- Timestamp:
- 2009-11-16T21:22:54Z (14 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/pci.h
rfcbd1be r1787e527 1 1 /* 2 * Copyright (c) 200 5Jakub Jermar2 * Copyright (c) 2006 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup mips32 30 * @{ 31 */ 32 /** @file 33 */ 29 #ifndef KERN_PCI_H_ 30 #define KERN_PCI_H_ 34 31 35 #ifndef KERN_mips32_ARG_H_ 36 #define KERN_mips32_ARG_H_ 32 #include <genarch/ofw/ofw_tree.h> 33 #include <arch/types.h> 34 #include <ddi/irq.h> 35 #include <typedefs.h> 37 36 38 #include <arch/types.h> 37 typedef struct { 38 /* Needs to be masked to obtain pure space id */ 39 uint32_t space; 40 41 /* Group phys.mid and phys.lo together */ 42 uint64_t addr; 43 uint64_t size; 44 } __attribute__ ((packed)) ofw_pci_reg_t; 39 45 40 /** 41 * va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not) 42 * To satisfy this, paddings must be sometimes inserted. 43 */ 46 typedef struct { 47 uint32_t space; 48 49 /* Group phys.mid and phys.lo together */ 50 uint64_t child_base; 51 uint64_t parent_base; 52 uint64_t size; 53 } __attribute__ ((packed)) ofw_pci_range_t; 44 54 45 typedef uintptr_t va_list; 55 extern bool ofw_pci_apply_ranges(ofw_tree_node_t *, ofw_pci_reg_t *, 56 uintptr_t *); 46 57 47 #define va_start(ap, lst) \ 48 ((ap) = (va_list)&(lst) + sizeof(lst)) 58 extern bool ofw_pci_reg_absolutize(ofw_tree_node_t *, ofw_pci_reg_t *, 59 ofw_pci_reg_t *); 49 60 50 #define va_arg(ap, type) \ 51 (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uintptr_t)((ap) + 2*4 - 1) & (~3)) : ((uintptr_t)((ap) + 2*8 -1) & (~7)) )))[-1]) 52 53 #define va_copy(dst,src) ((dst)=(src)) 54 55 #define va_end(ap) 61 extern bool ofw_pci_map_interrupt(ofw_tree_node_t *, ofw_pci_reg_t *, 62 int, int *, cir_t *, void **); 56 63 57 64 #endif 58 59 /** @}60 */
Note:
See TracChangeset
for help on using the changeset viewer.