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