/drivers/audio/a5536/driver.lds |
---|
File deleted |
/drivers/audio/a5536/geode.c |
---|
2,13 → 2,20 |
#define FORCED_PIO |
#include <ddk.h> |
#include "types.h" |
#include "pci.h" |
#include <syscall.h> |
#include "syscall.h" |
#include "geode.h" |
#define DEBUG |
#ifdef DEBUG |
#define DBG(format,...) dbgprintf(format,##__VA_ARGS__) |
#else |
#define DBG(format,...) |
#endif |
#define BM0_IRQ 0x04 |
#define BM1_IRQ 0x08 |
463,7 → 470,7 |
}; |
u32_t drvEntry(int action, char *cmdline) |
u32_t __stdcall drvEntry(int action) |
{ |
u32_t retval; |
472,15 → 479,17 |
if(action != 1) |
return 0; |
#ifdef DEBUG |
if(!dbg_open("/rd/1/drivers/geode.log")) |
{ |
printf("Can't open /rd/1/drivers/geode.log\nExit\n"); |
return 0; |
} |
#endif |
if( FindPciDevice() == FALSE) |
{ |
dbgprintf("Device not found\n"); |
DBG("Device not found\n"); |
return 0; |
}; |
507,8 → 516,8 |
#define DEV_SET_MASTERVOL 6 |
#define DEV_GET_MASTERVOL 7 |
#define DEV_GET_INFO 8 |
#define DEV_GET_POS 9 |
int __stdcall srv_sound(ioctl_t *io) |
{ |
u32_t *inp; |
542,14 → 551,6 |
} |
break; |
case DEV_GET_POS: |
if(io->out_size==4) |
{ |
*outp = ctrl_read_32(0x60)>>2; |
return 0; |
} |
break; |
default: |
return ERR_PARAM; |
}; |
/drivers/audio/a5536/makefile |
---|
2,24 → 2,15 |
CC = gcc |
FASM = e:/fasm/fasm.exe |
CFLAGS = -c -O2 -fomit-frame-pointer -fno-builtin-printf |
LDFLAGS = -nostdlib -shared -s -Map usb.map --image-base 0\ |
--file-alignment 512 --section-alignment 4096 |
LDRHD = -shared -T ld.x -s --file-alignment 32 |
DEFINES = -D__KERNEL__ -DCONFIG_X86_32 |
INCLUDES = -I ../../include |
DRV_TOPDIR = $(CURDIR)/../.. |
HFILES:= ../../include/types.h \ |
../../include/syscall.h \ |
../../include/pci.h \ |
geode.h |
DRV_INCLUDES = $(DRV_TOPDIR)/include |
INCLUDES = -I$(DRV_INCLUDES) \ |
-I$(DRV_INCLUDES)/linux |
LIBPATH = $(DRV_TOPDIR)/ddk |
LIBS:= -lddk -lcore |
HFILES:= geode.h |
SRC_DEP:= |
GEODE_SRC:= amd_geode.h |
29,11 → 20,11 |
all: $(GEODE) |
$(GEODE): geode.obj $(SRC_DEP) $(HFILES) Makefile |
ld $(LDFLAGS) -L$(LIBPATH) -T driver.lds -o $@ geode.obj $(LIBS) |
wlink name $(GEODE) SYS nt_dll lib libdrv op offset=0 op nod op maxe=25 op el op STUB=stub.exe op START=_drvEntry @$(NAME).lk |
kpack.exe geode.dll geode.drv |
geode.obj : geode.c $(SRC_DEP) $(HFILES) Makefile |
$(CC) $(DEFINES) $(INCLUDES) $(CFLAGS) -o geode.obj geode.c |
$(CC) $(INCLUDES) $(CFLAGS) -o geode.obj geode.c |
/drivers/audio/a5536/pci.h |
---|
1,9 → 1,5 |
typedef int Bool; |
#define TRUE 1 |
#define FALSE 0 |
#pragma pack(push, 1) |
typedef struct |
{ |