6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
#ifndef LINUX_NUBUS_H
#define LINUX_NUBUS_H
#include <asm/nubus.h>
#include <uapi/linux/nubus.h>
struct nubus_board {
struct nubus_board* next;
struct nubus_dev* first_dev;
int slot;
char name[64];
unsigned char* fblock;
unsigned char* directory;
unsigned long slot_addr;
unsigned long doffset;
unsigned long rom_length;
unsigned long crc;
unsigned char rev;
unsigned char format;
unsigned char lanes;
};
struct nubus_dev {
struct nubus_dev* next;
struct proc_dir_entry* procdir;
unsigned char resid;
unsigned short category;
unsigned short type;
unsigned short dr_sw;
unsigned short dr_hw;
char name[64];
unsigned char* driver;
unsigned long iobase;
unsigned long iosize;
unsigned char flags, hwdevid;
unsigned char* directory;
struct nubus_board* board;
};
extern struct nubus_dev* nubus_devices;
extern struct nubus_board* nubus_boards;
void nubus_scan_bus(void);
#ifdef CONFIG_PROC_FS
extern void nubus_proc_init(void);
#else
static inline void nubus_proc_init(void) {}
#endif
int get_nubus_list(char *buf);
int nubus_proc_attach_device(struct nubus_dev *dev);
struct nubus_dev* nubus_find_device(unsigned short category,
unsigned short type,
unsigned short dr_hw,
unsigned short dr_sw,
const struct nubus_dev* from);
struct nubus_dev* nubus_find_type(unsigned short category,
unsigned short type,
const struct nubus_dev* from);
struct nubus_dev* nubus_find_slot(unsigned int slot,
const struct nubus_dev* from);
int nubus_get_root_dir(const struct nubus_board* board,
struct nubus_dir* dir);
int nubus_get_board_dir(const struct nubus_board* board,
struct nubus_dir* dir);
int nubus_get_func_dir(const struct nubus_dev* dev,
struct nubus_dir* dir);
int nubus_readdir(struct nubus_dir* dir,
struct nubus_dirent* ent);
int nubus_find_rsrc(struct nubus_dir* dir,
unsigned char rsrc_type,
struct nubus_dirent* ent);
int nubus_rewinddir(struct nubus_dir* dir);
int nubus_get_subdir(const struct nubus_dirent* ent,
struct nubus_dir* dir);
void nubus_get_rsrc_mem(void* dest,
const struct nubus_dirent *dirent,
int len);
void nubus_get_rsrc_str(void* dest,
const struct nubus_dirent *dirent,
int maxlen);
#endif /* LINUX_NUBUS_H */
|