- UID
- 1029342
- 性别
- 男
|
/* Clear the 'DMA Pointer Flip Flop'.
* Write 0 for LSB/MSB, 1 for MSB/LSB access.
* Use this once to initialize the FF to a known state.
* After that, keep track of it. :-)
* --- In order to do that, the DMA routines below should ---
* --- only be used while holding the DMA lock ! ---
*/
static inline void clear_dma_ff(unsigned int dmanr)
{
if (dmanr <= 3)
dma_outb(0, DMA1_CLEAR_FF_REG);
else
dma_outb(0, DMA2_CLEAR_FF_REG);
}
该函数清除DMA触发器(Filp flop),该触发器用来控制对16位寄存器的访问
可以通过两个连续的8位操作来访问这些寄存器,触发器被清除时用来选择低字节,
触发器被置位时用来选择高字节。在传输8位后,触发器会自动反转。
所以在访问DMA寄存器之前,必须清楚触发器--人为的将他设为某个已知的状态。
-----------------------------------------------------------
相应的函数的定义我们可以在相应体系的kernel/dma.c找到
|
|