mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 14:14:01 +08:00
usb: fixes for v3.17-rc2
Here's our first set of fixes for v3.17-rc cycle. Most fixes are pretty minor changes like the signedness bug in dwc3, or the wrong string format on MUSB. The most interesting part is the addition of Intel Quark X1000 support to PCH UDC. Signed-of-by: Felipe Balbi <balbi@ti.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJT9NZWAAoJEIaOsuA1yqREUoYP/jMbfKZGhOhFn45l4wWGheBA JO6gi97zv0TzHEoMCi4MFPiwAJIFEH/868v2s8EchgcIZcRfINlc2gO4/CHnRhXi k80WU+9w9rvkA9WDzSSa2dAhyMe6mkunCl3MVNPaj0ZxcHx6Woi+UxWEv3xlHKDN sksZ7qdjs0yYNHtn7qExNSrgP6hvAPRpZPrsTp6k5wuSvvD0voM7mRtcHHg9JRi7 FDs6gGNe5v8DuO4v3fticj2XBW6RH8kehTa1IRn7s+kCQK3uFGN8MbrdmYfaX/Y9 8KTswXdR+ywA1RHrO7zqdxii9jIo2wePdiemkSozgEofuwHuLcoK3ggaYuy+4iwo sOBh2bYSrie1aC8pTOA17qeWmShBxeTceDgBisMSjlBthlULq0DyvVr8KTVHcMe9 JaDaWp5eq/v1gsld5KugGdyTaG9JIGcnnOcsYEAaTJBK2rXcUqUkqoh2X9IH980l mpfLVhfTtiJRqSSyKnv6rxhxZx4IY+swgkIac1J0xpISDp/SbqXsE0iJw3NeWk/m ufXZpWqO4fwRUSLQvcuesJN4DcddnOC1R3XDsoTjHHiBmrIwDbPK67GsJXKDCGLM YqgMKugevjlo1/pC4pSIh4nRsgDb2SvtNGLHOB3l/NeqNVtvX3Ai4eLoh8n691Bt E5J32F4xI1q3h7ADJQvg =Rb6u -----END PGP SIGNATURE----- Merge tag 'fixes-for-v3.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into work-linus Felipe writes: usb: fixes for v3.17-rc2 Here's our first set of fixes for v3.17-rc cycle. Most fixes are pretty minor changes like the signedness bug in dwc3, or the wrong string format on MUSB. The most interesting part is the addition of Intel Quark X1000 support to PCH UDC. Signed-of-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
commit
1ddb55275d
@ -425,7 +425,7 @@ static void dwc3_omap_set_utmi_mode(struct dwc3_omap *omap)
|
||||
|
||||
static int dwc3_omap_extcon_register(struct dwc3_omap *omap)
|
||||
{
|
||||
u32 ret;
|
||||
int ret;
|
||||
struct device_node *node = omap->dev->of_node;
|
||||
struct extcon_dev *edev;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
subdir-ccflags-$(CONFIG_USB_GADGET_DEBUG) := -DDEBUG
|
||||
subdir-ccflags-$(CONFIG_USB_GADGET_VERBOSE) += -DVERBOSE_DEBUG
|
||||
ccflags-y += -I$(PWD)/drivers/usb/gadget/udc
|
||||
ccflags-y += -Idrivers/usb/gadget/udc
|
||||
|
||||
obj-$(CONFIG_USB_LIBCOMPOSITE) += libcomposite.o
|
||||
libcomposite-y := usbstring.o config.o epautoconf.o
|
||||
|
@ -2,8 +2,8 @@
|
||||
# USB peripheral controller drivers
|
||||
#
|
||||
|
||||
ccflags-y := -I$(PWD)/drivers/usb/gadget/
|
||||
ccflags-y += -I$(PWD)/drivers/usb/gadget/udc/
|
||||
ccflags-y := -Idrivers/usb/gadget/
|
||||
ccflags-y += -Idrivers/usb/gadget/udc/
|
||||
|
||||
# USB Functions
|
||||
usb_f_acm-y := f_acm.o
|
||||
|
@ -1127,10 +1127,7 @@ void gether_disconnect(struct gether *link)
|
||||
|
||||
DBG(dev, "%s\n", __func__);
|
||||
|
||||
netif_tx_lock(dev->net);
|
||||
netif_stop_queue(dev->net);
|
||||
netif_tx_unlock(dev->net);
|
||||
|
||||
netif_carrier_off(dev->net);
|
||||
|
||||
/* disable endpoints, forcing (synchronous) completion
|
||||
|
@ -195,6 +195,7 @@ uvc_video_complete(struct usb_ep *ep, struct usb_request *req)
|
||||
printk(KERN_INFO "Failed to queue request (%d).\n", ret);
|
||||
usb_ep_set_halt(ep);
|
||||
spin_unlock_irqrestore(&video->queue.irqlock, flags);
|
||||
uvc_queue_cancel(queue, 0);
|
||||
goto requeue;
|
||||
}
|
||||
spin_unlock_irqrestore(&video->queue.irqlock, flags);
|
||||
@ -281,6 +282,7 @@ error:
|
||||
static int
|
||||
uvc_video_pump(struct uvc_video *video)
|
||||
{
|
||||
struct uvc_video_queue *queue = &video->queue;
|
||||
struct usb_request *req;
|
||||
struct uvc_buffer *buf;
|
||||
unsigned long flags;
|
||||
@ -322,6 +324,7 @@ uvc_video_pump(struct uvc_video *video)
|
||||
printk(KERN_INFO "Failed to queue request (%d)\n", ret);
|
||||
usb_ep_set_halt(video->ep);
|
||||
spin_unlock_irqrestore(&video->queue.irqlock, flags);
|
||||
uvc_queue_cancel(queue, 0);
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(&video->queue.irqlock, flags);
|
||||
|
@ -2,9 +2,9 @@
|
||||
# USB gadget drivers
|
||||
#
|
||||
|
||||
ccflags-y := -I$(PWD)/drivers/usb/gadget/
|
||||
ccflags-y += -I$(PWD)/drivers/usb/gadget/udc/
|
||||
ccflags-y += -I$(PWD)/drivers/usb/gadget/function/
|
||||
ccflags-y := -Idrivers/usb/gadget/
|
||||
ccflags-y += -Idrivers/usb/gadget/udc/
|
||||
ccflags-y += -Idrivers/usb/gadget/function/
|
||||
|
||||
g_zero-y := zero.o
|
||||
g_audio-y := audio.o
|
||||
|
@ -222,10 +222,12 @@ static void dbgp_unbind(struct usb_gadget *gadget)
|
||||
{
|
||||
#ifdef CONFIG_USB_G_DBGP_SERIAL
|
||||
kfree(dbgp.serial);
|
||||
dbgp.serial = NULL;
|
||||
#endif
|
||||
if (dbgp.req) {
|
||||
kfree(dbgp.req->buf);
|
||||
usb_ep_free_request(gadget->ep0, dbgp.req);
|
||||
dbgp.req = NULL;
|
||||
}
|
||||
|
||||
gadget->ep0->driver_data = NULL;
|
||||
|
@ -440,7 +440,7 @@ ep_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
|
||||
|
||||
value = -ENOMEM;
|
||||
kbuf = memdup_user(buf, len);
|
||||
if (!kbuf) {
|
||||
if (IS_ERR(kbuf)) {
|
||||
value = PTR_ERR(kbuf);
|
||||
goto free1;
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ config USB_GOKU
|
||||
gadget drivers to also be dynamically linked.
|
||||
|
||||
config USB_EG20T
|
||||
tristate "Intel EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7831) UDC"
|
||||
tristate "Intel QUARK X1000/EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7831) UDC"
|
||||
depends on PCI
|
||||
help
|
||||
This is a USB device driver for EG20T PCH.
|
||||
@ -353,6 +353,7 @@ config USB_EG20T
|
||||
ML7213/ML7831 is companion chip for Intel Atom E6xx series.
|
||||
ML7213/ML7831 is completely compatible for Intel EG20T PCH.
|
||||
|
||||
This driver can be used with Intel's Quark X1000 SOC platform
|
||||
#
|
||||
# LAST -- dummy/emulated controller
|
||||
#
|
||||
|
@ -1661,7 +1661,7 @@ static irqreturn_t usba_udc_irq(int irq, void *devid)
|
||||
if (dma_status) {
|
||||
int i;
|
||||
|
||||
for (i = 1; i < USBA_NR_DMAS; i++)
|
||||
for (i = 1; i <= USBA_NR_DMAS; i++)
|
||||
if (dma_status & (1 << i))
|
||||
usba_dma_irq(udc, &udc->usba_ep[i]);
|
||||
}
|
||||
|
@ -1398,13 +1398,17 @@ static int fusb300_probe(struct platform_device *pdev)
|
||||
|
||||
/* initialize udc */
|
||||
fusb300 = kzalloc(sizeof(struct fusb300), GFP_KERNEL);
|
||||
if (fusb300 == NULL)
|
||||
if (fusb300 == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
for (i = 0; i < FUSB300_MAX_NUM_EP; i++) {
|
||||
_ep[i] = kzalloc(sizeof(struct fusb300_ep), GFP_KERNEL);
|
||||
if (_ep[i] == NULL)
|
||||
if (_ep[i] == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto clean_up;
|
||||
}
|
||||
fusb300->ep[i] = _ep[i];
|
||||
}
|
||||
|
||||
|
@ -343,6 +343,7 @@ struct pch_vbus_gpio_data {
|
||||
* @setup_data: Received setup data
|
||||
* @phys_addr: of device memory
|
||||
* @base_addr: for mapped device memory
|
||||
* @bar: Indicates which PCI BAR for USB regs
|
||||
* @irq: IRQ line for the device
|
||||
* @cfg_data: current cfg, intf, and alt in use
|
||||
* @vbus_gpio: GPIO informaton for detecting VBUS
|
||||
@ -370,14 +371,17 @@ struct pch_udc_dev {
|
||||
struct usb_ctrlrequest setup_data;
|
||||
unsigned long phys_addr;
|
||||
void __iomem *base_addr;
|
||||
unsigned bar;
|
||||
unsigned irq;
|
||||
struct pch_udc_cfg_data cfg_data;
|
||||
struct pch_vbus_gpio_data vbus_gpio;
|
||||
};
|
||||
#define to_pch_udc(g) (container_of((g), struct pch_udc_dev, gadget))
|
||||
|
||||
#define PCH_UDC_PCI_BAR_QUARK_X1000 0
|
||||
#define PCH_UDC_PCI_BAR 1
|
||||
#define PCI_DEVICE_ID_INTEL_EG20T_UDC 0x8808
|
||||
#define PCI_DEVICE_ID_INTEL_QUARK_X1000_UDC 0x0939
|
||||
#define PCI_VENDOR_ID_ROHM 0x10DB
|
||||
#define PCI_DEVICE_ID_ML7213_IOH_UDC 0x801D
|
||||
#define PCI_DEVICE_ID_ML7831_IOH_UDC 0x8808
|
||||
@ -3076,7 +3080,7 @@ static void pch_udc_remove(struct pci_dev *pdev)
|
||||
iounmap(dev->base_addr);
|
||||
if (dev->mem_region)
|
||||
release_mem_region(dev->phys_addr,
|
||||
pci_resource_len(pdev, PCH_UDC_PCI_BAR));
|
||||
pci_resource_len(pdev, dev->bar));
|
||||
if (dev->active)
|
||||
pci_disable_device(pdev);
|
||||
kfree(dev);
|
||||
@ -3144,9 +3148,15 @@ static int pch_udc_probe(struct pci_dev *pdev,
|
||||
dev->active = 1;
|
||||
pci_set_drvdata(pdev, dev);
|
||||
|
||||
/* Determine BAR based on PCI ID */
|
||||
if (id->device == PCI_DEVICE_ID_INTEL_QUARK_X1000_UDC)
|
||||
dev->bar = PCH_UDC_PCI_BAR_QUARK_X1000;
|
||||
else
|
||||
dev->bar = PCH_UDC_PCI_BAR;
|
||||
|
||||
/* PCI resource allocation */
|
||||
resource = pci_resource_start(pdev, 1);
|
||||
len = pci_resource_len(pdev, 1);
|
||||
resource = pci_resource_start(pdev, dev->bar);
|
||||
len = pci_resource_len(pdev, dev->bar);
|
||||
|
||||
if (!request_mem_region(resource, len, KBUILD_MODNAME)) {
|
||||
dev_err(&pdev->dev, "%s: pci device used already\n", __func__);
|
||||
@ -3211,6 +3221,12 @@ finished:
|
||||
}
|
||||
|
||||
static const struct pci_device_id pch_udc_pcidev_id[] = {
|
||||
{
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL,
|
||||
PCI_DEVICE_ID_INTEL_QUARK_X1000_UDC),
|
||||
.class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe,
|
||||
.class_mask = 0xffffffff,
|
||||
},
|
||||
{
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EG20T_UDC),
|
||||
.class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe,
|
||||
|
@ -1868,8 +1868,8 @@ static int r8a66597_probe(struct platform_device *pdev)
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
reg = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (!reg)
|
||||
return -ENODEV;
|
||||
if (IS_ERR(reg))
|
||||
return PTR_ERR(reg);
|
||||
|
||||
ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
irq = ires->start;
|
||||
|
@ -96,7 +96,7 @@ static bool ux500_configure_channel(struct dma_channel *channel,
|
||||
struct musb *musb = ux500_channel->controller->private_data;
|
||||
|
||||
dev_dbg(musb->controller,
|
||||
"packet_sz=%d, mode=%d, dma_addr=0x%llu, len=%d is_tx=%d\n",
|
||||
"packet_sz=%d, mode=%d, dma_addr=0x%llx, len=%d is_tx=%d\n",
|
||||
packet_sz, mode, (unsigned long long) dma_addr,
|
||||
len, ux500_channel->is_tx);
|
||||
|
||||
|
@ -260,10 +260,8 @@ static int gpio_vbus_probe(struct platform_device *pdev)
|
||||
|
||||
gpio_vbus->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg),
|
||||
GFP_KERNEL);
|
||||
if (!gpio_vbus->phy.otg) {
|
||||
kfree(gpio_vbus);
|
||||
if (!gpio_vbus->phy.otg)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, gpio_vbus);
|
||||
gpio_vbus->dev = &pdev->dev;
|
||||
|
@ -1601,8 +1601,8 @@ static int msm_otg_probe(struct platform_device *pdev)
|
||||
*/
|
||||
if (motg->phy_number) {
|
||||
phy_select = devm_ioremap_nocache(&pdev->dev, USB2_PHY_SEL, 4);
|
||||
if (IS_ERR(phy_select))
|
||||
return PTR_ERR(phy_select);
|
||||
if (!phy_select)
|
||||
return -ENOMEM;
|
||||
/* Enable second PHY with the OTG port */
|
||||
writel(0x1, phy_select);
|
||||
}
|
||||
|
@ -216,7 +216,7 @@
|
||||
|
||||
#define EXYNOS5_DRD_PHYPARAM1 (0x20)
|
||||
|
||||
#define PHYPARAM1_PCS_TXDEEMPH_MASK (0x1f << 0)
|
||||
#define PHYPARAM1_PCS_TXDEEMPH_MASK (0x3f << 0)
|
||||
#define PHYPARAM1_PCS_TXDEEMPH (0x1c)
|
||||
|
||||
#define EXYNOS5_DRD_PHYTERM (0x24)
|
||||
|
@ -232,6 +232,9 @@ struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
|
||||
phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
|
||||
if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) {
|
||||
dev_dbg(dev, "unable to find transceiver\n");
|
||||
if (!IS_ERR(phy))
|
||||
phy = ERR_PTR(-ENODEV);
|
||||
|
||||
goto err0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user