Revision ea0f49a7 hw/etraxfs_dma.c

b/hw/etraxfs_dma.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 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 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 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 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 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
	}

Also available in: Unified diff