Skip to content

Commit

Permalink
Merge pull request #11 from mtaurign/master
Browse files Browse the repository at this point in the history
Ajout de la fonction schedule pour augmenter les perfs
  • Loading branch information
robbep committed Mar 4, 2015
2 parents ce5f722 + e3750e8 commit 9f0e3d9
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions Driver/src/AltSpecsV2.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,17 +798,6 @@ static int specs_dev_ioctl(struct inode *inode, struct file *file,
{
master=MasterList[pBusIop.MasterID];
pBuf32=(u32*)pBusIop.Buffer;
// permet d'attendre ici un si au lieu de repasser au niveau user
for (i=0; i<10 ;i++){
level1=ioread32 (&master->fifoRecIn_Status->fill_level);
udelay(1);
level2=ioread32 (&master->fifoRecIn_Status->fill_level);
if (level1 == level2 )
{
pBuf32[0]=level1;
break;
}
}
pBuf32[0]= ioread32 (&master->fifoRecIn_Status->fill_level);
#ifdef DEBUG_SPECS
printk(KERN_INFO DRV_NAME "FIFO Recep read level =%d event %x Fifo Addr %x\n",ioread32 (&master->fifoRecIn_Status->fill_level),ioread32 (&master->fifoRecIn_Status->event), (pBusIop.Address + OFFSET_FIFO_REC_IN_STATUS));
Expand Down Expand Up @@ -893,6 +882,8 @@ static int specs_dev_ioctl(struct inode *inode, struct file *file,
rc=1;
break;
}
schedule();
rc = 2;
}

if ( i== 10000){
Expand Down Expand Up @@ -1097,8 +1088,9 @@ static int specs_dev_ioctl(struct inode *inode, struct file *file,

do {
iowrite32(0x0000, pReset);
#ifdef DEBUG_SPECS
printk(KERN_INFO DRV_NAME " Reset FIFO emssion %lu \n",ioctl_param);

#endif
}while (ioread32 (pReset) != 0 );

udelay(5);
Expand Down

0 comments on commit 9f0e3d9

Please sign in to comment.