Rev 1908 | Rev 1910 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1908 | Rev 1909 | ||
---|---|---|---|
Line 47... | Line 47... | ||
47 | 47 | ||
48 | char *da_name; /**< Disambigued name. */ |
48 | char *da_name; /**< Disambigued name. */ |
49 | 49 | ||
50 | unsigned properties; /**< Number of properties. */ |
50 | unsigned properties; /**< Number of properties. */ |
51 | ofw_tree_property_t *property; |
51 | ofw_tree_property_t *property; |
- | 52 | ||
- | 53 | /** |
|
- | 54 | * Pointer to a structure representing respective device. |
|
- | 55 | * Its semantics is device dependent. |
|
- | 56 | */ |
|
- | 57 | void *device; |
|
52 | }; |
58 | }; |
53 | 59 | ||
54 | /** Memory representation of OpenFirmware device tree node property. */ |
60 | /** Memory representation of OpenFirmware device tree node property. */ |
55 | struct ofw_tree_property { |
61 | struct ofw_tree_property { |
56 | char name[OFW_TREE_PROPERTY_MAX_NAMELEN]; |
62 | char name[OFW_TREE_PROPERTY_MAX_NAMELEN]; |
Line 102... | Line 108... | ||
102 | uint64_t parent_base; /* group phys.mid and phys.lo together */ |
108 | uint64_t parent_base; /* group phys.mid and phys.lo together */ |
103 | uint32_t size; |
109 | uint32_t size; |
104 | } __attribute__ ((packed)); |
110 | } __attribute__ ((packed)); |
105 | typedef struct ofw_ebus_range ofw_ebus_range_t; |
111 | typedef struct ofw_ebus_range ofw_ebus_range_t; |
106 | 112 | ||
- | 113 | struct ofw_ebus_intr_map { |
|
- | 114 | uint32_t space; |
|
- | 115 | uint32_t addr; |
|
- | 116 | uint32_t intr; |
|
- | 117 | uint32_t controller_handle; |
|
- | 118 | uint32_t controller_ino; |
|
- | 119 | } __attribute__ ((packed)); |
|
- | 120 | typedef struct ofw_ebus_intr_map ofw_ebus_intr_map_t; |
|
- | 121 | ||
- | 122 | struct ofw_ebus_intr_mask { |
|
- | 123 | uint32_t space_mask; |
|
- | 124 | uint32_t addr_mask; |
|
- | 125 | uint32_t intr_mask; |
|
- | 126 | } __attribute__ ((packed)); |
|
- | 127 | typedef struct ofw_ebus_intr_mask ofw_ebus_intr_mask_t; |
|
- | 128 | ||
107 | struct ofw_pci_reg { |
129 | struct ofw_pci_reg { |
108 | uint32_t space; /* needs to masked to obtain pure space id */ |
130 | uint32_t space; /* needs to be masked to obtain pure space id */ |
109 | uint64_t addr; /* group phys.mid and phys.lo together */ |
131 | uint64_t addr; /* group phys.mid and phys.lo together */ |
110 | uint64_t size; |
132 | uint64_t size; |
111 | } __attribute__ ((packed)); |
133 | } __attribute__ ((packed)); |
112 | typedef struct ofw_pci_reg ofw_pci_reg_t; |
134 | typedef struct ofw_pci_reg ofw_pci_reg_t; |
113 | 135 | ||
Line 141... | Line 163... | ||
141 | extern bool ofw_pci_apply_ranges(ofw_tree_node_t *node, ofw_pci_reg_t *reg, uintptr_t *pa); |
163 | extern bool ofw_pci_apply_ranges(ofw_tree_node_t *node, ofw_pci_reg_t *reg, uintptr_t *pa); |
142 | extern bool ofw_upa_apply_ranges(ofw_tree_node_t *node, ofw_upa_reg_t *reg, uintptr_t *pa); |
164 | extern bool ofw_upa_apply_ranges(ofw_tree_node_t *node, ofw_upa_reg_t *reg, uintptr_t *pa); |
143 | 165 | ||
144 | extern bool ofw_pci_reg_absolutize(ofw_tree_node_t *node, ofw_pci_reg_t *reg, ofw_pci_reg_t *out); |
166 | extern bool ofw_pci_reg_absolutize(ofw_tree_node_t *node, ofw_pci_reg_t *reg, ofw_pci_reg_t *out); |
145 | 167 | ||
- | 168 | extern bool ofw_fhc_map_interrupts(ofw_tree_node_t *node, ofw_fhc_reg_t *reg, uint32_t interrupt, int *ino); |
|
- | 169 | extern bool ofw_ebus_map_interrupts(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uint32_t interrupt, int *ino); |
|
- | 170 | ||
146 | #endif |
171 | #endif |