diff options
author | Vignesh Raghavendra <vigneshr@ti.com> | 2020-01-27 17:55:54 +0530 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@gmail.com> | 2020-02-02 18:19:52 +0100 |
commit | bf16a7be90d5732279c454c10be1686ed79610be (patch) | |
tree | 14fb6c529b71c26758767c4f62d2a7de0d925d54 /drivers/usb | |
parent | 80e99adbe47d1c8590f9b971ac52257fdc51a5ec (diff) | |
download | u-boot-bf16a7be90d5732279c454c10be1686ed79610be.tar.gz |
usb: cdns3: ep0: Invalidate cache before reading Setup Packet
Invalidate dcache line before accessing Setup Packet contents. Otherwise
driver will see stale content on non coherent architecture.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/cdns3/ep0.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c index 0b6d9cf727..f35a924839 100644 --- a/drivers/usb/cdns3/ep0.c +++ b/drivers/usb/cdns3/ep0.c @@ -562,6 +562,10 @@ static void cdns3_ep0_setup_phase(struct cdns3_device *priv_dev) struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; int result; + /* Invalidate Setup Packet received */ + invalidate_dcache_range(priv_dev->setup_dma, + priv_dev->setup_dma + ARCH_DMA_MINALIGN); + priv_dev->ep0_data_dir = ctrl->bRequestType & USB_DIR_IN; trace_cdns3_ctrl_req(ctrl); |