diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-15 13:24:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-15 13:24:55 -0500 |
commit | e29876723f7cb7728f0d6a674d23f92673e9f112 (patch) | |
tree | ea1da8bf77139f6cc6de029988208a7eddaf2002 /drivers/usb/renesas_usbhs/fifo.c | |
parent | 8c988ae787af4900bec5410658e8a82844185c85 (diff) | |
parent | 4d4bac4499e9955521af80198063ef9c2f2bd634 (diff) |
Merge tag 'usb-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg KH:
"Here's the big pull request for the USB driver tree for 3.20-rc1.
Nothing major happening here, just lots of gadget driver updates, new
device ids, and a bunch of cleanups.
All of these have been in linux-next for a while with no reported
issues"
* tag 'usb-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (299 commits)
usb: musb: fix device hotplug behind hub
usb: dwc2: Fix a bug in reading the endpoint directions from reg.
staging: emxx_udc: fix the build error
usb: Retry port status check on resume to work around RH bugs
Revert "usb: Reset USB-3 devices on USB-3 link bounce"
uhci-hub: use HUB_CHAR_*
usb: kconfig: replace PPC_OF with PPC
ehci-pci: disable for Intel MID platforms (update)
usb: gadget: Kconfig: use bool instead of boolean
usb: musb: blackfin: remove incorrect __exit_p()
USB: fix use-after-free bug in usb_hcd_unlink_urb()
ehci-pci: disable for Intel MID platforms
usb: host: pci_quirks: joing string literals
USB: add flag for HCDs that can't receive wakeup requests (isp1760-hcd)
USB: usbfs: allow URBs to be reaped after disconnection
cdc-acm: kill unnecessary messages
cdc-acm: add sanity checks
usb: phy: phy-generic: Fix USB PHY gpio reset
usb: dwc2: fix USB core dependencies
usb: renesas_usbhs: fix NULL pointer dereference in dma_release_channel()
...
Diffstat (limited to 'drivers/usb/renesas_usbhs/fifo.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/fifo.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index f46271ce1b15..d891bff39d66 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c | |||
@@ -1054,10 +1054,8 @@ static void usbhsf_dma_quit(struct usbhs_priv *priv, struct usbhs_fifo *fifo) | |||
1054 | fifo->rx_chan = NULL; | 1054 | fifo->rx_chan = NULL; |
1055 | } | 1055 | } |
1056 | 1056 | ||
1057 | static void usbhsf_dma_init(struct usbhs_priv *priv, | 1057 | static void usbhsf_dma_init_pdev(struct usbhs_fifo *fifo) |
1058 | struct usbhs_fifo *fifo) | ||
1059 | { | 1058 | { |
1060 | struct device *dev = usbhs_priv_to_dev(priv); | ||
1061 | dma_cap_mask_t mask; | 1059 | dma_cap_mask_t mask; |
1062 | 1060 | ||
1063 | dma_cap_zero(mask); | 1061 | dma_cap_zero(mask); |
@@ -1069,6 +1067,27 @@ static void usbhsf_dma_init(struct usbhs_priv *priv, | |||
1069 | dma_cap_set(DMA_SLAVE, mask); | 1067 | dma_cap_set(DMA_SLAVE, mask); |
1070 | fifo->rx_chan = dma_request_channel(mask, usbhsf_dma_filter, | 1068 | fifo->rx_chan = dma_request_channel(mask, usbhsf_dma_filter, |
1071 | &fifo->rx_slave); | 1069 | &fifo->rx_slave); |
1070 | } | ||
1071 | |||
1072 | static void usbhsf_dma_init_dt(struct device *dev, struct usbhs_fifo *fifo) | ||
1073 | { | ||
1074 | fifo->tx_chan = dma_request_slave_channel_reason(dev, "tx"); | ||
1075 | if (IS_ERR(fifo->tx_chan)) | ||
1076 | fifo->tx_chan = NULL; | ||
1077 | fifo->rx_chan = dma_request_slave_channel_reason(dev, "rx"); | ||
1078 | if (IS_ERR(fifo->rx_chan)) | ||
1079 | fifo->rx_chan = NULL; | ||
1080 | } | ||
1081 | |||
1082 | static void usbhsf_dma_init(struct usbhs_priv *priv, | ||
1083 | struct usbhs_fifo *fifo) | ||
1084 | { | ||
1085 | struct device *dev = usbhs_priv_to_dev(priv); | ||
1086 | |||
1087 | if (dev->of_node) | ||
1088 | usbhsf_dma_init_dt(dev, fifo); | ||
1089 | else | ||
1090 | usbhsf_dma_init_pdev(fifo); | ||
1072 | 1091 | ||
1073 | if (fifo->tx_chan || fifo->rx_chan) | 1092 | if (fifo->tx_chan || fifo->rx_chan) |
1074 | dev_dbg(dev, "enable DMAEngine (%s%s%s)\n", | 1093 | dev_dbg(dev, "enable DMAEngine (%s%s%s)\n", |