History log of /linux-master/drivers/usb/dwc3/dwc3-exynos.c
Revision Date Author Comments
# 592d7a46 18-Aug-2023 Sam Protsenko <semen.protsenko@linaro.org>

usb: dwc3: exynos: Add support for Exynos850 variant

Add Exynos850 compatible string and associated driver data. Only two
clocks are needed for this SoC:
- bus_early: bus clock needed for registers access
- ref: USB 2.0 DRD reference clock (50 MHz)

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230819031731.22618-4-semen.protsenko@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8257d5f5 17-May-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

usb: dwc3-exynos: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart from
emitting a warning) and this typically results in resource leaks. To improve
here there is a quest to make the remove callback return void. In the first
step of this quest all drivers are converted to .remove_new() which already
returns void. Eventually after all drivers are converted, .remove_new() is
renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20230517230239.187727-15-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e0481e5b 10-Nov-2022 Marek Szyprowski <m.szyprowski@samsung.com>

usb: dwc3: exynos: Fix remove() function

The core DWC3 device node was not properly removed by the custom
dwc3_exynos_remove_child() function. Replace it with generic
of_platform_depopulate() which does that job right.

Fixes: adcf20dcd262 ("usb: dwc3: exynos: Use of_platform API to create dwc3 core pdev")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: stable@vger.kernel.org
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Link: https://lore.kernel.org/r/20221110154131.2577-1-m.szyprowski@samsung.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 048b14e1 29-Mar-2021 Aditya Srivastava <yashsri421@gmail.com>

usb: dwc3: exynos: fix incorrect kernel-doc comment syntax

The opening comment mark '/**' is used for highlighting the beginning of
kernel-doc comments.
The header for drivers/usb/dwc3/dwc3-exynos.c follows this syntax, but the
content inside does not comply with kernel-doc.

This line was probably not meant for kernel-doc parsing, but is parsed
due to the presence of kernel-doc like comment syntax(i.e, '/**'), which
causes unexpected warning from kernel-doc:
"warning: expecting prototype for dwc3(). Prototype was for DWC3_EXYNOS_MAX_CLOCKS() instead"

Provide a simple fix by replacing this occurrence with general comment
format, i.e. '/*', to prevent kernel-doc from parsing it.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Aditya Srivastava <yashsri421@gmail.com>
Link: https://lore.kernel.org/r/20210329140318.27742-1-yashsri421@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ad38beb3 23-Jun-2020 Anand Moon <linux.amoon@gmail.com>

Revert "usb: dwc3: exynos: Add support for Exynos5422 suspend clk"

This reverts commit 07f6842341abe978e6375078f84506ec3280ece5.

Since SCLK_SCLK_USBD300 suspend clock need to be configured
for phy module, I wrongly mapped this clock to DWC3 code.

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Cc: stable <stable@vger.kernel.org>
Fixes: 07f6842341ab ("usb: dwc3: exynos: Add support for Exynos5422 suspend clk")
Link: https://lore.kernel.org/r/20200623074637.756-1-linux.amoon@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cd37c697 23-Jun-2020 Anand Moon <linux.amoon@gmail.com>

Revert "usb: dwc3: exynos: Add support for Exynos5422 suspend clk"

This reverts commit 07f6842341abe978e6375078f84506ec3280ece5.

Since SCLK_SCLK_USBD300 suspend clock need to be configured
for phy module, I wrongly mapped this clock to DWC3 code.

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>


# 07f68423 10-Mar-2020 Anand Moon <linux.amoon@gmail.com>

usb: dwc3: exynos: Add support for Exynos5422 suspend clk

Exynos5422 DWC3 module support two clk USBD300 and SCLK_USBD300
so add missing code to enable/disable code and suspend clk, for this
add a new compatible samsung,exynos5420-dwusb3 to help configure
dwc3 code and dwc3 suspend clock. Suspend clock controls the PHY power
change from P0 to P1/P2/P3 during U0 to U1/U2/U3 transition.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>


# dea7b202 04-Jan-2020 Krzysztof Kozlowski <krzk@kernel.org>

usb: exynos: Rename Samsung and Exynos to lowercase

Fix up inconsistent usage of upper and lowercase letters in "Samsung"
and "Exynos" names.

"SAMSUNG" and "EXYNOS" are not abbreviations but regular trademarked
names. Therefore they should be written with lowercase letters starting
with capital letter.

The lowercase "Exynos" name is promoted by its manufacturer Samsung
Electronics Co., Ltd., in advertisement materials and on website.

Although advertisement materials usually use uppercase "SAMSUNG", the
lowercase version is used in all legal aspects (e.g. on Wikipedia and in
privacy/legal statements on
https://www.samsung.com/semiconductor/privacy-global/).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200104152107.11407-9-krzk@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 512e6fb5 21-Jan-2019 Alexey Khoroshilov <khoroshilov@ispras.ru>

usb: dwc3: exynos: Fix error handling of clk_prepare_enable

If clk_prepare_enable() fails in dwc3_exynos_probe() or in
dwc3_exynos_resume(), exynos->clks[0] is left undisabled
because of usage preincrement in while condition.

Found by Linux Driver Verification project (linuxtesting.org).

Fixes: 9f2168367a0a ("usb: dwc3: exynos: Rework clock handling and prepare for new variants")
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# 4c19cc14 18-Sep-2018 Marek Szyprowski <m.szyprowski@samsung.com>

usb: dwc3: exynos: Add support for Exynos5433 variant with all clocks

DWC3 variant found in Exynos5433 SoCs requires keeping all DRD30/UHOST30
clocks enabled all the time the driver does any access to DWC3 registers,
otherwise external abort happens. So far DWC3 hardware module worked with
samsung,exynos5250-dwusb3 compatible only by luck when built into kernel:
all DRD30 clocks were left enabled by bootloader and later kept enabled
by the DRD PHY driver. However, if one tried to use Exnos DWC3 driver as
a module or performed system suspend/resume cycle, external abort
happened. This patch finally fixes this issue.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# 9f216836 18-Sep-2018 Marek Szyprowski <m.szyprowski@samsung.com>

usb: dwc3: exynos: Rework clock handling and prepare for new variants

Add per-variant list of clocks and manage them all together in
the single array. This is a preparation for adding new variants
of Exynos SoCs. No functional changes for existing Exynos SoCs.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# 1e041b6f 18-Sep-2018 Marek Szyprowski <m.szyprowski@samsung.com>

usb: dwc3: exynos: Remove dead code

All supported Exynos variants provide respective generic PHY framework
based drivers for controlling USB PHYs, so there is no point
creating fake USB PHYs based on platform devices. While removing useless
code, remove calls to runtime PM, which have no effect.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# b5ea4757 06-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: dwc3: Remove redundant license text

Now that the SPDX tag is in all USB files, that identifies the license
in a specific and legally-defined manner. So the extra GPL text wording
can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5fd54ace 03-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: add SPDX identifiers to all remaining files in drivers/usb/

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the drivers/usb/ and include/linux/usb* files with the correct
SPDX license identifier based on the license text in the file itself.
The SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ece7af5f 12-Jun-2017 Arvind Yadav <arvind.yadav.cs@gmail.com>

usb: dwc3: exynos: Handle return value of clk_prepare_enable

clk_prepare_enable() can fail here and we must check its return value.

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# 3a932b0f 30-Jan-2017 Shuah Khan <shuah@kernel.org>

usb: dwc3: exynos: change goto labels to meaningful names

Change goto labels to meaningful names from a series of errNs.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# 0e4018ff 12-Jan-2017 Javier Martinez Canillas <javier@osg.samsung.com>

usb: dwc3: exynos: Remove MODULE_ALIAS()

Exynos is DT-only, so there's no need for a platform MODALIAS.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# 3e27b3f6 10-Jan-2017 Shuah Khan <shuah@kernel.org>

usb: dwc3: exynos remove suspend clock unspecified debug message

dwc3-exynos prints debug message when suspend clock is not specified.
The suspend clock is optional and driver can work without it.

This debug message doesn't add any value and leads to confusion and
concern. Remove it.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# 8ae584d1 10-Jan-2017 Shuah Khan <shuah@kernel.org>

usb: dwc3: exynos fix axius clock error path to do cleanup

Axius clock error path returns without disabling clock and suspend clock.
Fix it to disable them before returning error.

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# 8c9f2de4 17-Nov-2016 Arnd Bergmann <arnd@arndb.de>

usb: dwc3: Do not set dma coherent mask

The dma mask is correctly set up by the DT probe function, no
need to override it any more.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# 4879efb3 24-May-2016 Steinar H. Gunderson <sesse@google.com>

usb: dwc3: exynos: Fix deferred probing storm.

dwc3-exynos has two problems during init if the regulators are slow
to come up (for instance if the I2C bus driver is not on the initramfs)
and return probe deferral. First, every time this happens, the driver
leaks the USB phys created; they need to be deallocated on error.

Second, since the phy devices are created before the regulators fail,
this means that there's a new device to re-trigger deferred probing,
which causes it to essentially go into a busy loop of re-probing the
device until the regulators come up.

Move the phy creation to after the regulators have succeeded, and also
fix cleanup on failure. On my ODROID XU4 system (with Debian's initramfs
which doesn't contain the I2C driver), this reduces the number of probe
attempts (for each of the two controllers) from more than 2000 to eight.

Signed-off-by: Steinar H. Gunderson <sesse@google.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Vivek Gautam <gautam.vivek@samsung.com>
Fixes: d720f057fda4 ("usb: dwc3: exynos: add nop transceiver support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# 42f69a02 29-Jun-2015 Felipe Balbi <balbi@ti.com>

usb: dwc3: exynos: switch dev_dbg() to dev_info()

that message is informing that the clock is missing.
However, that's a valid condition for some setups; driver
even ignores the error and continues just fine.

Signed-off-by: Felipe Balbi <balbi@ti.com>


# ed692a99 21-Nov-2014 Vivek Gautam <gautam.vivek@samsung.com>

usb: dwc3: exynos: Add provision for AXI UpScaler clock on exynos7

DWC3 controller on Exynos7 SoC has separate control for
AXI UpScaler which connects DWC3 DRD controller to AXI bus.
Get the gate clock for the same to control it across power
cycles.

Suggested-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# 72d996fc 21-Nov-2014 Vivek Gautam <gautam.vivek@samsung.com>

usb: dwc3: exynos: Add provision for suspend clock

DWC3 controller on Exynos SoC series have separate control for
suspend clock which replaces pipe3_rx_pclk as clock source to
a small part of DWC3 core that operates when SS PHY is in its
lowest power state (P3) in states SS.disabled and U3.

Suggested-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# c1a3acaa 21-Nov-2014 Vivek Gautam <gautam.vivek@samsung.com>

usb: dwc3: exynos: Remove local variable for clock from probe

There's no need to keep one local variable for clock, and
then assign the same to 'clk' member of dwc3_exynos.
Just cleaning it up.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# b4c9f578 03-Nov-2014 Jingoo Han <jg1.han@samsung.com>

usb: dwc3: exynos: remove non-DT support for Exynos Specific Glue layer

DWC3 Exynos Specific Glue layer can be used only for Exynos SoCs.
In addition, non-DT for EXYNOS SoCs is not supported from v3.11;
thus, there is no need to support non-DT for DWC3 Exynos Specific
Glue layer.

The 'linux/platform_data/dwc3-exynos.h' file has been used for
non-DT support. Thus, the 'dwc3-exynos.h' file is removed, because
it is not used anymore.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# 734d5a53 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>


# b09e99ee 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>


# bd8ce544 21-Apr-2014 Vivek Gautam <gautam.vivek@samsung.com>

usb: dwc3: exynos: Make provision for vdd regulators

Facilitate getting required 3.3V and 1.0V VDD supply for
DWC3 controller on Exynos.

With patches for regulators' nodes merged in 3.15:
c8c253f ARM: dts: Add regulator entries to smdk5420
275dcd2 ARM: dts: add max77686 pmic node for smdk5250,

certain perripherals will now need to ensure that,
they request VDD regulators in their drivers, and enable
them so as to make them working.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Cc: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# d7078df6 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>


# 4525beeb 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>


# 13518673 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>


# e1fd7341 26-Jun-2013 Russell King <rmk+kernel@arm.linux.org.uk>

DMA-API: usb: use new dma_coerce_mask_and_coherent()

Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 22d9d8e8 10-Jun-2013 Russell King <rmk+kernel@arm.linux.org.uk>

DMA-API: usb: use dma_set_coherent_mask()

The correct way for a driver to specify the coherent DMA mask is
not to directly access the field in the struct device, but to use
dma_set_coherent_mask(). Only arch and bus code should access this
member directly.

Convert all direct write accesses to using the correct API.

Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 3fa4d734 25-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>


# 5945f789 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>


# 022d0547 24-May-2013 Peter Chen <peter.chen@freescale.com>

usb: dwc3: exynos: 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>


# 3b9561e9 07-May-2013 Stephen Warren <swarren@nvidia.com>

USB: set device dma_mask without reference to global data

Many USB host drivers contain code such as:

if (!pdev->dev.dma_mask)
pdev->dev.dma_mask = &tegra_ehci_dma_mask;

... where tegra_ehci_dma_mask is a global. I suspect this code originated
in commit 4a53f4e "USB: ehci-tegra: add probing through device tree" and
was simply copied everywhere else.

This works fine when the code is built-in, but can cause a crash when the
code is in a module. The first module load sets up the dma_mask pointer,
but if the module is removed and re-inserted, the value is now non-NULL,
and hence is not updated to point at the new location, and hence points
at a stale location within the previous module load address, which in
turn causes a crash if the pointer is de-referenced.

The simplest way of solving this seems to be to copy the code from
ehci-platform.c, which uses the coherent_dma_mask as the target for the
dma_mask pointer.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 19fda7cd 25-Mar-2013 Jingoo Han <jg1.han@samsung.com>

usb: dwc3: 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/core.c:682:12: warning: 'dwc3_suspend' defined but not used [-Wunused-function]
drivers/usb/dwc3/core.c:709:12: warning: 'dwc3_resume' defined but not used [-Wunused-function]
drivers/usb/dwc3/dwc3-omap.c:430:12: warning: 'dwc3_omap_suspend' defined but not used [-Wunused-function]
drivers/usb/dwc3/dwc3-omap.c:440:12: warning: 'dwc3_omap_resume' defined but not used [-Wunused-function]
drivers/usb/dwc3/dwc3-exynos.c:185:12: warning: 'dwc3_exynos_suspend' defined but not used [-Wunused-function]
drivers/usb/dwc3/dwc3-exynos.c:194:12: warning: 'dwc3_exynos_resume' defined but not used [-Wunused-function]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# ddb5147c 14-Mar-2013 Vivek Gautam <gautam.vivek@samsung.com>

usb: dwc3: exynos: use clk_prepare_enable and clk_disable_unprepare

Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
CC: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# adcf20dc 14-Mar-2013 Vivek Gautam <gautam.vivek@samsung.com>

usb: dwc3: exynos: Use of_platform API to create dwc3 core pdev

Used of_platform_populate() to create dwc3 core platform_device
from device tree data. Additionally some cleanup is also done.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
CC: Felipe Balbi <balbi@ti.com>
CC: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# 0646caf7 16-Oct-2012 Vikas Sajjan <vikas.sajjan@linaro.org>

usb: dwc3: exynos: add basic suspend/resume support

Adds suspend and resume callbacks to exynos dwc3 driver as part of
power management support.

This change does gating of dwc3 clock during suspend/resume cycles.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Vikas C Sajjan <vikas.sajjan@linaro.org>
CC: Doug Anderson <dianders@chromium.org>
Tested-by: Vivek Gautam <gautam.vivek@samsung.com>

[ balbi@ti.com : refreshed to current linus/master ]

Signed-off-by: Felipe Balbi <balbi@ti.com>


# d82f3e3c 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>


# b0e45ddb 25-Jan-2013 Vivek Gautam <gautam.vivek@samsung.com>

usb: dwc3: exynos/omap: Change platform device IDs for no_op_xceive to AUTO

Multiple dwc3 probe calls try to allocate no_op_xceive platform
device. Having static IDs for these will throw sysfs error -EEXIST.
Changing these static platform device IDs to AUTO to enable
multiple dwc3 controller support on a SoC.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# fe29db8f 24-Jan-2013 Vivek Gautam <gautam.vivek@samsung.com>

usb: dwc3: exynos: fix compatible strings for the device

Using specific chip in compatible strings. Newer SOCs can claim
device by using older string in the compatible list.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# 20b97dc1 12-Nov-2012 Jingoo Han <jg1.han@samsung.com>

usb: dwc3: exynos: use devm_ functions

The devm_ functions allocate memory that is released when a driver
detaches. This makes the code smaller and a bit simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# fb4e98ab 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>


# 41ac7b3a 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>


# 7690417d 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>


# 7947699a 03-Nov-2012 Vivek Gautam <gautam.vivek@samsung.com>

usb: dwc3: exynos: remove platform data support

We are removing plat data which was used till now to init and
exit phy. We no longer need this since dwc3-core takes care of
initializing and shutting-down the phy using usb_phy_init()
and usb_phy_shutdown().

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# accefdd4 03-Nov-2012 Vivek Gautam <gautam.vivek@samsung.com>

usb: dwc3: exynos: add support for device tree

This patch adds support to parse probe data for
dwc3-exynos driver using device tree.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# 124dafde 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>


# d720f057 19-Jul-2012 Felipe Balbi <balbi@ti.com>

usb: dwc3: exynos: 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>


# 45c396ce 18-Jun-2012 Sachin Kamat <sachin.kamat@linaro.org>

usb: dwc3: Remove duplicate header file inclusion

module.h header file was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# d28a9689 15-Feb-2012 Anton Tikhomirov <av.tikhomirov@samsung.com>

usb: dwc3: Add Exynos Specific Glue layer

Adds Exynos Specific Glue layer to support USB peripherals
on Samsung Exynos5 chips.

[ balbi@ti.com : prevent compilation of Exynos glue layer
on platforms which don't provide clk API implementation ]

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>