Rev 432 |
Rev 437 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#include <ll/i386/hw-instr.h>
#include <ll/i386/cons.h>
#include <linuxcomp.h>
#include <linux/time.h>
#include <linux/sched.h>
#include <linux/ioport.h>
#include <asm/io.h>
int nanosleep
(const struct timespec
*rqtp
, struct timespec
*rmtp
);
struct resource ioport_resource
= {
.
name = "PCI IO",
.
start = 0x0000,
.
end = IO_SPACE_LIMIT
,
.
flags = IORESOURCE_IO
,
};
struct resource iomem_resource
= {
.
name = "PCI mem",
.
start = 0UL
,
.
end = ~0UL
,
.
flags = IORESOURCE_MEM
,
};
void __release_region
(struct resource
*parent
, unsigned long start
, unsigned long n
) { }
struct resource
* __request_region
(struct resource
*parent
, unsigned long start
, unsigned long n
, const char *name
) {
return NULL
;
}
void dump_stack
(void) { }
void panic
(const char * fmt
, ...
) {
cprintf
((char *)(fmt
));
}
extern void * malloc(size_t size
);
void *__kmalloc
(size_t size
, int flags
) {
return malloc(size
);
}
extern void free(void *);
void kfree
(const void *ptr
) {
free((void *)(ptr
));
return 0;
}
unsigned long pci_mem_start
= 0x10000000;
signed long schedule_timeout
(signed long timeout
) {
SYS_FLAGS f
;
struct timespec t
;
f
= ll_fsave
();
sti
();
jiffies_to_timespec
(timeout
, &t
);
nanosleep
(&t
,NULL
);
ll_frestore
(f
);
return 0;
}
void __const_udelay
(unsigned long usecs
) {
SYS_FLAGS f
;
struct timespec t
;
f
= ll_fsave
();
sti
();
t.
tv_sec = 0;
t.
tv_nsec = usecs
* 1000;
nanosleep
(&t
,NULL
);
ll_frestore
(f
);
}