initial import
[ICEs.git] / 153708 / ice.i.3
CommitLineData
45516216 1inline
2void
3__iop13xx_ioremap(
4unsigned long cookie, unsigned int size, unsigned long flags
5) {
6unsigned int iop13xx_atux_mem_base;
7 switch (cookie) {
8 case 0x80000000UL ... (0x80000000UL + 0x3a000000UL - 1):
9if (iop13xx_atux_mem_base)
10 break;
11 default:
12ior(
13);
14 }
15 };
16 struct imu_dev {
17int cdev;
18 };
19struct imu_dev *imu;
20int imu_major ;
21 void init_callback(int queueid) {
22 }
23 void error_callback(int queueid) {
24 }
25int
26imu_dev_init(void) {
27 int err;
28int i;
29 char *queue_base;
30 for (
31i = 1;
32;
33 i++
34) {
35 if (addit(&imu[i].cdev, (((imu_major) << 20) | (i)), 1)) {
36 foo(i);
37 }
38__iop13xx_ioremap(((128*1024*1024) + (i * (16*64))), ((16*64)), 0);
39iop_queue_init(i, (void *)(128*1024*1024) + (i * (16*64)), queue_base, 64, 16, init_callback, error_callback);
40 }
41 }