summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/dev/dbdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/macppc/dev/dbdma.c')
-rw-r--r--sys/arch/macppc/dev/dbdma.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/sys/arch/macppc/dev/dbdma.c b/sys/arch/macppc/dev/dbdma.c
index 2756fb9a48c..c0eb8562492 100644
--- a/sys/arch/macppc/dev/dbdma.c
+++ b/sys/arch/macppc/dev/dbdma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dbdma.c,v 1.4 2001/11/06 19:53:15 miod Exp $ */
+/* $OpenBSD: dbdma.c,v 1.5 2002/09/15 02:02:43 deraadt Exp $ */
/* $NetBSD: dbdma.c,v 1.2 1998/08/21 16:13:28 tsubai Exp $ */
/*
@@ -43,12 +43,9 @@ dbdma_start(dmap, dt)
DBDMA_ST4_ENDIAN(&dmap->d_intselect, DBDMA_CLEAR_CNTRL((0xffff)));
DBDMA_ST4_ENDIAN(&dmap->d_control, DBDMA_CLEAR_CNTRL((
- DBDMA_CNTRL_ACTIVE |
- DBDMA_CNTRL_DEAD |
- DBDMA_CNTRL_WAKE |
- DBDMA_CNTRL_FLUSH |
- DBDMA_CNTRL_PAUSE |
- DBDMA_CNTRL_RUN)));
+ DBDMA_CNTRL_ACTIVE | DBDMA_CNTRL_DEAD |
+ DBDMA_CNTRL_WAKE | DBDMA_CNTRL_FLUSH |
+ DBDMA_CNTRL_PAUSE | DBDMA_CNTRL_RUN)));
/* XXX time-bind it? */
do {
@@ -60,8 +57,8 @@ dbdma_start(dmap, dt)
DBDMA_ST4_ENDIAN(&dmap->d_cmdptrlo, addr);
DBDMA_ST4_ENDIAN(&dmap->d_control,
- DBDMA_SET_CNTRL(DBDMA_CNTRL_RUN|DBDMA_CNTRL_WAKE)|
- DBDMA_CLEAR_CNTRL(DBDMA_CNTRL_PAUSE|DBDMA_CNTRL_DEAD) );
+ DBDMA_SET_CNTRL(DBDMA_CNTRL_RUN|DBDMA_CNTRL_WAKE)|
+ DBDMA_CLEAR_CNTRL(DBDMA_CNTRL_PAUSE|DBDMA_CNTRL_DEAD) );
}
void
@@ -69,10 +66,11 @@ dbdma_stop(dmap)
dbdma_regmap_t *dmap;
{
DBDMA_ST4_ENDIAN(&dmap->d_control, DBDMA_CLEAR_CNTRL(DBDMA_CNTRL_RUN) |
- DBDMA_SET_CNTRL(DBDMA_CNTRL_FLUSH));
+ DBDMA_SET_CNTRL(DBDMA_CNTRL_FLUSH));
while (DBDMA_LD4_ENDIAN(&dmap->d_status) &
- (DBDMA_CNTRL_ACTIVE|DBDMA_CNTRL_FLUSH));
+ (DBDMA_CNTRL_ACTIVE|DBDMA_CNTRL_FLUSH))
+ ;
}
void
@@ -82,7 +80,8 @@ dbdma_flush(dmap)
DBDMA_ST4_ENDIAN(&dmap->d_control, DBDMA_SET_CNTRL(DBDMA_CNTRL_FLUSH));
/* XXX time-bind it? */
- while (DBDMA_LD4_ENDIAN(&dmap->d_status) & (DBDMA_CNTRL_FLUSH));
+ while (DBDMA_LD4_ENDIAN(&dmap->d_status) & (DBDMA_CNTRL_FLUSH))
+ ;
}
void
@@ -90,15 +89,14 @@ dbdma_reset(dmap)
dbdma_regmap_t *dmap;
{
DBDMA_ST4_ENDIAN(&dmap->d_control,
- DBDMA_CLEAR_CNTRL( (DBDMA_CNTRL_ACTIVE |
- DBDMA_CNTRL_DEAD |
- DBDMA_CNTRL_WAKE |
- DBDMA_CNTRL_FLUSH |
- DBDMA_CNTRL_PAUSE |
- DBDMA_CNTRL_RUN )));
+ DBDMA_CLEAR_CNTRL((DBDMA_CNTRL_ACTIVE |
+ DBDMA_CNTRL_DEAD | DBDMA_CNTRL_WAKE |
+ DBDMA_CNTRL_FLUSH | DBDMA_CNTRL_PAUSE |
+ DBDMA_CNTRL_RUN)));
/* XXX time-bind it? */
- while (DBDMA_LD4_ENDIAN(&dmap->d_status) & DBDMA_CNTRL_RUN);
+ while (DBDMA_LD4_ENDIAN(&dmap->d_status) & DBDMA_CNTRL_RUN)
+ ;
}
void
@@ -106,8 +104,8 @@ dbdma_continue(dmap)
dbdma_regmap_t *dmap;
{
DBDMA_ST4_ENDIAN(&dmap->d_control,
- DBDMA_SET_CNTRL(DBDMA_CNTRL_RUN | DBDMA_CNTRL_WAKE) |
- DBDMA_CLEAR_CNTRL(DBDMA_CNTRL_PAUSE | DBDMA_CNTRL_DEAD));
+ DBDMA_SET_CNTRL(DBDMA_CNTRL_RUN | DBDMA_CNTRL_WAKE) |
+ DBDMA_CLEAR_CNTRL(DBDMA_CNTRL_PAUSE | DBDMA_CNTRL_DEAD));
}
void
@@ -117,7 +115,8 @@ dbdma_pause(dmap)
DBDMA_ST4_ENDIAN(&dmap->d_control,DBDMA_SET_CNTRL(DBDMA_CNTRL_PAUSE));
/* XXX time-bind it? */
- while (DBDMA_LD4_ENDIAN(&dmap->d_status) & DBDMA_CNTRL_ACTIVE);
+ while (DBDMA_LD4_ENDIAN(&dmap->d_status) & DBDMA_CNTRL_ACTIVE)
+ ;
}
dbdma_t