if (host->dma_64bit_address == 1) {
struct idmac_desc_64addr *p;
- /* Number of descriptors in the ring buffer */
- host->ring_size =
+
+ host->desc_num =
DESC_RING_BUF_SZ / sizeof(struct idmac_desc_64addr);
/* Forward link the descriptor list */
- for (i = 0, p = host->sg_cpu; i < host->ring_size - 1;
+ for (i = 0, p = host->sg_cpu; i < host->desc_num - 1;
i++, p++) {
p->des6 = (host->sg_dma +
(sizeof(struct idmac_desc_64addr) *
} else {
struct idmac_desc *p;
- /* Number of descriptors in the ring buffer */
- host->ring_size =
+
+ host->desc_num =
DESC_RING_BUF_SZ / sizeof(struct idmac_desc);
/* Forward link the descriptor list */
for (i = 0, p = host->sg_cpu;
- i < host->ring_size - 1;
+ i < host->desc_num - 1;
i++, p++) {
p->des3 = cpu_to_le32(host->sg_dma +
(sizeof(struct idmac_desc) * (i + 1)));
/* Useful defaults if platform data is unset. */
if (host->use_dma == TRANS_MODE_IDMAC) {
- mmc->max_segs = host->ring_size;
+ mmc->max_segs = host->desc_num;
mmc->max_blk_size = 65535;
mmc->max_seg_size = 0x1000;
- mmc->max_req_size = mmc->max_seg_size * host->ring_size;
+ mmc->max_req_size = mmc->max_seg_size * host->desc_num;
mmc->max_blk_count = mmc->max_req_size / 512;
} else if (host->use_dma == TRANS_MODE_EDMAC) {
mmc->max_segs = 64;
* @dma_ops: Pointer to DMA callbacks.
* @cmd_status: Snapshot of SR taken upon completion of the current
* command. Only valid when EVENT_CMD_COMPLETE is pending.
- * @ring_size: Buffer size for idma descriptors.
+ * @desc_num: Number of idmac descriptors available.
* @dms: structure of slave-dma private data.
* @phy_regs: physical address of controller's register map
* @data_status: Snapshot of SR taken upon completion of the current
void *sg_cpu;
const struct dw_mci_dma_ops *dma_ops;
/* For idmac */
- unsigned int ring_size;
+ unsigned short desc_num;
/* For edmac */
struct dw_mci_dma_slave *dms;