[go: nahoru, domu]

History log of /drivers/usb/dwc3/dwc3-pci.c
Revision Date Author Comments
7d643664ea559b36188cae264047ce3c9bfec3a2 24-Sep-2014 Alan Cox <alan@linux.intel.com> usb: dwc3: pci: Add PCI ID for Intel Braswell

The device controller is the same but it has different PCI ID. Add this new
ID to the driver's list of supported IDs.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
734d5a5393ed8eedf70f13c7078cb4a6134f49f2 16-Jul-2014 Jingoo Han <jg1.han@samsung.com> usb: dwc3: remove unnecessary OOM messages

The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
f1c7e7108109bfa12ad4544dce5cdcbf3c6f0a0a 15-May-2014 Andy Shevchenko <andriy.shevchenko@linux.intel.com> usb: dwc3: convert to pcim_enable_device()

This fixes a bug when dwc3_pci_register_phys() fails and leaves device enabled.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
b09e99ee7c2b7ee80cca128b93b07fb830e6ecad 15-May-2014 Andy Shevchenko <andriy.shevchenko@linux.intel.com> usb: dwc3: no need to initialize ret variable

First usage of ret variable will re-write initial value. Thus, there is no need
to initialize it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
d7078df6be6e9e5e3ac354859f5b8d60114391b4 16-Apr-2014 Felipe Balbi <balbi@ti.com> usb: phy: rename <linux/usb/usb_phy_gen_xceiv.h> to <linux/usb/usb_phy_generic.h>

now that all functions match the driver name,
the only missing piece is to rename the header
file itself.

Signed-off-by: Felipe Balbi <balbi@ti.com>
4525beeb9aadbb9e1cb3e9e135f4371553f26a70 16-Apr-2014 Felipe Balbi <balbi@ti.com> usb: phy: rename usb_nop_xceiv to usb_phy_generic

no functional changes, just renaming the function
in order to make it slightly clearer what it should
be used for, also matching the driver name.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13518673f1419f2667985a6fca4543e44143408b 18-Dec-2013 Heikki Krogerus <heikki.krogerus@linux.intel.com> usb: dwc3: fix the glue drivers using the nop phy

The reset_gpio member of the usb_phy_gen_xceiv_platform_data
structure needs the have negative value or phy-generic's
probe will fail unless DT is used. 0 is a valid gpio number.

This fixes an issue where phy-generic fails to probe with
message: "usb_phy_gen_xceiv.0: Error requesting RESET GPIO 0".

Cc: <stable@vger.kernel.org>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
782df20c5f2ad45bd453e1f0fb58a49f251845b4 28-Nov-2013 Jingoo Han <jg1.han@samsung.com> usb: dwc3: pci: remove DEFINE_PCI_DEVICE_TABLE macro

Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2fd3f65132958e9ec95563cc981cc1ffca2b81a0 03-Dec-2013 Jingoo Han <jg1.han@samsung.com> USB: remove DEFINE_PCI_DEVICE_TABLE macro

Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
161bfa98ba6f5b8970234e4392de1f5df4062452 20-Sep-2013 Sachin Kamat <sachin.kamat@linaro.org> usb: dwc3: Remove redundant pci_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
85601f8cf67c56a561a6dd5e130e65fdc179047d 26-Sep-2013 David Cohen <david.a.cohen@linux.intel.com> usb: dwc3: add support for Merrifield

Add PCI id for Intel Merrifield

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
b85862654cdd9bfa71eb68ea8f672aa4fef15d22 20-Sep-2013 Sachin Kamat <sachin.kamat@linaro.org> usb: dwc3: Remove redundant pci_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
b62cd96de3161dfb125a769030eec35a4cab3d3a 17-Sep-2013 Heikki Krogerus <heikki.krogerus@linux.intel.com> usb: dwc3: pci: add support for BayTrail

Add PCI id for Intel BayTrail.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
3fa4d7344be0afebd80382ffeea6b1787cccf971 26-Jul-2013 Sebastian Andrzej Siewior <bigeasy@linutronix.de> usb: phy: rename nop_usb_xceiv => usb_phy_gen_xceiv

The "nop" driver isn't a do-nothing-stub but supports a couple functions
like clock on/off or is able to use a voltage regulator. This patch
simply renames the driver to "generic" since it is easy possible to
extend it by a simple function istead of writing a complete driver.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
fb74d282d29dbb39ef20211a9cf2883f9f593bdd 02-Aug-2013 Jingoo Han <jg1.han@samsung.com> usb: dwc3: pci: add CONFIG_PM_SLEEP to suspend/resume functions

Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
build warning when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
when the CONFIG_PM_SLEEP is enabled. Unnecessary CONFIG_PM ifdefs
are removed.

drivers/usb/dwc3/dwc3-pci.c:215:12: warning: 'dwc3_pci_suspend' defined but not used [-Wunused-function]
drivers/usb/dwc3/dwc3-pci.c:224:12: warning: 'dwc3_pci_resume' defined but not used [-Wunused-function]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
5945f789c864d8676b297880cc6961fea4511a7a 30-Jun-2013 Felipe Balbi <balbi@ti.com> usb: dwc3: switch to GPL v2 only

This is a Linux-only driver which makes use
of GPL-only symbols. It makes no sense to
maintain Dual BSD/GPL licensing for this driver.

Considering that the amount of work to use this
driver in any different operating system would likely
be as large as developing the driver from scratch and
considering that we depend on GPL-only symbols, we
will switch over to a GPL v2-only license.

Cc: Anton Tikhomirov <av.tikhomirov@samsung.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
f016a16d8c1f6cd0567a88d0a5843aab385e969a 30-May-2013 Yijing Wang <wangyijing@huawei.com> usb: dwc3: remove redundant D0 power state set

Pci_enable_device() will set device power state to D0,
so it's no need to do it again in dwc3_pci_probe().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
f28c42c576b293b3a1daaed8ca2775ebc2fe5398 24-May-2013 Peter Chen <peter.chen@freescale.com> usb: dwc3: pci: PHY should be deleted later than dwc3 core

If the glue layer is removed first (core layer later),
it deletes the phy device first, then the core device.
But at core's removal, it still uses PHY's resources, it may
cause kernel's oops. It is much like the problem
Paul Zimmerman reported at:
http://marc.info/?l=linux-usb&m=136547502011472&w=2.

Besides, it is reasonable the PHY is deleted at last as
the controller is the PHY's user.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
68907a77431f405c0e8e7031aa77aae03383c69d 11-Feb-2013 Felipe Balbi <balbi@ti.com> usb: dwc3: pci: add basic suspend/resume support

this patch adds basic PM support for the
PCI glue layer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
d82f3e3cd88053836a2dd928b5545873cbdcf7da 12-Feb-2013 Felipe Balbi <balbi@ti.com> usb: dwc3: glue layers shouldn't know about the core IP

remove inclusion of "core.h" from all glue
layers as they don't need to know details
about the core IP.

Signed-off-by: Felipe Balbi <balbi@ti.com>
fb4e98ab63433c4d3a1588ea91c73f1cd7ebaa00 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> usb: remove use of __devexit

CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Li Yang <leoli@freescale.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
41ac7b3ab7fe1d6175839947a877fdf95cbd2211 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> usb: remove use of __devinit

CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Li Yang <leoli@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Geoff Levand <geoff@infradead.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Olav Kongas <ok@artecdesign.ee>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7690417db5085f0de03aa70b8ca01b0118e8a1b4 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> usb: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Li Yang <leoli@freescale.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
124dafde8f8174caf5cef1c3eaba001657d66f4f 29-Oct-2012 Sebastian Andrzej Siewior <bigeasy@linutronix.de> usb: dwc3: remove custom unique id handling

The lockless implementation of the unique id is quite impressive (:P)
but dirver's core can handle it, we can remove it and make our code a
little smaller.

Cc: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
e3ec3eb79481d23b7d371b6e9567e2b6972efc92 19-Jul-2012 Felipe Balbi <balbi@ti.com> usb: dwc3: pci: add nop transceiver support

We will be adding support for transceivers on
dwc3 driver but not all boards have controllable
transceivers.

For those which don't provide controllable transceivers
we will register nop transceivers.

Signed-off-by: Felipe Balbi <balbi@ti.com>
28f1a0d946774edc77c33ab62a564aa34828472d 12-Mar-2012 Felipe Balbi <balbi@ti.com> usb: dwc3: pci: fix another failure path in dwc3_pci_probe()

When applying commit 7d26b58 (fix failure path in
dwc3_pci_probe()), I mistakenly left out one of the
possible failures where we would return success even
on the error case.

This patch fixes that mistake.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7d26b58735f5badf2b7ce3320c6ba21b603c77a9 25-Feb-2012 Paul Zimmerman <Paul.Zimmerman@synopsys.com> usb: dwc3: pci: fix failure path in dwc3_pci_probe()

dwc3_pci_probe() would return success even if the calls to
dwc3_get_device_id() or platform_device_alloc() fail, fix that.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
1d046793958f128dd43d42a4a0dac48bf6914273 16-Feb-2012 Paul Zimmerman <Paul.Zimmerman@synopsys.com> usb: dwc3: clean up whitespace damage, typos, missing parens, etc.

trivial patch, no functional changes

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
802ca85067e11cdeddeb34ef53de03e5a7d509da 15-Feb-2012 Chanho Park <chanho61.park@samsung.com> usb: dwc3: use devm_xxx functions

This patch enables to use devm_xxx functions during probing driver.
The devm_xxx series functions are able to release resource when the
driver is detatched. We can remove several codes to release resources
in the probe function.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
956563362be8ac7ce084b00825168be1adfb29ee 18-Nov-2011 Greg Kroah-Hartman <gregkh@suse.de> DWC3: use module_pci_driver

This cuts down on the boilerplate code.

Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5632c827cbd3617613530ba0e99344192d0a31ca 23-Dec-2011 Julia Lawall <julia@diku.dk> drivers/usb/dwc3/dwc3-pci.c: introduce missing kfree

Glue needs to be freed on exiting the function in an error case.
Furthermore, pci, which is the first argument to the probe function should
not be freed before leaveing the function, as it is reused at the call
site. So the free of pci is changed to free glue instead.

A simplified version of the semantic match that finds the problem is as
follows: (http://coccinelle.lip6.fr)

// <smpl>
@r exists@
local idexpression x;
statement S;
identifier f1;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
when != if (...) { <+...x...+> }
x->f1
...>
(
return \(0\|<+...x...+>\|ptr\);
|
return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
8300dd236e957429acfb36be0ce8fe276dbe823c 18-Oct-2011 Felipe Balbi <balbi@ti.com> usb: dwc3: move dwc3 device ID bitmap to core.c

if we want to support situations where we have
both SoC and PCIe versions of the IP on the same
platform, we need to have sequential numbers between
them, otherwise we will still have name collisions.

Because of that, we need to move dwc3_get/put_device_id()
to core.c and export that symbol to be used by glue
layers.

Signed-off-by: Felipe Balbi <balbi@ti.com>
0949e99b05736946cf0ac78e37194be0807e497e 12-Oct-2011 Felipe Balbi <balbi@ti.com> usb: dwc3: fetch mode of operation from HW

There's no need to add driver_data for something
we can fetch from HW.

This also makes our id_table unnecessary - at least
for now -, so we also remove it on the same patch.

Signed-off-by: Felipe Balbi <balbi@ti.com>
49a25cc9a7effe2993e65229c2ea0be726919bcf 30-Sep-2011 Sebastian Andrzej Siewior <bigeasy@linutronix.de> usb: dwc: remove "All rights reserved" statement.

Some people think that this line is not compatible with the GPL. The
statement was required due to the Buenos Aires Convention and is now
deprecated. I remove it because it is said that it is pointless nowdays.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
46a57283e86c68351377ac3349f1465aee938fbd 23-Aug-2011 Stephen Rothwell <sfr@canb.auug.org.au> usb: include module.h in the DesignWare USB3 DRD driver

Fixes this build error:

drivers/usb/dwc3/dwc3-pci.c: In function 'dwc3_pci_init':
drivers/usb/dwc3/dwc3-pci.c:211:9: error: 'THIS_MODULE' undeclared (first use in this function)

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
72246da40f3719af3bfd104a2365b32537c27d83 19-Aug-2011 Felipe Balbi <balbi@ti.com> usb: Introduce DesignWare USB3 DRD Driver

The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.

Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.

The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.

More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.

While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.

[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>