Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 33 → Rev 34

/shark/trunk/drivers/net/eth.c
20,11 → 20,11
 
/**
------------
CVS : $Id: eth.c,v 1.2 2002-10-28 08:01:36 pj Exp $
CVS : $Id: eth.c,v 1.3 2002-11-11 08:41:31 pj Exp $
 
File: $File$
Revision: $Revision: 1.2 $
Last update: $Date: 2002-10-28 08:01:36 $
Revision: $Revision: 1.3 $
Last update: $Date: 2002-11-11 08:41:31 $
------------
**/
 
133,7 → 133,7
 
void dev_tint(struct device *dev)
{
printk(KERN_WARNING "Warning!!!! dev_tint called!!! (Why???)\n");
printk(KERN_WARNING "Warning!!!! dev_tint called!!! (Why?)\n");
sys_abort(201);
}
393,7 → 393,7
soft_task_def_aperiodic(m_soft);
soft_task_def_system(m_soft);
soft_task_def_nokill(m_soft);
m = &m_soft;
m = (TASK_MODEL *)&m_soft;
}
 
nettask_pid = task_create("rxProc", net_extern_driver, m, NULL);
/shark/trunk/drivers/char/sermouse.c
20,11 → 20,11
 
/**
------------
CVS : $Id: sermouse.c,v 1.1.1.1 2002-03-29 14:12:49 pj Exp $
CVS : $Id: sermouse.c,v 1.2 2002-11-11 08:41:31 pj Exp $
 
File: $File$
Revision: $Revision: 1.1.1.1 $
Last update: $Date: 2002-03-29 14:12:49 $
Revision: $Revision: 1.2 $
Last update: $Date: 2002-11-11 08:41:31 $
------------
 
Author: Gerardo Lamastra
84,6 → 84,7
//#include <cons.h>
 
#include <kernel/kern.h>
#include <time.h>
//#include "sys/sys.h"
//#include "vm.h"
//#include "kern.h"
405,15 → 406,19
int port;
int ret;
int found;
struct timespec delay;
 
delay.tv_sec = 0;
delay.tv_nsec = 500000000;
 
found=0;
for (port=COM1;port<=COM4;port++) {
ret=com_open(port,1200,NONE,7,1);
if (ret==1) {
com_write(port,MCR,0x0e);
task_delay(500000l); /* necessary? */
nanosleep(&delay,NULL); /* necessary? */
com_write(port,MCR,0x0f);
task_delay(500000l); /* necessary? */
nanosleep(&delay,NULL); /* necessary? */
ret=sem_wait(&com_link[mouse_port].rx_sem);
if (ret==TRUE) {
if (*(com_link[mouse_port].rx_buf)=='M') found=1;
/shark/trunk/drivers/char/rtc.c
20,11 → 20,11
 
/**
------------
CVS : $Id: rtc.c,v 1.1.1.1 2002-03-29 14:12:49 pj Exp $
CVS : $Id: rtc.c,v 1.2 2002-11-11 08:41:31 pj Exp $
 
File: $File$
Revision: $Revision: 1.1.1.1 $
Last update: $Date: 2002-03-29 14:12:49 $
Revision: $Revision: 1.2 $
Last update: $Date: 2002-11-11 08:41:31 $
------------
 
Author: Massimiliano Giorgi
183,7 → 183,7
SYS_FLAGS flags;
unsigned char ctrl;
unsigned retries=0;
unsigned delay;
struct timespec delay;
 
/*
* read RTC once any update in progress is done. The update
201,8 → 201,9
barrier();
*/
 
delay=1000;
while (rtc_is_updating()&&++retries<=5) task_delay(delay);
delay.tv_nsec = 1000000;
delay.tv_sec = 0;
while (rtc_is_updating()&&++retries<=5) nanosleep(&delay, NULL);
if (retries>5) return -1;
 
/*
/shark/trunk/drivers/char/8042.c
20,11 → 20,11
 
/**
------------
CVS : $Id: 8042.c,v 1.1.1.1 2002-03-29 14:12:49 pj Exp $
CVS : $Id: 8042.c,v 1.2 2002-11-11 08:41:31 pj Exp $
 
File: $File$
Revision: $Revision: 1.1.1.1 $
Last update: $Date: 2002-03-29 14:12:49 $
Revision: $Revision: 1.2 $
Last update: $Date: 2002-11-11 08:41:31 $
------------
 
8042.h
348,7 → 348,7
static int C8042_reset(void)
{
int c;
int c=0;
int retries=16;
 
trace("8042 reset START");
/shark/trunk/drivers/linuxcom/include/linux/netdevice.h
8,12 → 8,21
 
#include <linux/skbuff.h>
#include <linux/notifier.h>
#include <time.h>
 
// for 3c59x.c (!!!)
#define le32_to_cpu(val) (val)
#define cpu_to_le32(val) (val)
#define test_and_set_bit(val, addr) set_bit(val, addr)
#define mdelay(x) task_delay((x)*1000)
 
static __inline__ void mdelay(int x)
{
struct timespec delay;
delay.tv_sec=x/1000;
delay.tv_nsec=(x%1000)*1000000;
nanosleep(&delay, NULL);
}
 
#define kfree(x) { }
#define ioremap(a,b) \
(((a)<0x100000) ? (void *)((u_long)(a)) : vremap(a,b))
/shark/trunk/drivers/linuxcom/auto_irq.c
1,5 → 1,6
#include<asm/bitops.h>
#include<kernel/kern.h>
#include <time.h>
 
struct device *irq2dev_map[16] = {0, 0, /* ... zeroed */};
 
17,6 → 18,7
int autoirq_setup(int waittime)
{
int i;
struct timespec delay;
 
handled = 0;
 
27,7 → 29,9
}
 
/* Hang out at least <waittime> jiffies waiting for bogus IRQ hits. */
task_delay(waittime);
delay.tv_sec = waittime/1000000;
delay.tv_nsec = (waittime%1000000)*1000;
nanosleep(&delay, NULL);
 
return handled;
}
34,10 → 38,13
 
int autoirq_report(int waittime)
{
struct timespec delay;
int i;
 
/* Hang out at least <waittime> jiffies waiting for the IRQ. */
task_delay(waittime);
delay.tv_sec=waittime/1000000;
delay.tv_nsec=(waittime%1000000)*1000;
nanosleep(&delay, NULL);
 
/* Retract the irq handlers that we installed. */
for (i = 0; i < 16; i++) {