Implement AcpiOsStall, AcpiOsSleep, AcpiOsGetTimer
- change AcpiOsRemoveInterruptHandler() to print a warning instead of panic. - we do the same in AcpiOsInstallInterruptHandler(). Signed-off-by: Tomas Hruby <thruby@few.vu.nl>
This commit is contained in:
		
							parent
							
								
									4668b84158
								
							
						
					
					
						commit
						2fe79d0b76
					
				| @ -139,7 +139,7 @@ ACPICA_SRCS= \ | |||||||
| SRCS+=${ACPICA_SRCS}  | SRCS+=${ACPICA_SRCS}  | ||||||
| 
 | 
 | ||||||
| DPADD+=	${LIBSYS} | DPADD+=	${LIBSYS} | ||||||
| LDADD+=	-lsys | LDADD+=	-lsys -lc | ||||||
| 
 | 
 | ||||||
| CPPFLAGS += -I${.CURDIR}/include | CPPFLAGS += -I${.CURDIR}/include | ||||||
| CFLAGS += -DACPI_LIBRARY | CFLAGS += -DACPI_LIBRARY | ||||||
|  | |||||||
| @ -109,6 +109,8 @@ | |||||||
| 
 | 
 | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|  | #include <unistd.h> | ||||||
|  | #include <sys/time.h> | ||||||
| 
 | 
 | ||||||
| #include "acpi.h" | #include "acpi.h" | ||||||
| #include "accommon.h" | #include "accommon.h" | ||||||
| @ -644,7 +646,7 @@ AcpiOsRemoveInterruptHandler ( | |||||||
|     UINT32                  InterruptNumber, |     UINT32                  InterruptNumber, | ||||||
|     ACPI_OSD_HANDLER        ServiceRoutine) |     ACPI_OSD_HANDLER        ServiceRoutine) | ||||||
| { | { | ||||||
| 	panic("NOTIMPLEMENTED %s\n", __func__); | 	printf("AcpiOsRemoveInterruptHandler NOT SUPPORTED\n"); | ||||||
| 	return AE_OK; | 	return AE_OK; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -711,7 +713,9 @@ void | |||||||
| AcpiOsStall ( | AcpiOsStall ( | ||||||
|     UINT32                  microseconds) |     UINT32                  microseconds) | ||||||
| { | { | ||||||
| 	panic("NOTIMPLEMENTED %s\n", __func__); | 	if (microseconds > 0) | ||||||
|  | 		usleep (microseconds); | ||||||
|  | 
 | ||||||
| 	return; | 	return; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -732,7 +736,12 @@ void | |||||||
| AcpiOsSleep ( | AcpiOsSleep ( | ||||||
|     ACPI_INTEGER            milliseconds) |     ACPI_INTEGER            milliseconds) | ||||||
| { | { | ||||||
| 	panic("NOTIMPLEMENTED %s\n", __func__); | 	if ((milliseconds / 1000) > 0) | ||||||
|  | 		sleep (milliseconds / 1000); | ||||||
|  | 
 | ||||||
|  | 	if ((milliseconds % 1000) > 0) | ||||||
|  | 		usleep ((milliseconds % 1000) * 1000); | ||||||
|  | 
 | ||||||
| 	return; | 	return; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -751,8 +760,11 @@ AcpiOsSleep ( | |||||||
| UINT64 | UINT64 | ||||||
| AcpiOsGetTimer (void) | AcpiOsGetTimer (void) | ||||||
| { | { | ||||||
| 	panic("NOTIMPLEMENTED %s\n", __func__); | 	struct timeval	time; | ||||||
| 	return 0; | 
 | ||||||
|  | 	gettimeofday (&time, NULL); | ||||||
|  | 	return (((UINT64) time.tv_sec * 10000000) + | ||||||
|  | 		((UINT64) time.tv_usec * 10)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jan Wieck
						Jan Wieck