USB fixes for 4.3-rc5

Here are some small USB and PHY fixes and quirk updates for 4.3-rc5.
 Nothing major here, full details in the shortlog, and all of these have
 been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlYZOFUACgkQMUfUDdst+ymLSACeLNl7IWSxq2acJ5rhUl5+LRxp
 KtsAn3lMXJryk4xw2WpfJg30TXpWXnNM
 =n9ei
 -----END PGP SIGNATURE-----

Merge tag 'usb-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some small USB and PHY fixes and quirk updates for 4.3-rc5.

  Nothing major here, full details in the shortlog, and all of these
  have been in linux-next for a while"

* tag 'usb-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: Add device quirk for Logitech PTZ cameras
  USB: chaoskey read offset bug
  USB: Add reset-resume quirk for two Plantronics usb headphones.
  usb: renesas_usbhs: Add support for R-Car H3
  usb: renesas_usbhs: fix build warning if 64-bit architecture
  usb: gadget: bdc: fix memory leak
  phy: berlin-sata: Fix module autoload for OF platform driver
  phy: rockchip-usb: power down phy when rockchip phy probe
  phy: qcom-ufs: fix build error when the component is built as a module
This commit is contained in:
Linus Torvalds 2015-10-10 11:17:45 -07:00
commit 4a06c8ac2f
9 changed files with 43 additions and 4 deletions

View File

@ -5,6 +5,7 @@ Required properties:
- "renesas,usbhs-r8a7790" - "renesas,usbhs-r8a7790"
- "renesas,usbhs-r8a7791" - "renesas,usbhs-r8a7791"
- "renesas,usbhs-r8a7794" - "renesas,usbhs-r8a7794"
- "renesas,usbhs-r8a7795"
- reg: Base address and length of the register for the USBHS - reg: Base address and length of the register for the USBHS
- interrupts: Interrupt specifier for the USBHS - interrupts: Interrupt specifier for the USBHS
- clocks: A list of phandle + clock specifier pairs - clocks: A list of phandle + clock specifier pairs

View File

@ -276,6 +276,7 @@ static const struct of_device_id phy_berlin_sata_of_match[] = {
{ .compatible = "marvell,berlin2q-sata-phy" }, { .compatible = "marvell,berlin2q-sata-phy" },
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, phy_berlin_sata_of_match);
static struct platform_driver phy_berlin_sata_driver = { static struct platform_driver phy_berlin_sata_driver = {
.probe = phy_berlin_sata_probe, .probe = phy_berlin_sata_probe,

View File

@ -432,6 +432,7 @@ out_disable_src:
out: out:
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_ref_clk);
static static
int ufs_qcom_phy_disable_vreg(struct phy *phy, int ufs_qcom_phy_disable_vreg(struct phy *phy,
@ -474,6 +475,7 @@ void ufs_qcom_phy_disable_ref_clk(struct phy *generic_phy)
phy->is_ref_clk_enabled = false; phy->is_ref_clk_enabled = false;
} }
} }
EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_ref_clk);
#define UFS_REF_CLK_EN (1 << 5) #define UFS_REF_CLK_EN (1 << 5)
@ -517,11 +519,13 @@ void ufs_qcom_phy_enable_dev_ref_clk(struct phy *generic_phy)
{ {
ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, true); ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, true);
} }
EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_dev_ref_clk);
void ufs_qcom_phy_disable_dev_ref_clk(struct phy *generic_phy) void ufs_qcom_phy_disable_dev_ref_clk(struct phy *generic_phy)
{ {
ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, false); ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, false);
} }
EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_dev_ref_clk);
/* Turn ON M-PHY RMMI interface clocks */ /* Turn ON M-PHY RMMI interface clocks */
int ufs_qcom_phy_enable_iface_clk(struct phy *generic_phy) int ufs_qcom_phy_enable_iface_clk(struct phy *generic_phy)
@ -550,6 +554,7 @@ int ufs_qcom_phy_enable_iface_clk(struct phy *generic_phy)
out: out:
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_iface_clk);
/* Turn OFF M-PHY RMMI interface clocks */ /* Turn OFF M-PHY RMMI interface clocks */
void ufs_qcom_phy_disable_iface_clk(struct phy *generic_phy) void ufs_qcom_phy_disable_iface_clk(struct phy *generic_phy)
@ -562,6 +567,7 @@ void ufs_qcom_phy_disable_iface_clk(struct phy *generic_phy)
phy->is_iface_clk_enabled = false; phy->is_iface_clk_enabled = false;
} }
} }
EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_iface_clk);
int ufs_qcom_phy_start_serdes(struct phy *generic_phy) int ufs_qcom_phy_start_serdes(struct phy *generic_phy)
{ {
@ -578,6 +584,7 @@ int ufs_qcom_phy_start_serdes(struct phy *generic_phy)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(ufs_qcom_phy_start_serdes);
int ufs_qcom_phy_set_tx_lane_enable(struct phy *generic_phy, u32 tx_lanes) int ufs_qcom_phy_set_tx_lane_enable(struct phy *generic_phy, u32 tx_lanes)
{ {
@ -595,6 +602,7 @@ int ufs_qcom_phy_set_tx_lane_enable(struct phy *generic_phy, u32 tx_lanes)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(ufs_qcom_phy_set_tx_lane_enable);
void ufs_qcom_phy_save_controller_version(struct phy *generic_phy, void ufs_qcom_phy_save_controller_version(struct phy *generic_phy,
u8 major, u16 minor, u16 step) u8 major, u16 minor, u16 step)
@ -605,6 +613,7 @@ void ufs_qcom_phy_save_controller_version(struct phy *generic_phy,
ufs_qcom_phy->host_ctrl_rev_minor = minor; ufs_qcom_phy->host_ctrl_rev_minor = minor;
ufs_qcom_phy->host_ctrl_rev_step = step; ufs_qcom_phy->host_ctrl_rev_step = step;
} }
EXPORT_SYMBOL_GPL(ufs_qcom_phy_save_controller_version);
int ufs_qcom_phy_calibrate_phy(struct phy *generic_phy, bool is_rate_B) int ufs_qcom_phy_calibrate_phy(struct phy *generic_phy, bool is_rate_B)
{ {
@ -625,6 +634,7 @@ int ufs_qcom_phy_calibrate_phy(struct phy *generic_phy, bool is_rate_B)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(ufs_qcom_phy_calibrate_phy);
int ufs_qcom_phy_remove(struct phy *generic_phy, int ufs_qcom_phy_remove(struct phy *generic_phy,
struct ufs_qcom_phy *ufs_qcom_phy) struct ufs_qcom_phy *ufs_qcom_phy)
@ -662,6 +672,7 @@ int ufs_qcom_phy_is_pcs_ready(struct phy *generic_phy)
return ufs_qcom_phy->phy_spec_ops-> return ufs_qcom_phy->phy_spec_ops->
is_physical_coding_sublayer_ready(ufs_qcom_phy); is_physical_coding_sublayer_ready(ufs_qcom_phy);
} }
EXPORT_SYMBOL_GPL(ufs_qcom_phy_is_pcs_ready);
int ufs_qcom_phy_power_on(struct phy *generic_phy) int ufs_qcom_phy_power_on(struct phy *generic_phy)
{ {

View File

@ -98,6 +98,7 @@ static int rockchip_usb_phy_probe(struct platform_device *pdev)
struct device_node *child; struct device_node *child;
struct regmap *grf; struct regmap *grf;
unsigned int reg_offset; unsigned int reg_offset;
int err;
grf = syscon_regmap_lookup_by_phandle(dev->of_node, "rockchip,grf"); grf = syscon_regmap_lookup_by_phandle(dev->of_node, "rockchip,grf");
if (IS_ERR(grf)) { if (IS_ERR(grf)) {
@ -129,6 +130,11 @@ static int rockchip_usb_phy_probe(struct platform_device *pdev)
return PTR_ERR(rk_phy->phy); return PTR_ERR(rk_phy->phy);
} }
phy_set_drvdata(rk_phy->phy, rk_phy); phy_set_drvdata(rk_phy->phy, rk_phy);
/* only power up usb phy when it use, so disable it when init*/
err = rockchip_usb_phy_power(rk_phy, 1);
if (err)
return err;
} }
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);

View File

@ -54,6 +54,13 @@ static const struct usb_device_id usb_quirk_list[] = {
{ USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT }, { USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT },
{ USB_DEVICE(0x046d, 0x0843), .driver_info = USB_QUIRK_DELAY_INIT }, { USB_DEVICE(0x046d, 0x0843), .driver_info = USB_QUIRK_DELAY_INIT },
/* Logitech ConferenceCam CC3000e */
{ USB_DEVICE(0x046d, 0x0847), .driver_info = USB_QUIRK_DELAY_INIT },
{ USB_DEVICE(0x046d, 0x0848), .driver_info = USB_QUIRK_DELAY_INIT },
/* Logitech PTZ Pro Camera */
{ USB_DEVICE(0x046d, 0x0853), .driver_info = USB_QUIRK_DELAY_INIT },
/* Logitech Quickcam Fusion */ /* Logitech Quickcam Fusion */
{ USB_DEVICE(0x046d, 0x08c1), .driver_info = USB_QUIRK_RESET_RESUME }, { USB_DEVICE(0x046d, 0x08c1), .driver_info = USB_QUIRK_RESET_RESUME },
@ -78,6 +85,12 @@ static const struct usb_device_id usb_quirk_list[] = {
/* Philips PSC805 audio device */ /* Philips PSC805 audio device */
{ USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME }, { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME },
/* Plantronic Audio 655 DSP */
{ USB_DEVICE(0x047f, 0xc008), .driver_info = USB_QUIRK_RESET_RESUME },
/* Plantronic Audio 648 USB */
{ USB_DEVICE(0x047f, 0xc013), .driver_info = USB_QUIRK_RESET_RESUME },
/* Artisman Watchdog Dongle */ /* Artisman Watchdog Dongle */
{ USB_DEVICE(0x04b4, 0x0526), .driver_info = { USB_DEVICE(0x04b4, 0x0526), .driver_info =
USB_QUIRK_CONFIG_INTF_STRINGS }, USB_QUIRK_CONFIG_INTF_STRINGS },

View File

@ -159,8 +159,10 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
bd_table->start_bd = dma_pool_alloc(bdc->bd_table_pool, bd_table->start_bd = dma_pool_alloc(bdc->bd_table_pool,
GFP_ATOMIC, GFP_ATOMIC,
&dma); &dma);
if (!bd_table->start_bd) if (!bd_table->start_bd) {
kfree(bd_table);
goto fail; goto fail;
}
bd_table->dma = dma; bd_table->dma = dma;

View File

@ -472,7 +472,7 @@ static int chaoskey_rng_read(struct hwrng *rng, void *data,
if (this_time > max) if (this_time > max)
this_time = max; this_time = max;
memcpy(data, dev->buf, this_time); memcpy(data, dev->buf + dev->used, this_time);
dev->used += this_time; dev->used += this_time;

View File

@ -476,6 +476,11 @@ static const struct of_device_id usbhs_of_match[] = {
.compatible = "renesas,usbhs-r8a7794", .compatible = "renesas,usbhs-r8a7794",
.data = (void *)USBHS_TYPE_RCAR_GEN2, .data = (void *)USBHS_TYPE_RCAR_GEN2,
}, },
{
/* Gen3 is compatible with Gen2 */
.compatible = "renesas,usbhs-r8a7795",
.data = (void *)USBHS_TYPE_RCAR_GEN2,
},
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, usbhs_of_match); MODULE_DEVICE_TABLE(of, usbhs_of_match);
@ -493,7 +498,7 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
return NULL; return NULL;
dparam = &info->driver_param; dparam = &info->driver_param;
dparam->type = of_id ? (u32)of_id->data : 0; dparam->type = of_id ? (uintptr_t)of_id->data : 0;
if (!of_property_read_u32(dev->of_node, "renesas,buswait", &tmp)) if (!of_property_read_u32(dev->of_node, "renesas,buswait", &tmp))
dparam->buswait_bwait = tmp; dparam->buswait_bwait = tmp;
gpio = of_get_named_gpio_flags(dev->of_node, "renesas,enable-gpio", 0, gpio = of_get_named_gpio_flags(dev->of_node, "renesas,enable-gpio", 0,

View File

@ -157,7 +157,7 @@ struct renesas_usbhs_driver_param {
*/ */
int pio_dma_border; /* default is 64byte */ int pio_dma_border; /* default is 64byte */
u32 type; uintptr_t type;
u32 enable_gpio; u32 enable_gpio;
/* /*