silicon_image_3112: Remove bad casts for ram_address()

We now accept and return a phys_addr_t as we ought to.
This commit is contained in:
François Revol 2017-11-21 21:35:02 +01:00
parent aef94baf32
commit 4dde854c8a

View File

@ -685,8 +685,8 @@ dma_prepare(void *channelCookie, const physical_entry *sg_list,
for (i = sg_list_count - 1, prd = channel->prdt; i >= 0;
--i, ++prd, ++sg_list ) {
prd->address = B_HOST_TO_LENDIAN_INT32((uint32)(addr_t)pci->ram_address(device,
(void*)(addr_t)sg_list->address));
prd->address = B_HOST_TO_LENDIAN_INT32((uint32)pci->ram_address(device,
sg_list->address));
// 0 means 64K - this is done automatically by discarding upper 16 bits
prd->count = B_HOST_TO_LENDIAN_INT16((uint16)sg_list->size);
@ -697,8 +697,8 @@ dma_prepare(void *channelCookie, const physical_entry *sg_list,
// XXX move this to chan init?
temp = (*channel->bm_prdt_address) & 3;
temp |= B_HOST_TO_LENDIAN_INT32((uint32)(addr_t)pci->ram_address(device,
(void *)(addr_t)channel->prdt_phys)) & ~3;
temp |= B_HOST_TO_LENDIAN_INT32((uint32)pci->ram_address(device,
channel->prdt_phys)) & ~3;
*channel->bm_prdt_address = temp;
*channel->dev_ctrl; // read altstatus to flush