ep->registers + fpga_dma_bufaddr_lowaddr_reg);
iowrite32(((u32) ((((u64) dma_addr) >> 32) & 0xffffffff)),
ep->registers + fpga_dma_bufaddr_highaddr_reg);
- mmiowb();
if (buffers) { /* Not the message buffer */
this_buffer->addr = s->salami;
| (bufidx << 12),
channel->endpoint->registers +
fpga_buf_ctrl_reg);
- mmiowb(); /* Just to appear safe */
}
if (rc) {
iowrite32(offsetlimit,
channel->endpoint->registers +
fpga_buf_offset_reg);
- mmiowb();
iowrite32(1 | (channel->chan_num << 1) |
(2 << 24) | /* 2 = offset limit */
(waiting_bufidx << 12),
channel->endpoint->registers +
fpga_buf_ctrl_reg);
- mmiowb(); /* Just to appear safe */
}
/*
iowrite32(end_offset_plus1 - 1,
channel->endpoint->registers + fpga_buf_offset_reg);
- mmiowb();
iowrite32((channel->chan_num << 1) | /* Channel ID */
(2 << 24) | /* Opcode 2, submit buffer */
iowrite32(end_offset_plus1 - 1,
channel->endpoint->registers +
fpga_buf_offset_reg);
- mmiowb();
+
iowrite32((channel->chan_num << 1) |
(2 << 24) | /* 2 = submit buffer */
(bufidx << 12),
((channel->wr_synchronous & 1) << 23),
channel->endpoint->registers +
fpga_buf_ctrl_reg);
- mmiowb(); /* Just to appear safe */
}
channel->wr_ref_count++;
(4 << 24), /* Opcode 4, open channel */
channel->endpoint->registers +
fpga_buf_ctrl_reg);
- mmiowb(); /* Just to appear safe */
}
channel->rd_ref_count++;
(5 << 24), /* Opcode 5, close channel */
channel->endpoint->registers +
fpga_buf_ctrl_reg);
- mmiowb(); /* Just to appear safe */
}
mutex_unlock(&channel->rd_mutex);
}
(5 << 24), /* Opcode 5, close channel */
channel->endpoint->registers +
fpga_buf_ctrl_reg);
- mmiowb(); /* Just to appear safe */
/*
* This is crazily cautious: We make sure that not
iowrite32(pos >> channel->log2_element_size,
channel->endpoint->registers + fpga_buf_offset_reg);
- mmiowb();
+
iowrite32((channel->chan_num << 1) |
(6 << 24), /* Opcode 6, set address */
channel->endpoint->registers + fpga_buf_ctrl_reg);
- mmiowb(); /* Just to appear safe */
mutex_unlock(&channel->endpoint->register_mutex);
*/
iowrite32(1, endpoint->registers + fpga_endian_reg);
- mmiowb(); /* Writes below are affected by the one above. */
/* Bootstrap phase I: Allocate temporary message buffer */
/* Clear the message subsystem (and counter in particular) */
iowrite32(0x04, endpoint->registers + fpga_msg_ctrl_reg);
- mmiowb();
endpoint->idtlen = -1;
/* Enable DMA */
iowrite32((u32) (0x0002 | (endpoint->dma_using_dac & 0x0001)),
endpoint->registers + fpga_dma_control_reg);
- mmiowb();
/* Bootstrap phase II: Allocate buffer for IDT and obtain it */
while (endpoint->idtlen >= idtbuffersize) {