aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.19/950-0337-usb-dwc_otg-Use-dma-allocation-for-mphi-dummy_send-b.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2019-12-23 13:42:55 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2019-12-24 18:49:44 +0100
commit67dcc43f3a22dc3a7ac07a7065971b426feeb043 (patch)
tree0b647356dce45d2c79fd46cf201daa5089cc0934 /target/linux/brcm2708/patches-4.19/950-0337-usb-dwc_otg-Use-dma-allocation-for-mphi-dummy_send-b.patch
parent47a93a810f78adce5a130d287f82b28e9b54313c (diff)
downloadupstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.gz
upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.bz2
upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.zip
brcm2708: organize kernel patches
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0337-usb-dwc_otg-Use-dma-allocation-for-mphi-dummy_send-b.patch')
-rw-r--r--target/linux/brcm2708/patches-4.19/950-0337-usb-dwc_otg-Use-dma-allocation-for-mphi-dummy_send-b.patch74
1 files changed, 0 insertions, 74 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0337-usb-dwc_otg-Use-dma-allocation-for-mphi-dummy_send-b.patch b/target/linux/brcm2708/patches-4.19/950-0337-usb-dwc_otg-Use-dma-allocation-for-mphi-dummy_send-b.patch
deleted file mode 100644
index 49fb4d7dde..0000000000
--- a/target/linux/brcm2708/patches-4.19/950-0337-usb-dwc_otg-Use-dma-allocation-for-mphi-dummy_send-b.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From f0d93c5098283f88ea1de3af152a190177da8f36 Mon Sep 17 00:00:00 2001
-From: Dave Stevenson <dave.stevenson@raspberrypi.org>
-Date: Wed, 30 Jan 2019 17:47:51 +0000
-Subject: [PATCH 337/806] usb: dwc_otg: Use dma allocation for mphi dummy_send
- buffer
-
-The FIQ driver used a kzalloc'ed buffer for dummy_send,
-passing a kernel virtual address to the hardware block.
-The buffer is only ever used for a dummy read, so it
-should be harmless, but there is the chance that it will
-cause exceptions.
-
-Use a dma allocation so that we have a genuine bus address,
-and read from that.
-Free the allocation when done for good measure.
-
-Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
----
- drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 4 ++--
- drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h | 1 +
- drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 5 ++++-
- 3 files changed, 7 insertions(+), 3 deletions(-)
-
---- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c
-+++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c
-@@ -1347,7 +1347,7 @@ void notrace dwc_otg_fiq_fsm(struct fiq_
- /* We got an interrupt, didn't handle it. */
- if (kick_irq) {
- state->mphi_int_count++;
-- FIQ_WRITE(state->mphi_regs.outdda, (int) state->dummy_send);
-+ FIQ_WRITE(state->mphi_regs.outdda, state->dummy_send_dma);
- FIQ_WRITE(state->mphi_regs.outddb, (1<<29));
-
- }
-@@ -1408,7 +1408,7 @@ void notrace dwc_otg_fiq_nop(struct fiq_
- FIQ_WRITE(state->dwc_regs_base + GINTMSK, gintmsk.d32);
- /* Force a clear before another dummy send */
- FIQ_WRITE(state->mphi_regs.intstat, (1<<29));
-- FIQ_WRITE(state->mphi_regs.outdda, (int) state->dummy_send);
-+ FIQ_WRITE(state->mphi_regs.outdda, state->dummy_send_dma);
- FIQ_WRITE(state->mphi_regs.outddb, (1<<29));
-
- }
---- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h
-+++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h
-@@ -352,6 +352,7 @@ struct fiq_state {
- dma_addr_t dma_base;
- struct fiq_dma_blob *fiq_dmab;
- void *dummy_send;
-+ dma_addr_t dummy_send_dma;
- gintmsk_data_t gintmsk_saved;
- haintmsk_data_t haintmsk_saved;
- int mphi_int_count;
---- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
-+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
-@@ -929,6 +929,8 @@ static void dwc_otg_hcd_free(dwc_otg_hcd
- DWC_TIMER_FREE(dwc_otg_hcd->conn_timer);
- DWC_TASK_FREE(dwc_otg_hcd->reset_tasklet);
- DWC_TASK_FREE(dwc_otg_hcd->completion_tasklet);
-+ DWC_DMA_FREE(dev, 16, dwc_otg_hcd->fiq_state->dummy_send,
-+ dwc_otg_hcd->fiq_state->dummy_send_dma);
- DWC_FREE(dwc_otg_hcd->fiq_state);
-
- #ifdef DWC_DEV_SRPCAP
-@@ -1021,7 +1023,8 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd
- for (i = 0; i < num_channels; i++) {
- hcd->fiq_state->channel[i].fsm = FIQ_PASSTHROUGH;
- }
-- hcd->fiq_state->dummy_send = DWC_ALLOC_ATOMIC(16);
-+ hcd->fiq_state->dummy_send = DWC_DMA_ALLOC_ATOMIC(dev, 16,
-+ &hcd->fiq_state->dummy_send_dma);
-
- hcd->fiq_stack = DWC_ALLOC(sizeof(struct fiq_stack));
- if (!hcd->fiq_stack) {