From: Stefan Roese Date: Tue, 21 Jul 2020 08:46:03 +0000 (+0200) Subject: usb: xhci: xhci_mem_init: Use cpu_to_le64() and not xhci_writeq() X-Git-Tag: submit/tizen_6.0/20211217.073345~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F71%2F268171%2F2;p=platform%2Fkernel%2Fu-boot.git usb: xhci: xhci_mem_init: Use cpu_to_le64() and not xhci_writeq() xhci_writeq() makes the CPU->LE swapping only when addressing registers in the xHCI controller address range and not in the local memory (RAM). We need to use cpu_to_le64() here to ensure that the conversion is done correctly. Signed-off-by: Stefan Roese Reviewed-by: Bin Meng Tested-by: Bin Meng Cc: Bin Meng Cc: Marek Vasut Change-Id: Ibc1cdde25805cf13400bce746711c98bcaa48fe6 Signed-off-by: Marek Szyprowski --- diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 54e9b018b4..19fc414430 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -562,7 +562,7 @@ int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr, trb_64 = 0; trb_64 = (uintptr_t)seg->trbs; struct xhci_erst_entry *entry = &ctrl->erst.entries[val]; - xhci_writeq(&entry->seg_addr, trb_64); + entry->seg_addr = cpu_to_le64(trb_64); entry->seg_size = cpu_to_le32(TRBS_PER_SEGMENT); entry->rsvd = 0; seg = seg->next;