Commit ea0f49a74dc18b063c7fd5076dcfa3a402c48e92

Authored by edgar_igl
1 parent 55e8b85e

ETRAX-FS: Fix DMA warnings.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5621 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 11 additions and 8 deletions
hw/etraxfs_dma.c
... ... @@ -406,7 +406,8 @@ static void channel_out_run(struct fs_dma_ctrl *ctrl, int c)
406 406 (uint32_t)ctrl->channels[c].current_d.after,
407 407 saved_data_buf));
408 408  
409   - len = (uint32_t)ctrl->channels[c].current_d.after;
  409 + len = (uint32_t)(unsigned long)
  410 + ctrl->channels[c].current_d.after;
410 411 len -= saved_data_buf;
411 412  
412 413 if (len > sizeof buf)
... ... @@ -426,8 +427,8 @@ static void channel_out_run(struct fs_dma_ctrl *ctrl, int c)
426 427  
427 428 saved_data_buf += len;
428 429  
429   - if (saved_data_buf ==
430   - (uint32_t)ctrl->channels[c].current_d.after) {
  430 + if (saved_data_buf == (uint32_t)(unsigned long)
  431 + ctrl->channels[c].current_d.after) {
431 432 /* Done. Step to next. */
432 433 if (ctrl->channels[c].current_d.out_eop) {
433 434 /* TODO: signal eop to the client. */
... ... @@ -451,7 +452,8 @@ static void channel_out_run(struct fs_dma_ctrl *ctrl, int c)
451 452 channel_stop(ctrl, c);
452 453 } else {
453 454 ctrl->channels[c].regs[RW_SAVED_DATA] =
454   - (uint32_t)ctrl->channels[c].current_d.next;
  455 + (uint32_t)(unsigned long)ctrl->
  456 + channels[c].current_d.next;
455 457 /* Load new descriptor. */
456 458 channel_load_d(ctrl, c);
457 459 saved_data_buf = (uint32_t)(unsigned long)
... ... @@ -477,7 +479,7 @@ static int channel_in_process(struct fs_dma_ctrl *ctrl, int c,
477 479 return 0;
478 480  
479 481 saved_data_buf = channel_reg(ctrl, c, RW_SAVED_DATA_BUF);
480   - len = (uint32_t)ctrl->channels[c].current_d.after;
  482 + len = (uint32_t)(unsigned long)ctrl->channels[c].current_d.after;
481 483 len -= saved_data_buf;
482 484  
483 485 if (len > buflen)
... ... @@ -487,7 +489,7 @@ static int channel_in_process(struct fs_dma_ctrl *ctrl, int c,
487 489 saved_data_buf += len;
488 490  
489 491 if (saved_data_buf ==
490   - (uint32_t)ctrl->channels[c].current_d.after
  492 + (uint32_t)(unsigned long)ctrl->channels[c].current_d.after
491 493 || eop) {
492 494 uint32_t r_intr = ctrl->channels[c].regs[R_INTR];
493 495  
... ... @@ -524,10 +526,11 @@ static int channel_in_process(struct fs_dma_ctrl *ctrl, int c,
524 526 channel_stop(ctrl, c);
525 527 } else {
526 528 ctrl->channels[c].regs[RW_SAVED_DATA] =
527   - (uint32_t)ctrl->channels[c].current_d.next;
  529 + (uint32_t)(unsigned long)ctrl->
  530 + channels[c].current_d.next;
528 531 /* Load new descriptor. */
529 532 channel_load_d(ctrl, c);
530   - saved_data_buf = (uint32_t)
  533 + saved_data_buf = (uint32_t)(unsigned long)
531 534 ctrl->channels[c].current_d.buf;
532 535 }
533 536 }
... ...