fix to allow usb modules to compile
[linux-2.4.21-pre4.git] / arch / ppc / mm / mem_pieces.h
1 /*
2  * BK Id: SCCS/s.mem_pieces.h 1.7 06/05/01 21:22:06 paulus
3  */
4 /*
5  *    Copyright (c) 1996 Paul Mackerras <paulus@cs.anu.edu.au>
6  *      Changes to accomodate Power Macintoshes.
7  *    Cort Dougan <cort@cs.nmt.edu>
8  *      Rewrites.
9  *    Grant Erickson <grant@lcse.umn.edu>
10  *      General rework and split from mm/init.c.
11  *
12  *    Module name: mem_pieces.h
13  *
14  *    Description:
15  *      Routines and data structures for manipulating and representing
16  *      phyiscal memory extents (i.e. address/length pairs).
17  *
18  */
19
20 #ifndef __MEM_PIECES_H__
21 #define __MEM_PIECES_H__
22
23 #include <asm/prom.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29
30 /* Type Definitions */
31
32 #define MEM_PIECES_MAX  32
33
34 struct mem_pieces {
35     int n_regions;
36     struct reg_property regions[MEM_PIECES_MAX];
37 };
38
39 /* Function Prototypes */
40
41 extern void     *mem_pieces_find(unsigned int size, unsigned int align);
42 extern void      mem_pieces_remove(struct mem_pieces *mp, unsigned int start,
43                                    unsigned int size, int must_exist);
44 extern void      mem_pieces_append(struct mem_pieces *mp, unsigned int start,
45                                    unsigned int size);
46 extern void      mem_pieces_coalesce(struct mem_pieces *mp);
47 extern void      mem_pieces_sort(struct mem_pieces *mp);
48
49 #ifdef __cplusplus
50 }
51 #endif
52
53 #endif /* __MEM_PIECES_H__ */