[PATCH] usb: mtu3: flush cache for the first GPD when allocate GPD ring
Marek Vasut
marex at denx.de
Wed Sep 29 13:19:13 CEST 2021
On 9/23/21 4:59 AM, Chunfeng Yun wrote:
> When allocate the GPD ring, and tell its address to the controller, then
> the driver starts or resumes the QMU, the controller will try to access
> the first GPD, so need flush the first one to avoid wrong GPD status.
>
> Reported-by: Xin Lin <Xin.Lin at mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun at mediatek.com>
> ---
> drivers/usb/mtu3/mtu3_qmu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/mtu3/mtu3_qmu.c b/drivers/usb/mtu3/mtu3_qmu.c
> index 95eaf6d236..e8dc0095ab 100644
> --- a/drivers/usb/mtu3/mtu3_qmu.c
> +++ b/drivers/usb/mtu3/mtu3_qmu.c
> @@ -112,6 +112,7 @@ int mtu3_gpd_ring_alloc(struct mtu3_ep *mep)
> memset(gpd, 0, QMU_GPD_RING_SIZE);
> ring->dma = (dma_addr_t)gpd;
> gpd_ring_init(ring, gpd);
> + mtu3_flush_cache((uintptr_t)gpd, sizeof(*gpd));
You want a RB from Bin here, then it should go into current release.
More information about the U-Boot
mailing list