|
@@ -149,28 +149,24 @@
|
149
|
149
|
} while ( 0 )
|
150
|
150
|
|
151
|
151
|
/**
|
152
|
|
- * Map bus address as an I/O address
|
|
152
|
+ * Convert virtual address to a physical address
|
153
|
153
|
*
|
154
|
|
- * @v bus_addr Bus address
|
155
|
|
- * @v len Length of region
|
156
|
|
- * @ret io_addr I/O address
|
|
154
|
+ * @v addr Virtual address
|
|
155
|
+ * @ret phys_addr Physical address
|
157
|
156
|
*/
|
158
|
|
-void * ioremap ( unsigned long bus_addr, size_t len );
|
|
157
|
+unsigned long virt_to_phys ( volatile const void *addr );
|
159
|
158
|
|
160
|
159
|
/**
|
161
|
|
- * Unmap I/O address
|
|
160
|
+ * Convert physical address to a virtual address
|
162
|
161
|
*
|
163
|
|
- * @v io_addr I/O address
|
164
|
|
- */
|
165
|
|
-void iounmap ( volatile const void *io_addr );
|
166
|
|
-
|
167
|
|
-/**
|
168
|
|
- * Convert I/O address to bus address (for debug only)
|
|
162
|
+ * @v addr Virtual address
|
|
163
|
+ * @ret phys_addr Physical address
|
169
|
164
|
*
|
170
|
|
- * @v io_addr I/O address
|
171
|
|
- * @ret bus_addr Bus address
|
|
165
|
+ * This operation isn't actually valid within our memory model, and is
|
|
166
|
+ * impossible to achieve under -DKEEP_IT_REAL. Some drivers haven't
|
|
167
|
+ * been updated to avoid it yet, though.
|
172
|
168
|
*/
|
173
|
|
-unsigned long io_to_bus ( volatile const void *io_addr );
|
|
169
|
+void * phys_to_virt ( unsigned long phys_addr );
|
174
|
170
|
|
175
|
171
|
/**
|
176
|
172
|
* Convert virtual address to a bus address
|
|
@@ -192,6 +188,30 @@ unsigned long virt_to_bus ( volatile const void *addr );
|
192
|
188
|
*/
|
193
|
189
|
void * bus_to_virt ( unsigned long bus_addr );
|
194
|
190
|
|
|
191
|
+/**
|
|
192
|
+ * Map bus address as an I/O address
|
|
193
|
+ *
|
|
194
|
+ * @v bus_addr Bus address
|
|
195
|
+ * @v len Length of region
|
|
196
|
+ * @ret io_addr I/O address
|
|
197
|
+ */
|
|
198
|
+void * ioremap ( unsigned long bus_addr, size_t len );
|
|
199
|
+
|
|
200
|
+/**
|
|
201
|
+ * Unmap I/O address
|
|
202
|
+ *
|
|
203
|
+ * @v io_addr I/O address
|
|
204
|
+ */
|
|
205
|
+void iounmap ( volatile const void *io_addr );
|
|
206
|
+
|
|
207
|
+/**
|
|
208
|
+ * Convert I/O address to bus address (for debug only)
|
|
209
|
+ *
|
|
210
|
+ * @v io_addr I/O address
|
|
211
|
+ * @ret bus_addr Bus address
|
|
212
|
+ */
|
|
213
|
+unsigned long io_to_bus ( volatile const void *io_addr );
|
|
214
|
+
|
195
|
215
|
/**
|
196
|
216
|
* Read byte from memory-mapped device
|
197
|
217
|
*
|