Merge tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB/PHY updates from Greg KH: "Here is the big set of USB and PHY driver updates for 4.15-rc1. There is the usual amount of gadget and xhci driver updates, along with phy and chipidea enhancements. There's also a lot of SPDX tags and license boilerplate cleanups as well, which provide some churn in the diffstat. Other major thing is the typec code that moved out of staging and into the "real" part of the drivers/usb/ tree, which was nice to see happen. All of these have been in linux-next with no reported issues for a while" * tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits) usb: gadget: f_fs: Fix use-after-free in ffs_free_inst USB: usbfs: compute urb->actual_length for isochronous usb: core: message: remember to reset 'ret' to 0 when necessary USB: typec: Remove remaining redundant license text USB: typec: add SPDX identifiers to some files USB: renesas_usbhs: rcar?.h: add SPDX tags USB: chipidea: ci_hdrc_tegra.c: add SPDX line USB: host: xhci-debugfs: add SPDX lines USB: add SPDX identifiers to all remaining Makefiles usb: host: isp1362-hcd: remove a couple of redundant assignments USB: adutux: remove redundant variable minor usb: core: add a new usb_get_ptm_status() helper usb: core: add a 'type' parameter to usb_get_status() usb: core: introduce a new usb_get_std_status() helper usb: core: rename usb_get_status() 'type' argument to 'recip' usb: core: add Status Type definitions USB: gadget: Remove redundant license text USB: gadget: function: Remove redundant license text USB: gadget: udc: Remove redundant license text USB: gadget: legacy: Remove redundant license text ...
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* core.c - DesignWare HS OTG Controller common routines
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* core.h - DesignWare HS OTG Controller common declarations
|
||||
*
|
||||
@@ -395,6 +396,9 @@ enum dwc2_ep0_state {
|
||||
* (default when phy_type is UTMI+ or ULPI)
|
||||
* 1 - 6 MHz
|
||||
* (default when phy_type is Full Speed)
|
||||
* @oc_disable: Flag to disable overcurrent condition.
|
||||
* 0 - Allow overcurrent condition to get detected
|
||||
* 1 - Disable overcurrent condtion to get detected
|
||||
* @ts_dline: Enable Term Select Dline pulsing
|
||||
* 0 - No (default)
|
||||
* 1 - Yes
|
||||
@@ -492,6 +496,7 @@ struct dwc2_core_params {
|
||||
bool dma_desc_fs_enable;
|
||||
bool host_support_fs_ls_low_power;
|
||||
bool host_ls_low_power_phy_clk;
|
||||
bool oc_disable;
|
||||
|
||||
u8 host_channels;
|
||||
u16 host_rx_fifo_size;
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* core_intr.c - DesignWare HS OTG Controller common interrupt handling
|
||||
*
|
||||
|
@@ -1,17 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/**
|
||||
* debug.h - Designware USB2 DRD controller debug header
|
||||
*
|
||||
* Copyright (C) 2015 Intel Corporation
|
||||
* Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 of
|
||||
* the License as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "core.h"
|
||||
|
@@ -1,17 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/**
|
||||
* debugfs.c - Designware USB2 DRD controller debugfs
|
||||
*
|
||||
* Copyright (C) 2015 Intel Corporation
|
||||
* Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 of
|
||||
* the License as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/**
|
||||
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
@@ -8,10 +9,6 @@
|
||||
* http://armlinux.simtec.co.uk/
|
||||
*
|
||||
* S3C USB2.0 High-speed / OtG driver
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
@@ -3202,6 +3199,8 @@ void dwc2_hsotg_disconnect(struct dwc2_hsotg *hsotg)
|
||||
|
||||
call_gadget(hsotg, disconnect);
|
||||
hsotg->lx_state = DWC2_L3;
|
||||
|
||||
usb_gadget_set_state(&hsotg->gadget, USB_STATE_NOTATTACHED);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4004,6 +4003,11 @@ static int dwc2_hsotg_ep_disable(struct usb_ep *ep)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (hsotg->op_state != OTG_STATE_B_PERIPHERAL) {
|
||||
dev_err(hsotg->dev, "%s: called in host mode?\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index);
|
||||
|
||||
spin_lock_irqsave(&hsotg->lock, flags);
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* hcd.c - DesignWare HS OTG Controller host-mode routines
|
||||
*
|
||||
@@ -213,6 +214,11 @@ static int dwc2_hs_phy_init(struct dwc2_hsotg *hsotg, bool select_phy)
|
||||
usbcfg &= ~(GUSBCFG_PHYIF16 | GUSBCFG_DDRSEL);
|
||||
if (hsotg->params.phy_ulpi_ddr)
|
||||
usbcfg |= GUSBCFG_DDRSEL;
|
||||
|
||||
/* Set external VBUS indicator as needed. */
|
||||
if (hsotg->params.oc_disable)
|
||||
usbcfg |= (GUSBCFG_ULPI_INT_VBUS_IND |
|
||||
GUSBCFG_INDICATORPASSTHROUGH);
|
||||
break;
|
||||
case DWC2_PHY_TYPE_PARAM_UTMI:
|
||||
/* UTMI+ interface */
|
||||
@@ -3277,7 +3283,6 @@ static void dwc2_conn_id_status_change(struct work_struct *work)
|
||||
dwc2_core_init(hsotg, false);
|
||||
dwc2_enable_global_interrupts(hsotg);
|
||||
spin_lock_irqsave(&hsotg->lock, flags);
|
||||
dwc2_hsotg_disconnect(hsotg);
|
||||
dwc2_hsotg_core_init_disconnected(hsotg, false);
|
||||
spin_unlock_irqrestore(&hsotg->lock, flags);
|
||||
dwc2_hsotg_core_connect(hsotg);
|
||||
@@ -3296,8 +3301,12 @@ host:
|
||||
if (count > 250)
|
||||
dev_err(hsotg->dev,
|
||||
"Connection id status change timed out\n");
|
||||
hsotg->op_state = OTG_STATE_A_HOST;
|
||||
|
||||
spin_lock_irqsave(&hsotg->lock, flags);
|
||||
dwc2_hsotg_disconnect(hsotg);
|
||||
spin_unlock_irqrestore(&hsotg->lock, flags);
|
||||
|
||||
hsotg->op_state = OTG_STATE_A_HOST;
|
||||
/* Initialize the Core for Host mode */
|
||||
dwc2_core_init(hsotg, false);
|
||||
dwc2_enable_global_interrupts(hsotg);
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* hcd.h - DesignWare HS OTG Controller host-mode declarations
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* hcd_ddma.c - DesignWare HS OTG Controller descriptor DMA routines
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* hcd_intr.c - DesignWare HS OTG Controller host-mode interrupt handling
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* hcd_queue.c - DesignWare HS OTG Controller host queuing routines
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* hw.h - DesignWare HS OTG Controller hardware definitions
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) 2004-2016 Synopsys, Inc.
|
||||
*
|
||||
@@ -136,6 +137,15 @@ static void dwc2_set_stm32f4x9_fsotg_params(struct dwc2_hsotg *hsotg)
|
||||
p->activate_stm_fs_transceiver = true;
|
||||
}
|
||||
|
||||
static void dwc2_set_stm32f7xx_hsotg_params(struct dwc2_hsotg *hsotg)
|
||||
{
|
||||
struct dwc2_core_params *p = &hsotg->params;
|
||||
|
||||
p->host_rx_fifo_size = 622;
|
||||
p->host_nperio_tx_fifo_size = 128;
|
||||
p->host_perio_tx_fifo_size = 256;
|
||||
}
|
||||
|
||||
const struct of_device_id dwc2_of_match_table[] = {
|
||||
{ .compatible = "brcm,bcm2835-usb", .data = dwc2_set_bcm_params },
|
||||
{ .compatible = "hisilicon,hi6220-usb", .data = dwc2_set_his_params },
|
||||
@@ -154,6 +164,8 @@ const struct of_device_id dwc2_of_match_table[] = {
|
||||
{ .compatible = "st,stm32f4x9-fsotg",
|
||||
.data = dwc2_set_stm32f4x9_fsotg_params },
|
||||
{ .compatible = "st,stm32f4x9-hsotg" },
|
||||
{ .compatible = "st,stm32f7xx-hsotg",
|
||||
.data = dwc2_set_stm32f7xx_hsotg_params },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, dwc2_of_match_table);
|
||||
@@ -335,6 +347,9 @@ static void dwc2_get_device_properties(struct dwc2_hsotg *hsotg)
|
||||
num);
|
||||
}
|
||||
}
|
||||
|
||||
if (of_find_property(hsotg->dev->of_node, "disable-over-current", NULL))
|
||||
p->oc_disable = true;
|
||||
}
|
||||
|
||||
static void dwc2_check_param_otg_cap(struct dwc2_hsotg *hsotg)
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* pci.c - DesignWare HS OTG Controller PCI driver
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* platform.c - DesignWare HS OTG Controller platform driver
|
||||
*
|
||||
|
Reference in New Issue
Block a user