Revision 9fe2fd67 hw/usb-uhci.c

b/hw/usb-uhci.c
876 876
        uint32_t link = async->td;
877 877
        uint32_t int_mask = 0, val;
878 878

  
879
        pci_dma_read(&s->dev, link & ~0xf, (uint8_t *) &td, sizeof(td));
879
        pci_dma_read(&s->dev, link & ~0xf, &td, sizeof(td));
880 880
        le32_to_cpus(&td.link);
881 881
        le32_to_cpus(&td.ctrl);
882 882
        le32_to_cpus(&td.token);
......
888 888

  
889 889
        /* update the status bits of the TD */
890 890
        val = cpu_to_le32(td.ctrl);
891
        pci_dma_write(&s->dev, (link & ~0xf) + 4,
892
                      (const uint8_t *)&val, sizeof(val));
891
        pci_dma_write(&s->dev, (link & ~0xf) + 4, &val, sizeof(val));
893 892
        uhci_async_free(s, async);
894 893
    } else {
895 894
        async->done = 1;
......
952 951

  
953 952
    DPRINTF("uhci: processing frame %d addr 0x%x\n" , s->frnum, frame_addr);
954 953

  
955
    pci_dma_read(&s->dev, frame_addr, (uint8_t *)&link, 4);
954
    pci_dma_read(&s->dev, frame_addr, &link, 4);
956 955
    le32_to_cpus(&link);
957 956

  
958 957
    int_mask = 0;
......
976 975
                break;
977 976
            }
978 977

  
979
            pci_dma_read(&s->dev, link & ~0xf, (uint8_t *) &qh, sizeof(qh));
978
            pci_dma_read(&s->dev, link & ~0xf, &qh, sizeof(qh));
980 979
            le32_to_cpus(&qh.link);
981 980
            le32_to_cpus(&qh.el_link);
982 981

  
......
996 995
        }
997 996

  
998 997
        /* TD */
999
        pci_dma_read(&s->dev, link & ~0xf, (uint8_t *) &td, sizeof(td));
998
        pci_dma_read(&s->dev, link & ~0xf, &td, sizeof(td));
1000 999
        le32_to_cpus(&td.link);
1001 1000
        le32_to_cpus(&td.ctrl);
1002 1001
        le32_to_cpus(&td.token);
......
1010 1009
        if (old_td_ctrl != td.ctrl) {
1011 1010
            /* update the status bits of the TD */
1012 1011
            val = cpu_to_le32(td.ctrl);
1013
            pci_dma_write(&s->dev, (link & ~0xf) + 4,
1014
                          (const uint8_t *)&val, sizeof(val));
1012
            pci_dma_write(&s->dev, (link & ~0xf) + 4, &val, sizeof(val));
1015 1013
        }
1016 1014

  
1017 1015
        if (ret < 0) {
......
1039 1037
	    /* update QH element link */
1040 1038
            qh.el_link = link;
1041 1039
            val = cpu_to_le32(qh.el_link);
1042
            pci_dma_write(&s->dev, (curr_qh & ~0xf) + 4,
1043
                          (const uint8_t *)&val, sizeof(val));
1040
            pci_dma_write(&s->dev, (curr_qh & ~0xf) + 4, &val, sizeof(val));
1044 1041

  
1045 1042
            if (!depth_first(link)) {
1046 1043
               /* done with this QH */

Also available in: Unified diff