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