{
struct cobalt *cobalt = s->cobalt;
- iowrite32((u32)(desc->bus >> 32), DESCRIPTOR(s->dma_channel) + 4);
+ iowrite32((u32)((u64)desc->bus >> 32), DESCRIPTOR(s->dma_channel) + 4);
iowrite32((u32)desc->bus & NEXT_ADRS_MSK, DESCRIPTOR(s->dma_channel));
iowrite32(ENABLE | SCATTER_GATHER_MODE | START, CS_REG(s->dma_channel));
}
offset += d->bytes;
addr += d->bytes;
next += sizeof(struct sg_dma_descriptor);
- d->next_h = (u32)(next >> 32);
+ d->next_h = (u32)((u64)next >> 32);
d->next_l = (u32)next |
(to_pci ? WRITE_TO_PCI : 0);
bytes -= d->bytes;
next += sizeof(struct sg_dma_descriptor);
if (size == 0) {
/* Loopback to the first descriptor */
- d->next_h = (u32)(desc->bus >> 32);
+ d->next_h = (u32)((u64)desc->bus >> 32);
d->next_l = (u32)desc->bus |
(to_pci ? WRITE_TO_PCI : 0) | INTERRUPT_ENABLE;
if (!to_pci)
d->local = 0x22222222;
desc->last_desc_virt = d;
} else {
- d->next_h = (u32)(next >> 32);
+ d->next_h = (u32)((u64)next >> 32);
d->next_l = (u32)next | (to_pci ? WRITE_TO_PCI : 0);
}
d++;
d->next_h = 0;
d->next_l = direction | INTERRUPT_ENABLE | END_OF_CHAIN;
} else {
- d->next_h = (u32)(next->bus >> 32);
+ d->next_h = (u32)((u64)next->bus >> 32);
d->next_l = (u32)next->bus | direction | INTERRUPT_ENABLE;
}
}
{
struct sg_dma_descriptor *d = desc->last_desc_virt;
- d->next_h = (u32)(desc->bus >> 32);
+ d->next_h = (u32)((u64)desc->bus >> 32);
d->next_l = (u32)desc->bus | (d->next_l & DESCRIPTOR_FLAG_MSK);
}