--- zzzz-none-000/linux-2.4.17/include/asm-ppc/dbdma.h 2001-05-21 22:02:06.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/include/asm-ppc/dbdma.h 2004-11-24 13:21:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.dbdma.h 1.5 05/17/01 18:14:24 cort + * BK Id: SCCS/s.dbdma.h 1.10 12/03/01 10:00:01 trini */ /* * Definitions for using the Apple Descriptor-Based DMA controller @@ -93,5 +93,13 @@ /* Align an address for a DBDMA command structure */ #define DBDMA_ALIGN(x) (((unsigned)(x) + sizeof(struct dbdma_cmd) - 1) \ & -sizeof(struct dbdma_cmd)) + +/* Useful macros */ +#define DBDMA_DO_STOP(regs) do { \ + out_le32(&((regs)->control), (RUN|FLUSH)<<16); \ + while(in_le32(&((regs)->status)) & (ACTIVE|FLUSH)) \ + ; \ +} while(0) + #endif /* _ASM_DBDMA_H_ */ #endif /* __KERNEL__ */