/* channel = IDMA channel number from 0 to 3 destAddr = Destination address sourceAddr = Source address size = Size in bytes command = See MV datasheet  */
int mvDmaTransfer(int, ulong, ulong, ulong, ulong)
/* channel = IDMA channel number from 0 to 3 destAddr = Destination address sourceAddr = Source address size = Size in bytes command = See MV datasheet  */
int mvDmaTransfer(int, ulong, ulong, ulong, ulong)
{
	ulong engOffReg = 0;
	if (size > 0xffff)
		command = command | BIT31;
	command = command | ((command >> 6) & 0x7);
	engOffReg = channel * 4;
	GT_REG_WRITE (MV64460_DMA_CHANNEL0_BYTE_COUNT + engOffReg, size);
	GT_REG_WRITE (MV64460_DMA_CHANNEL0_SOURCE_ADDR + engOffReg, sourceAddr);
	GT_REG_WRITE (MV64460_DMA_CHANNEL0_DESTINATION_ADDR + engOffReg, destAddr);
	command = command |
		BIT12	|
		BIT9;
	GT_REG_WRITE (MV64460_DMA_CHANNEL0_CONTROL + engOffReg, command);
	return 1;
}