diff options
| author | leo <leo@NetBSD.org> | 1996-03-27 10:07:45 +0000 |
|---|---|---|
| committer | leo <leo@NetBSD.org> | 1996-03-27 10:07:45 +0000 |
| commit | c5a7f4e97776e6e1c5fa8436ddbb1df63cf00ac7 (patch) | |
| tree | d948fb3d33f58a7f9941980b64d747aec16fe75e /sys/arch/atari/dev/fd.c | |
| parent | 5cb9a24e7901090a23efb03ac06e3fb9d9296ba2 (diff) | |
Take out direct access to the YM2149. The chip definitions are moved
from video.h to ym2149reg.h.
Diffstat (limited to 'sys/arch/atari/dev/fd.c')
| -rw-r--r-- | sys/arch/atari/dev/fd.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/sys/arch/atari/dev/fd.c b/sys/arch/atari/dev/fd.c index 776cbe42430..32bba2f2e35 100644 --- a/sys/arch/atari/dev/fd.c +++ b/sys/arch/atari/dev/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.17 1996/03/20 12:41:48 leo Exp $ */ +/* $NetBSD: fd.c,v 1.18 1996/03/27 10:08:28 leo Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -67,6 +67,7 @@ #include <machine/mfp.h> #include <machine/dma.h> #include <machine/video.h> +#include <atari/dev/ym2149reg.h> #include <atari/dev/fdreg.h> /* @@ -287,8 +288,7 @@ void *auxp; */ fdselect(first_found, 0, FLP_DD); fd_state = FLP_MON; - timeout((FPV)fdmotoroff, (void*)getsoftc(fd_cd, first_found), - FLP_MONDELAY); + timeout((FPV)fdmotoroff, (void*)getsoftc(fd_cd,first_found), 0); /* * enable disk related interrupts @@ -719,7 +719,7 @@ static int fdselect(drive, head, dense) int drive, head, dense; { - int i, sps, spinning; + int i, spinning; #ifdef FLP_DEBUG printf("fdselect: drive=%d, head=%d, dense=%d\n", drive, head, dense); #endif @@ -738,12 +738,8 @@ int drive, head, dense; panic("fdselect: unknown density code\n"); } if(i != selected) { - sps = splhigh(); - selected = i; - SOUND->sd_selr = YM_IOA; - SOUND->sd_wdat = (SOUND->sd_rdat & 0x78) | (i ^ 0x07); - splx(sps); + ym2149_fd_select(i ^ PA_FDSEL); } return(spinning); } @@ -751,13 +747,7 @@ int drive, head, dense; static void fddeselect() { - int sps; - - sps = splhigh(); - SOUND->sd_selr = YM_IOA; - SOUND->sd_wdat = SOUND->sd_rdat | 0x07; - splx(sps); - + ym2149_fd_select(PA_FDSEL); motoron = selected = 0; DMA->dma_drvmode = 0; } |
