Commit 165f6064 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'usb-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:

usb: patches for v3.12 merge window

All patches here have been pending on linux-usb
and sitting in linux-next for a while now.

The biggest things in this tag are:

DWC3 learned proper usage of threaded IRQ
handlers and now we spend very little time
in hardirq context.

MUSB now has proper support for BeagleBone and
Beaglebone Black.

Tegra's USB support also got quite a bit of love
and is learning to use PHY layer and generic DT
attributes.

Other than that, the usual pack of cleanups and
non-critical fixes follow.
Signed-of-by: default avatarFelipe Balbi <balbi@ti.com>

Conflicts:
	drivers/usb/gadget/udc-core.c
	drivers/usb/host/ehci-tegra.c
	drivers/usb/musb/omap2430.c
	drivers/usb/musb/tusb6010.c
parents c23bda36 8b841cb2
...@@ -3,10 +3,12 @@ synopsys DWC3 CORE ...@@ -3,10 +3,12 @@ synopsys DWC3 CORE
DWC3- USB3 CONTROLLER DWC3- USB3 CONTROLLER
Required properties: Required properties:
- compatible: must be "synopsys,dwc3" - compatible: must be "snps,dwc3"
- reg : Address and length of the register set for the device - reg : Address and length of the register set for the device
- interrupts: Interrupts used by the dwc3 controller. - interrupts: Interrupts used by the dwc3 controller.
- usb-phy : array of phandle for the PHY device - usb-phy : array of phandle for the PHY device. The first element
in the array is expected to be a handle to the USB2/HS PHY and
the second element is expected to be a handle to the USB3/SS PHY
Optional properties: Optional properties:
- tx-fifo-resize: determines if the FIFO *has* to be reallocated. - tx-fifo-resize: determines if the FIFO *has* to be reallocated.
...@@ -14,7 +16,7 @@ Optional properties: ...@@ -14,7 +16,7 @@ Optional properties:
This is usually a subnode to DWC3 glue to which it is connected. This is usually a subnode to DWC3 glue to which it is connected.
dwc3@4a030000 { dwc3@4a030000 {
compatible = "synopsys,dwc3"; compatible = "snps,dwc3";
reg = <0x4a030000 0xcfff>; reg = <0x4a030000 0xcfff>;
interrupts = <0 92 4> interrupts = <0 92 4>
usb-phy = <&usb2_phy>, <&usb3,phy>; usb-phy = <&usb2_phy>, <&usb3,phy>;
......
Generic USB Properties
Optional properties:
- maximum-speed: tells USB controllers we want to work up to a certain
speed. Valid arguments are "super-speed", "high-speed",
"full-speed" and "low-speed". In case this isn't passed
via DT, USB controllers should default to their maximum
HW capability.
- dr_mode: tells Dual-Role USB controllers that we want to work on a
particular mode. Valid arguments are "host",
"peripheral" and "otg". In case this attribute isn't
passed via DT, USB DRD controllers should default to
OTG.
This is an attribute to a USB controller such as:
dwc3@4a030000 {
compatible = "synopsys,dwc3";
reg = <0x4a030000 0xcfff>;
interrupts = <0 92 4>
usb-phy = <&usb2_phy>, <&usb3,phy>;
maximum-speed = "super-speed";
dr_mode = "otg";
};
...@@ -3,7 +3,7 @@ Tegra SOC USB PHY ...@@ -3,7 +3,7 @@ Tegra SOC USB PHY
The device node for Tegra SOC USB PHY: The device node for Tegra SOC USB PHY:
Required properties : Required properties :
- compatible : Should be "nvidia,tegra20-usb-phy". - compatible : Should be "nvidia,tegra<chip>-usb-phy".
- reg : Defines the following set of registers, in the order listed: - reg : Defines the following set of registers, in the order listed:
- The PHY's own register set. - The PHY's own register set.
Always present. Always present.
...@@ -24,17 +24,26 @@ Required properties : ...@@ -24,17 +24,26 @@ Required properties :
Required properties for phy_type == ulpi: Required properties for phy_type == ulpi:
- nvidia,phy-reset-gpio : The GPIO used to reset the PHY. - nvidia,phy-reset-gpio : The GPIO used to reset the PHY.
Required PHY timing params for utmi phy: Required PHY timing params for utmi phy, for all chips:
- nvidia,hssync-start-delay : Number of 480 Mhz clock cycles to wait before - nvidia,hssync-start-delay : Number of 480 Mhz clock cycles to wait before
start of sync launches RxActive start of sync launches RxActive
- nvidia,elastic-limit : Variable FIFO Depth of elastic input store - nvidia,elastic-limit : Variable FIFO Depth of elastic input store
- nvidia,idle-wait-delay : Number of 480 Mhz clock cycles of idle to wait - nvidia,idle-wait-delay : Number of 480 Mhz clock cycles of idle to wait
before declare IDLE. before declare IDLE.
- nvidia,term-range-adj : Range adjusment on terminations - nvidia,term-range-adj : Range adjusment on terminations
- nvidia,xcvr-setup : HS driver output control - Either one of the following for HS driver output control:
- nvidia,xcvr-setup : integer, uses the provided value.
- nvidia,xcvr-setup-use-fuses : boolean, indicates that the value is read
from the on-chip fuses
If both are provided, nvidia,xcvr-setup-use-fuses takes precedence.
- nvidia,xcvr-lsfslew : LS falling slew rate control. - nvidia,xcvr-lsfslew : LS falling slew rate control.
- nvidia,xcvr-lsrslew : LS rising slew rate control. - nvidia,xcvr-lsrslew : LS rising slew rate control.
Required PHY timing params for utmi phy, only on Tegra30 and above:
- nvidia,xcvr-hsslew : HS slew rate control.
- nvidia,hssquelch-level : HS squelch detector level.
- nvidia,hsdiscon-level : HS disconnect detector level.
Optional properties: Optional properties:
- nvidia,has-legacy-mode : boolean indicates whether this controller can - nvidia,has-legacy-mode : boolean indicates whether this controller can
operate in legacy mode (as APX 2500 / 2600). In legacy mode some operate in legacy mode (as APX 2500 / 2600). In legacy mode some
...@@ -48,5 +57,5 @@ Optional properties: ...@@ -48,5 +57,5 @@ Optional properties:
peripheral means it is device controller peripheral means it is device controller
otg means it can operate as either ("on the go") otg means it can operate as either ("on the go")
Required properties for dr_mode == otg: VBUS control (required for dr_mode == otg, optional for dr_mode == host):
- vbus-supply: regulator for VBUS - vbus-supply: regulator for VBUS
Samsung High Speed USB OTG controller
-----------------------------
The Samsung HSOTG IP can be found on Samsung SoCs, from S3C6400 onwards.
It gives functionality of OTG-compliant USB 2.0 host and device with
support for USB 2.0 high-speed (480Mbps) and full-speed (12 Mbps)
operation.
Currently only device mode is supported.
Binding details
-----
Required properties:
- compatible: "samsung,s3c6400-hsotg" should be used for all currently
supported SoC,
- interrupt-parent: phandle for the interrupt controller to which the
interrupt signal of the HSOTG block is routed,
- interrupts: specifier of interrupt signal of interrupt controller,
according to bindings of interrupt controller,
- clocks: contains an array of clock specifiers:
- first entry: OTG clock
- clock-names: contains array of clock names:
- first entry: must be "otg"
- vusb_d-supply: phandle to voltage regulator of digital section,
- vusb_a-supply: phandle to voltage regulator of analog section.
Example
-----
hsotg@12480000 {
compatible = "samsung,s3c6400-hsotg";
reg = <0x12480000 0x20000>;
interrupts = <0 71 0>;
clocks = <&clock 305>;
clock-names = "otg";
vusb_d-supply = <&vusb_reg>;
vusb_a-supply = <&vusbdac_reg>;
};
...@@ -120,6 +120,22 @@ uart0: serial@44e09000 { ...@@ -120,6 +120,22 @@ uart0: serial@44e09000 {
status = "okay"; status = "okay";
}; };
musb: usb@47400000 {
status = "okay";
control@44e10000 {
status = "okay";
};
phy@47401300 {
status = "okay";
};
usb@47401000 {
status = "okay";
};
};
i2c0: i2c@44e0b000 { i2c0: i2c@44e0b000 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>; pinctrl-0 = <&i2c0_pins>;
......
...@@ -171,6 +171,34 @@ tps: tps@2d { ...@@ -171,6 +171,34 @@ tps: tps@2d {
}; };
}; };
musb: usb@47400000 {
status = "okay";
control@44e10000 {
status = "okay";
};
phy@47401300 {
status = "okay";
};
phy@47401b00 {
status = "okay";
};
usb@47401000 {
status = "okay";
};
usb@47401800 {
status = "okay";
};
dma@07402000 {
status = "okay";
};
};
i2c1: i2c@4802a000 { i2c1: i2c@4802a000 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>; pinctrl-0 = <&i2c1_pins>;
......
...@@ -207,6 +207,22 @@ lis331dlh: lis331dlh@18 { ...@@ -207,6 +207,22 @@ lis331dlh: lis331dlh@18 {
}; };
}; };
musb: usb@47400000 {
status = "okay";
control@44e10000 {
status = "okay";
};
phy@47401300 {
status = "okay";
};
usb@47401000 {
status = "okay";
};
};
epwmss2: epwmss@48304000 { epwmss2: epwmss@48304000 {
status = "okay"; status = "okay";
......
...@@ -26,6 +26,10 @@ aliases { ...@@ -26,6 +26,10 @@ aliases {
serial5 = &uart5; serial5 = &uart5;
d_can0 = &dcan0; d_can0 = &dcan0;
d_can1 = &dcan1; d_can1 = &dcan1;
usb0 = &usb0;
usb1 = &usb1;
phy0 = &usb0_phy;
phy1 = &usb1_phy;
}; };
cpus { cpus {
...@@ -333,21 +337,147 @@ spi1: spi@481a0000 { ...@@ -333,21 +337,147 @@ spi1: spi@481a0000 {
status = "disabled"; status = "disabled";
}; };
usb@47400000 { usb: usb@47400000 {
compatible = "ti,musb-am33xx"; compatible = "ti,am33xx-usb";
reg = <0x47400000 0x1000 /* usbss */ reg = <0x47400000 0x1000>;
0x47401000 0x800 /* musb instance 0 */ ranges;
0x47401800 0x800>; /* musb instance 1 */ #address-cells = <1>;
interrupts = <17 /* usbss */ #size-cells = <1>;
18 /* musb instance 0 */
19>; /* musb instance 1 */
multipoint = <1>;
num-eps = <16>;
ram-bits = <12>;
port0-mode = <3>;
port1-mode = <3>;
power = <250>;
ti,hwmods = "usb_otg_hs"; ti,hwmods = "usb_otg_hs";
status = "disabled";
ctrl_mod: control@44e10000 {
compatible = "ti,am335x-usb-ctrl-module";
reg = <0x44e10620 0x10
0x44e10648 0x4>;
reg-names = "phy_ctrl", "wakeup";
status = "disabled";
};
usb0_phy: phy@47401300 {
compatible = "ti,am335x-usb-phy";
reg = <0x47401300 0x100>;
reg-names = "phy";
status = "disabled";
ti,ctrl_mod = <&ctrl_mod>;
};
usb0: usb@47401000 {
compatible = "ti,musb-am33xx";
ranges;
#address-cells = <1>;
#size-cells = <1>;
reg = <0x47401000 0x200>;
reg-names = "control";
status = "disabled";
musb0: usb@47401400 {
compatible = "mg,musbmhdrc";
reg = <0x47401400 0x400>;
reg-names = "mc";
interrupts = <18>;
interrupt-names = "mc";
multipoint = <1>;
num-eps = <16>;
ram-bits = <12>;
port-mode = <3>;
power = <250>;
phys = <&usb0_phy>;
dmas = <&cppi41dma 0 0 &cppi41dma 1 0
&cppi41dma 2 0 &cppi41dma 3 0
&cppi41dma 4 0 &cppi41dma 5 0
&cppi41dma 6 0 &cppi41dma 7 0
&cppi41dma 8 0 &cppi41dma 9 0
&cppi41dma 10 0 &cppi41dma 11 0
&cppi41dma 12 0 &cppi41dma 13 0
&cppi41dma 14 0 &cppi41dma 0 1
&cppi41dma 1 1 &cppi41dma 2 1
&cppi41dma 3 1 &cppi41dma 4 1
&cppi41dma 5 1 &cppi41dma 6 1
&cppi41dma 7 1 &cppi41dma 8 1
&cppi41dma 9 1 &cppi41dma 10 1
&cppi41dma 11 1 &cppi41dma 12 1
&cppi41dma 13 1 &cppi41dma 14 1>;
dma-names =
"rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
"rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
"rx14", "rx15",
"tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
"tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
"tx14", "tx15";
};
};
usb1_phy: phy@47401b00 {
compatible = "ti,am335x-usb-phy";
reg = <0x47401b00 0x100>;
reg-names = "phy";
status = "disabled";
ti,ctrl_mod = <&ctrl_mod>;
};
usb1: usb@47401800 {
compatible = "ti,musb-am33xx";
ranges;
#address-cells = <1>;
#size-cells = <1>;
reg = <0x47401800 0x200>;
reg-names = "control";
status = "disabled";
musb1: usb@47401c00 {
compatible = "mg,musbmhdrc";
reg = <0x47401c00 0x400>;
reg-names = "mc";
interrupts = <19>;
interrupt-names = "mc";
multipoint = <1>;
num-eps = <16>;
ram-bits = <12>;
port-mode = <3>;
power = <250>;
phys = <&usb1_phy>;
dmas = <&cppi41dma 15 0 &cppi41dma 16 0
&cppi41dma 17 0 &cppi41dma 18 0
&cppi41dma 19 0 &cppi41dma 20 0
&cppi41dma 21 0 &cppi41dma 22 0
&cppi41dma 23 0 &cppi41dma 24 0
&cppi41dma 25 0 &cppi41dma 26 0
&cppi41dma 27 0 &cppi41dma 28 0
&cppi41dma 29 0 &cppi41dma 15 1
&cppi41dma 16 1 &cppi41dma 17 1
&cppi41dma 18 1 &cppi41dma 19 1
&cppi41dma 20 1 &cppi41dma 21 1
&cppi41dma 22 1 &cppi41dma 23 1
&cppi41dma 24 1 &cppi41dma 25 1
&cppi41dma 26 1 &cppi41dma 27 1
&cppi41dma 28 1 &cppi41dma 29 1>;
dma-names =
"rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
"rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
"rx14", "rx15",
"tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
"tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
"tx14", "tx15";
};
};
cppi41dma: dma@07402000 {
compatible = "ti,am3359-cppi41";
reg = <0x47400000 0x1000
0x47402000 0x1000
0x47403000 0x1000
0x47404000 0x4000>;
reg-names = "glue controller scheduler queuemgr";
interrupts = <17>;
interrupt-names = "glue";
#dma-cells = <2>;
#dma-channels = <30>;
#dma-requests = <256>;
status = "disabled";
};
}; };
epwmss0: epwmss@48300000 { epwmss0: epwmss@48300000 {
......
...@@ -644,7 +644,7 @@ omap_dwc3@4a020000 { ...@@ -644,7 +644,7 @@ omap_dwc3@4a020000 {
utmi-mode = <2>; utmi-mode = <2>;
ranges; ranges;
dwc3@4a030000 { dwc3@4a030000 {
compatible = "synopsys,dwc3"; compatible = "snps,dwc3";
reg = <0x4a030000 0x1000>; reg = <0x4a030000 0x1000>;
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
usb-phy = <&usb2_phy>, <&usb3_phy>; usb-phy = <&usb2_phy>, <&usb3_phy>;
......
...@@ -566,7 +566,6 @@ emc-table@380000 { ...@@ -566,7 +566,6 @@ emc-table@380000 {
usb@c5000000 { usb@c5000000 {
status = "okay"; status = "okay";
nvidia,vbus-gpio = <&gpio TEGRA_GPIO(D, 0) GPIO_ACTIVE_HIGH>;
dr_mode = "otg"; dr_mode = "otg";
}; };
......
...@@ -312,7 +312,6 @@ pmc { ...@@ -312,7 +312,6 @@ pmc {
usb@c5000000 { usb@c5000000 {
status = "okay"; status = "okay";
nvidia,vbus-gpio = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
}; };
usb-phy@c5000000 { usb-phy@c5000000 {
......
...@@ -509,7 +509,6 @@ pmc { ...@@ -509,7 +509,6 @@ pmc {
usb@c5000000 { usb@c5000000 {
status = "okay"; status = "okay";
nvidia,vbus-gpio = <&tca6416 0 GPIO_ACTIVE_HIGH>;
}; };
usb-phy@c5000000 { usb-phy@c5000000 {
...@@ -519,7 +518,6 @@ usb-phy@c5000000 { ...@@ -519,7 +518,6 @@ usb-phy@c5000000 {
usb@c5008000 { usb@c5008000 {
status = "okay"; status = "okay";
nvidia,vbus-gpio = <&tca6416 1 GPIO_ACTIVE_HIGH>;
}; };
usb-phy@c5008000 { usb-phy@c5008000 {
......
...@@ -477,13 +477,13 @@ phy1: usb-phy@c5000000 { ...@@ -477,13 +477,13 @@ phy1: usb-phy@c5000000 {
<&tegra_car TEGRA20_CLK_USBD>; <&tegra_car TEGRA20_CLK_USBD>;
clock-names = "reg", "pll_u", "timer", "utmi-pads"; clock-names = "reg", "pll_u", "timer", "utmi-pads";
nvidia,has-legacy-mode; nvidia,has-legacy-mode;
hssync_start_delay = <9>; nvidia,hssync-start-delay = <9>;
idle_wait_delay = <17>; nvidia,idle-wait-delay = <17>;
elastic_limit = <16>; nvidia,elastic-limit = <16>;
term_range_adj = <6>; nvidia,term-range-adj = <6>;
xcvr_setup = <9>; nvidia,xcvr-setup = <9>;
xcvr_lsfslew = <1>; nvidia,xcvr-lsfslew = <1>;
xcvr_lsrslew = <1>; nvidia,xcvr-lsrslew = <1>;
status = "disabled"; status = "disabled";
}; };
...@@ -527,13 +527,13 @@ phy3: usb-phy@c5008000 { ...@@ -527,13 +527,13 @@ phy3: usb-phy@c5008000 {
<&tegra_car TEGRA20_CLK_CLK_M>, <&tegra_car TEGRA20_CLK_CLK_M>,
<&tegra_car TEGRA20_CLK_USBD>; <&tegra_car TEGRA20_CLK_USBD>;
clock-names = "reg", "pll_u", "timer", "utmi-pads"; clock-names = "reg", "pll_u", "timer", "utmi-pads";
hssync_start_delay = <9>; nvidia,hssync-start-delay = <9>;
idle_wait_delay = <17>; nvidia,idle-wait-delay = <17>;
elastic_limit = <16>; nvidia,elastic-limit = <16>;
term_range_adj = <6>; nvidia,term-range-adj = <6>;
xcvr_setup = <9>; nvidia,xcvr-setup = <9>;
xcvr_lsfslew = <2>; nvidia,xcvr-lsfslew = <2>;
xcvr_lsrslew = <2>; nvidia,xcvr-lsrslew = <2>;
status = "disabled"; status = "disabled";
}; };
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include <linux/mtd/nand.h> #include <linux/mtd/nand.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/usb/phy.h> #include <linux/usb/phy.h>
#include <linux/usb/nop-usb-xceiv.h> #include <linux/usb/usb_phy_gen_xceiv.h>
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
#include <linux/i2c/twl.h> #include <linux/i2c/twl.h>
...@@ -279,7 +279,7 @@ static struct regulator_consumer_supply beagle_vsim_supply[] = { ...@@ -279,7 +279,7 @@ static struct regulator_consumer_supply beagle_vsim_supply[] = {
static struct gpio_led gpio_leds[]; static struct gpio_led gpio_leds[];
/* PHY's VCC regulator might be added later, so flag that we need it */ /* PHY's VCC regulator might be added later, so flag that we need it */
static struct nop_usb_xceiv_platform_data hsusb2_phy_data = { static struct usb_phy_gen_xceiv_platform_data hsusb2_phy_data = {
.needs_vcc = true, .needs_vcc = true,
}; };
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include <linux/i2c/twl.h> #include <linux/i2c/twl.h>
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <linux/usb/musb.h> #include <linux/usb/musb.h>
#include <linux/usb/nop-usb-xceiv.h> #include <linux/usb/usb_phy_gen_xceiv.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <linux/wl12xx.h> #include <linux/wl12xx.h>
...@@ -468,7 +468,7 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = { ...@@ -468,7 +468,7 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
static struct regulator_consumer_supply omap3evm_vaux2_supplies[] = { static struct regulator_consumer_supply omap3evm_vaux2_supplies[] = {
REGULATOR_SUPPLY("VDD_CSIPHY1", "omap3isp"), /* OMAP ISP */ REGULATOR_SUPPLY("VDD_CSIPHY1", "omap3isp"), /* OMAP ISP */
REGULATOR_SUPPLY("VDD_CSIPHY2", "omap3isp"), /* OMAP ISP */ REGULATOR_SUPPLY("VDD_CSIPHY2", "omap3isp"), /* OMAP ISP */
REGULATOR_SUPPLY("vcc", "nop_usb_xceiv.2"), /* hsusb port 2 */ REGULATOR_SUPPLY("vcc", "usb_phy_gen_xceiv.2"), /* hsusb port 2 */
REGULATOR_SUPPLY("vaux2", NULL), REGULATOR_SUPPLY("vaux2", NULL),
}; };
......
...@@ -352,7 +352,7 @@ static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = { ...@@ -352,7 +352,7 @@ static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = {
}; };
static struct regulator_consumer_supply pandora_usb_phy_supply[] = { static struct regulator_consumer_supply pandora_usb_phy_supply[] = {
REGULATOR_SUPPLY("vcc", "nop_usb_xceiv.2"), /* hsusb port 2 */ REGULATOR_SUPPLY("vcc", "usb_phy_gen_xceiv.2"), /* hsusb port 2 */
}; };
/* ads7846 on SPI and 2 nub controllers on I2C */ /* ads7846 on SPI and 2 nub controllers on I2C */
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/usb/phy.h> #include <linux/usb/phy.h>
#include <linux/usb/nop-usb-xceiv.h> #include <linux/usb/usb_phy_gen_xceiv.h>
#include "soc.h" #include "soc.h"
#include "omap_device.h" #include "omap_device.h"
...@@ -349,7 +349,7 @@ static struct fixed_voltage_config hsusb_reg_config = { ...@@ -349,7 +349,7 @@ static struct fixed_voltage_config hsusb_reg_config = {
/* .init_data filled later */ /* .init_data filled later */
}; };
static const char *nop_name = "nop_usb_xceiv"; /* NOP PHY driver */ static const char *nop_name = "usb_phy_gen_xceiv"; /* NOP PHY driver */
static const char *reg_name = "reg-fixed-voltage"; /* Regulator driver */ static const char *reg_name = "reg-fixed-voltage"; /* Regulator driver */
/** /**
...@@ -460,9 +460,9 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys) ...@@ -460,9 +460,9 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
pdevinfo.name = nop_name; pdevinfo.name = nop_name;
pdevinfo.id = phy->port; pdevinfo.id = phy->port;
pdevinfo.data = phy->platform_data; pdevinfo.data = phy->platform_data;
pdevinfo.size_data = sizeof(struct nop_usb_xceiv_platform_data); pdevinfo.size_data =
sizeof(struct usb_phy_gen_xceiv_platform_data);
scnprintf(phy_id, MAX_STR, "nop_usb_xceiv.%d", scnprintf(phy_id, MAX_STR, "usb_phy_gen_xceiv.%d",
phy->port); phy->port);
pdev = platform_device_register_full(&pdevinfo); pdev = platform_device_register_full(&pdevinfo);
if (IS_ERR(pdev)) { if (IS_ERR(pdev)) {
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <linux/of_fdt.h> #include <linux/of_fdt.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/pda_power.h> #include <linux/pda_power.h>
#include <linux/platform_data/tegra_usb.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/sys_soc.h> #include <linux/sys_soc.h>
...@@ -46,40 +45,6 @@ ...@@ -46,40 +45,6 @@
#include "fuse.h" #include "fuse.h"
#include "iomap.h" #include "iomap.h"
static struct tegra_ehci_platform_data tegra_ehci1_pdata = {
.operating_mode = TEGRA_USB_OTG,
.power_down_on_bus_suspend = 1,
.vbus_gpio = -1,
};
static struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config = {
.reset_gpio = -1,
.clk = "cdev2",
};
static struct tegra_ehci_platform_data tegra_ehci2_pdata = {
.phy_config = &tegra_ehci2_ulpi_phy_config,
.operating_mode = TEGRA_USB_HOST,
.power_down_on_bus_suspend = 1,
.vbus_gpio = -1,
};
static struct tegra_ehci_platform_data tegra_ehci3_pdata = {
.operating_mode = TEGRA_USB_HOST,
.power_down_on_bus_suspend = 1,
.vbus_gpio = -1,
};
static struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("nvidia,tegra20-ehci", 0xC5000000, "tegra-ehci.0",
&tegra_ehci1_pdata),
OF_DEV_AUXDATA("nvidia,tegra20-ehci", 0xC5004000, "tegra-ehci.1",
&tegra_ehci2_pdata),
OF_DEV_AUXDATA("nvidia,tegra20-ehci", 0xC5008000, "tegra-ehci.2",
&tegra_ehci3_pdata),
{}
};
static void __init tegra_dt_init(void) static void __init tegra_dt_init(void)
{ {
struct soc_device_attribute *soc_dev_attr; struct soc_device_attribute *soc_dev_attr;
...@@ -112,8 +77,7 @@ static void __init tegra_dt_init(void) ...@@ -112,8 +77,7 @@ static void __init tegra_dt_init(void)
* devices * devices
*/ */
out: out:
of_platform_populate(NULL, of_default_bus_match_table, of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
tegra20_auxdata_lookup, parent);
} }
static void __init trimslice_init(void) static void __init trimslice_init(void)
......
...@@ -287,6 +287,14 @@ config DMA_OMAP ...@@ -287,6 +287,14 @@ config DMA_OMAP
select DMA_ENGINE select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS select DMA_VIRTUAL_CHANNELS
config TI_CPPI41
tristate "AM33xx CPPI41 DMA support"
depends on ARCH_OMAP
select DMA_ENGINE
help
The Communications Port Programming Interface (CPPI) 4.1 DMA engine
is currently used by the USB driver on AM335x platforms.
config MMP_PDMA config MMP_PDMA
bool "MMP PDMA support" bool "MMP PDMA support"
depends on (ARCH_MMP || ARCH_PXA) depends on (ARCH_MMP || ARCH_PXA)
......
...@@ -39,3 +39,4 @@ obj-$(CONFIG_MMP_TDMA) += mmp_tdma.o ...@@ -39,3 +39,4 @@ obj-$(CONFIG_MMP_TDMA) += mmp_tdma.o
obj-$(CONFIG_DMA_OMAP) += omap-dma.o obj-$(CONFIG_DMA_OMAP) += omap-dma.o
obj-$(CONFIG_MMP_PDMA) += mmp_pdma.o obj-$(CONFIG_MMP_PDMA) += mmp_pdma.o
obj-$(CONFIG_DMA_JZ4740) += dma-jz4740.o obj-$(CONFIG_DMA_JZ4740) += dma-jz4740.o
obj-$(CONFIG_TI_CPPI41) += cppi41.o
This diff is collapsed.
...@@ -46,7 +46,7 @@ obj-$(CONFIG_USB_MICROTEK) += image/ ...@@ -46,7 +46,7 @@ obj-$(CONFIG_USB_MICROTEK) += image/
obj-$(CONFIG_USB_SERIAL) += serial/ obj-$(CONFIG_USB_SERIAL) += serial/
obj-$(CONFIG_USB) += misc/ obj-$(CONFIG_USB) += misc/
obj-$(CONFIG_USB_PHY) += phy/ obj-$(CONFIG_USB_SUPPORT) += phy/
obj-$(CONFIG_EARLY_PRINTK_DBGP) += early/ obj-$(CONFIG_EARLY_PRINTK_DBGP) += early/
obj-$(CONFIG_USB_ATM) += atm/ obj-$(CONFIG_USB_ATM) += atm/
......
...@@ -63,6 +63,7 @@ static int host_start(struct ci_hdrc *ci) ...@@ -63,6 +63,7 @@ static int host_start(struct ci_hdrc *ci)
ehci = hcd_to_ehci(hcd); ehci = hcd_to_ehci(hcd);
ehci->caps = ci->hw_bank.cap; ehci->caps = ci->hw_bank.cap;
ehci->has_hostpc = ci->hw_bank.lpm; ehci->has_hostpc = ci->hw_bank.lpm;
ehci->has_tdi_phy_lpm = ci->hw_bank.lpm;
ret = usb_add_hcd(hcd, 0, 0); ret = usb_add_hcd(hcd, 0, 0);
if (ret) if (ret)
......
...@@ -40,6 +40,38 @@ config USB_DWC3_DUAL_ROLE ...@@ -40,6 +40,38 @@ config USB_DWC3_DUAL_ROLE
endchoice endchoice
comment "Platform Glue Driver Support"
config USB_DWC3_OMAP
tristate "Texas Instruments OMAP5 and similar Platforms"
depends on EXTCON
default USB_DWC3
help
Some platforms from Texas Instruments like OMAP5, DRA7xxx and
AM437x use this IP for USB2/3 functionality.
Say 'Y' or 'M' here if you have one such device
config USB_DWC3_EXYNOS
tristate "Samsung Exynos Platform"
default USB_DWC3
help
Recent Exynos5 SoCs ship with one DesignWare Core USB3 IP inside,
say 'Y' or 'M' if you have one such device.
config USB_DWC3_PCI
tristate "PCIe-based Platforms"
depends on PCI
default USB_DWC3
help
If you're using the DesignWare Core IP with a PCIe, please say
'Y' or 'M' here.
One such PCIe-based platform is Synopsys' PCIe HAPS model of
this IP.
comment "Debugging features"
config USB_DWC3_DEBUG config USB_DWC3_DEBUG
bool "Enable Debugging Messages" bool "Enable Debugging Messages"
help help
......
...@@ -27,15 +27,8 @@ endif ...@@ -27,15 +27,8 @@ endif
# the entire driver (with all its glue layers) on several architectures # the entire driver (with all its glue layers) on several architectures
# and make sure it compiles fine. This will also help with allmodconfig # and make sure it compiles fine. This will also help with allmodconfig
# and allyesconfig builds. # and allyesconfig builds.
#
# The only exception is the PCI glue layer, but that's only because
# PCI doesn't provide nops if CONFIG_PCI isn't enabled.
## ##
obj-$(CONFIG_USB_DWC3) += dwc3-omap.o obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o
obj-$(CONFIG_USB_DWC3) += dwc3-exynos.o obj-$(CONFIG_USB_DWC3_EXYNOS) += dwc3-exynos.o
obj-$(CONFIG_USB_DWC3_PCI) += dwc3-pci.o
ifneq ($(CONFIG_PCI),)
obj-$(CONFIG_USB_DWC3) += dwc3-pci.o
endif
This diff is collapsed.
...@@ -6,34 +6,14 @@ ...@@ -6,34 +6,14 @@
* Authors: Felipe Balbi <balbi@ti.com>, * Authors: Felipe Balbi <balbi@ti.com>,
* Sebastian Andrzej Siewior <bigeasy@linutronix.de> * Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* *
* Redistribution and use in source and binary forms, with or without * This program is free software: you can redistribute it and/or modify
* modification, are permitted provided that the following conditions * it under the terms of the GNU General Public License version 2 of
* are met: * the License as published by the Free Software Foundation.
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The names of the above-listed copyright holders may not be used
* to endorse or promote products derived from this software without
* specific prior written permission.
* *
* ALTERNATIVELY, this software may be distributed under the terms of the * This program is distributed in the hope that it will be useful,
* GNU General Public License ("GPL") version 2, as published by the Free * but WITHOUT ANY WARRANTY; without even the implied warranty of
* Software Foundation. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef __DRIVERS_USB_DWC3_CORE_H #ifndef __DRIVERS_USB_DWC3_CORE_H
...@@ -49,6 +29,7 @@ ...@@ -49,6 +29,7 @@
#include <linux/usb/ch9.h> #include <linux/usb/ch9.h>
#include <linux/usb/gadget.h> #include <linux/usb/gadget.h>
#include <linux/usb/otg.h>
/* Global constants */ /* Global constants */
#define DWC3_EP0_BOUNCE_SIZE 512 #define DWC3_EP0_BOUNCE_SIZE 512
...@@ -194,6 +175,10 @@ ...@@ -194,6 +175,10 @@
#define DWC3_GTXFIFOSIZ_TXFDEF(n) ((n) & 0xffff) #define DWC3_GTXFIFOSIZ_TXFDEF(n) ((n) & 0xffff)
#define DWC3_GTXFIFOSIZ_TXFSTADDR(n) ((n) & 0xffff0000) #define DWC3_GTXFIFOSIZ_TXFSTADDR(n) ((n) & 0xffff0000)
/* Global Event Size Registers */
#define DWC3_GEVNTSIZ_INTMASK (1 << 31)
#define DWC3_GEVNTSIZ_SIZE(n) ((n) & 0xffff)
/* Global HWPARAMS1 Register */ /* Global HWPARAMS1 Register */
#define DWC3_GHWPARAMS1_EN_PWROPT(n) (((n) & (3 << 24)) >> 24) #define DWC3_GHWPARAMS1_EN_PWROPT(n) (((n) & (3 << 24)) >> 24)
#define DWC3_GHWPARAMS1_EN_PWROPT_NO 0 #define DWC3_GHWPARAMS1_EN_PWROPT_NO 0
...@@ -207,7 +192,6 @@ ...@@ -207,7 +192,6 @@
#define DWC3_MAX_HIBER_SCRATCHBUFS 15 #define DWC3_MAX_HIBER_SCRATCHBUFS 15
/* Device Configuration Register */ /* Device Configuration Register */
#define DWC3_DCFG_LPM_CAP (1 << 22)
#define DWC3_DCFG_DEVADDR(addr) ((addr) << 3) #define DWC3_DCFG_DEVADDR(addr) ((addr) << 3)
#define DWC3_DCFG_DEVADDR_MASK DWC3_DCFG_DEVADDR(0x7f) #define DWC3_DCFG_DEVADDR_MASK DWC3_DCFG_DEVADDR(0x7f)
...@@ -367,7 +351,6 @@ struct dwc3_trb; ...@@ -367,7 +351,6 @@ struct dwc3_trb;
/** /**
* struct dwc3_event_buffer - Software event buffer representation * struct dwc3_event_buffer - Software event buffer representation
* @list: a list of event buffers
* @buf: _THE_ buffer * @buf: _THE_ buffer
* @length: size of this buffer * @length: size of this buffer
* @lpos: event offset * @lpos: event offset
...@@ -415,7 +398,7 @@ struct dwc3_event_buffer { ...@@ -415,7 +398,7 @@ struct dwc3_event_buffer {
* @number: endpoint number (1 - 15) * @number: endpoint number (1 - 15)
* @type: set to bmAttributes & USB_ENDPOINT_XFERTYPE_MASK * @type: set to bmAttributes & USB_ENDPOINT_XFERTYPE_MASK
* @resource_index: Resource transfer index * @resource_index: Resource transfer index
* @interval: the intervall on which the ISOC transfer is started * @interval: the interval on which the ISOC transfer is started
* @name: a human readable name e.g. ep1out-bulk * @name: a human readable name e.g. ep1out-bulk
* @direction: true for TX, false for RX * @direction: true for TX, false for RX
* @stream_capable: true when streams are enabled * @stream_capable: true when streams are enabled
...@@ -566,11 +549,6 @@ struct dwc3_hwparams { ...@@ -566,11 +549,6 @@ struct dwc3_hwparams {
/* HWPARAMS0 */ /* HWPARAMS0 */
#define DWC3_MODE(n) ((n) & 0x7) #define DWC3_MODE(n) ((n) & 0x7)
#define DWC3_MODE_DEVICE 0
#define DWC3_MODE_HOST 1
#define DWC3_MODE_DRD 2
#define DWC3_MODE_HUB 3
#define DWC3_MDWIDTH(n) (((n) & 0xff00) >> 8) #define DWC3_MDWIDTH(n) (((n) & 0xff00) >> 8)
/* HWPARAMS1 */ /* HWPARAMS1 */
...@@ -632,7 +610,7 @@ struct dwc3_scratchpad_array { ...@@ -632,7 +610,7 @@ struct dwc3_scratchpad_array {
* @u1u2: only used on revisions <1.83a for workaround * @u1u2: only used on revisions <1.83a for workaround
* @maximum_speed: maximum speed requested (mainly for testing purposes) * @maximum_speed: maximum speed requested (mainly for testing purposes)
* @revision: revision register contents * @revision: revision register contents
* @mode: mode of operation * @dr_mode: requested mode of operation
* @usb2_phy: pointer to USB2 PHY * @usb2_phy: pointer to USB2 PHY
* @usb3_phy: pointer to USB3 PHY * @usb3_phy: pointer to USB3 PHY
* @dcfg: saved contents of DCFG register * @dcfg: saved contents of DCFG register
...@@ -690,6 +668,8 @@ struct dwc3 { ...@@ -690,6 +668,8 @@ struct dwc3 {
void __iomem *regs; void __iomem *regs;
size_t regs_size; size_t regs_size;
enum usb_dr_mode dr_mode;
/* used for suspend/resume */ /* used for suspend/resume */
u32 dcfg; u32 dcfg;
u32 gctl; u32 gctl;
...@@ -698,7 +678,6 @@ struct dwc3 { ...@@ -698,7 +678,6 @@ struct dwc3 {
u32 u1u2; u32 u1u2;
u32 maximum_speed; u32 maximum_speed;
u32 revision; u32 revision;
u32 mode;
#define DWC3_REVISION_173A 0x5533173a #define DWC3_REVISION_173A 0x5533173a
#define DWC3_REVISION_175A 0x5533175a #define DWC3_REVISION_175A 0x5533175a
......
...@@ -6,34 +6,14 @@ ...@@ -6,34 +6,14 @@
* Authors: Felipe Balbi <balbi@ti.com>, * Authors: Felipe Balbi <balbi@ti.com>,
* Sebastian Andrzej Siewior <bigeasy@linutronix.de> * Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* *
* Redistribution and use in source and binary forms, with or without * This program is free software: you can redistribute it and/or modify
* modification, are permitted provided that the following conditions * it under the terms of the GNU General Public License version 2 of
* are met: * the License as published by the Free Software Foundation.
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The names of the above-listed copyright holders may not be used
* to endorse or promote products derived from this software without
* specific prior written permission.
* *
* ALTERNATIVELY, this software may be distributed under the terms of the * This program is distributed in the hope that it will be useful,
* GNU General Public License ("GPL") version 2, as published by the Free * but WITHOUT ANY WARRANTY; without even the implied warranty of
* Software Foundation. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "core.h" #include "core.h"
......
...@@ -6,34 +6,14 @@ ...@@ -6,34 +6,14 @@
* Authors: Felipe Balbi <balbi@ti.com>, * Authors: Felipe Balbi <balbi@ti.com>,
* Sebastian Andrzej Siewior <bigeasy@linutronix.de> * Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* *
* Redistribution and use in source and binary forms, with or without * This program is free software: you can redistribute it and/or modify
* modification, are permitted provided that the following conditions * it under the terms of the GNU General Public License version 2 of
* are met: * the License as published by the Free Software Foundation.
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The names of the above-listed copyright holders may not be used
* to endorse or promote products derived from this software without
* specific prior written permission.
* *
* ALTERNATIVELY, this software may be distributed under the terms of the * This program is distributed in the hope that it will be useful,
* GNU General Public License ("GPL") version 2, as published by the Free * but WITHOUT ANY WARRANTY; without even the implied warranty of
* Software Foundation. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
......
...@@ -6,10 +6,14 @@ ...@@ -6,10 +6,14 @@
* *
* Author: Anton Tikhomirov <av.tikhomirov@samsung.com> * Author: Anton Tikhomirov <av.tikhomirov@samsung.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License version 2 of
* the Free Software Foundation; either version 2 of the License, or * the License as published by the Free Software Foundation.
* (at your option) any later version. *
* 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/module.h> #include <linux/module.h>
...@@ -20,7 +24,7 @@ ...@@ -20,7 +24,7 @@
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <linux/usb/nop-usb-xceiv.h> #include <linux/usb/usb_phy_gen_xceiv.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
...@@ -34,13 +38,13 @@ struct dwc3_exynos { ...@@ -34,13 +38,13 @@ struct dwc3_exynos {
static int dwc3_exynos_register_phys(struct dwc3_exynos *exynos) static int dwc3_exynos_register_phys(struct dwc3_exynos *exynos)
{ {
struct nop_usb_xceiv_platform_data pdata; struct usb_phy_gen_xceiv_platform_data pdata;
struct platform_device *pdev; struct platform_device *pdev;
int ret; int ret;
memset(&pdata, 0x00, sizeof(pdata)); memset(&pdata, 0x00, sizeof(pdata));
pdev = platform_device_alloc("nop_usb_xceiv", PLATFORM_DEVID_AUTO); pdev = platform_device_alloc("usb_phy_gen_xceiv", PLATFORM_DEVID_AUTO);
if (!pdev) if (!pdev)
return -ENOMEM; return -ENOMEM;
...@@ -51,7 +55,7 @@ static int dwc3_exynos_register_phys(struct dwc3_exynos *exynos) ...@@ -51,7 +55,7 @@ static int dwc3_exynos_register_phys(struct dwc3_exynos *exynos)
if (ret) if (ret)
goto err1; goto err1;
pdev = platform_device_alloc("nop_usb_xceiv", PLATFORM_DEVID_AUTO); pdev = platform_device_alloc("usb_phy_gen_xceiv", PLATFORM_DEVID_AUTO);
if (!pdev) { if (!pdev) {
ret = -ENOMEM; ret = -ENOMEM;
goto err1; goto err1;
...@@ -228,5 +232,5 @@ module_platform_driver(dwc3_exynos_driver); ...@@ -228,5 +232,5 @@ module_platform_driver(dwc3_exynos_driver);
MODULE_ALIAS("platform:exynos-dwc3"); MODULE_ALIAS("platform:exynos-dwc3");
MODULE_AUTHOR("Anton Tikhomirov <av.tikhomirov@samsung.com>"); MODULE_AUTHOR("Anton Tikhomirov <av.tikhomirov@samsung.com>");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("DesignWare USB3 EXYNOS Glue Layer"); MODULE_DESCRIPTION("DesignWare USB3 EXYNOS Glue Layer");
...@@ -6,34 +6,14 @@ ...@@ -6,34 +6,14 @@
* Authors: Felipe Balbi <balbi@ti.com>, * Authors: Felipe Balbi <balbi@ti.com>,
* Sebastian Andrzej Siewior <bigeasy@linutronix.de> * Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* *
* Redistribution and use in source and binary forms, with or without * This program is free software: you can redistribute it and/or modify
* modification, are permitted provided that the following conditions * it under the terms of the GNU General Public License version 2 of
* are met: * the License as published by the Free Software Foundation.
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The names of the above-listed copyright holders may not be used
* to endorse or promote products derived from this software without
* specific prior written permission.
* *
* ALTERNATIVELY, this software may be distributed under the terms of the * This program is distributed in the hope that it will be useful,
* GNU General Public License ("GPL") version 2, as published by the Free * but WITHOUT ANY WARRANTY; without even the implied warranty of
* Software Foundation. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -409,11 +389,9 @@ static int dwc3_omap_probe(struct platform_device *pdev) ...@@ -409,11 +389,9 @@ static int dwc3_omap_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
} }
base = devm_ioremap_nocache(dev, res->start, resource_size(res)); base = devm_ioremap_resource(dev, res);
if (!base) { if (IS_ERR(base))
dev_err(dev, "ioremap failed\n"); return PTR_ERR(base);
return -ENOMEM;
}
spin_lock_init(&omap->lock); spin_lock_init(&omap->lock);
...@@ -610,5 +588,5 @@ module_platform_driver(dwc3_omap_driver); ...@@ -610,5 +588,5 @@ module_platform_driver(dwc3_omap_driver);
MODULE_ALIAS("platform:omap-dwc3"); MODULE_ALIAS("platform:omap-dwc3");
MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>"); MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
MODULE_LICENSE("Dual BSD/GPL"); MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("DesignWare USB3 OMAP Glue Layer"); MODULE_DESCRIPTION("DesignWare USB3 OMAP Glue Layer");
...@@ -6,34 +6,14 @@ ...@@ -6,34 +6,14 @@
* Authors: Felipe Balbi <balbi@ti.com>, * Authors: Felipe Balbi <balbi@ti.com>,
* Sebastian Andrzej Siewior <bigeasy@linutronix.de> * Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* *
* Redistribution and use in source and binary forms, with or without * This program is free software: you can redistribute it and/or modify
* modification, are permitted provided that the following conditions * it under the terms of the GNU General Public License version 2 of
* are met: * the License as published by the Free Software Foundation.
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The names of the above-listed copyright holders may not be used
* to endorse or promote products derived from this software without
* specific prior written permission.
* *
* ALTERNATIVELY, this software may be distributed under the terms of the * This program is distributed in the hope that it will be useful,
* GNU General Public License ("GPL") version 2, as published by the Free * but WITHOUT ANY WARRANTY; without even the implied warranty of
* Software Foundation. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -43,7 +23,7 @@ ...@@ -43,7 +23,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <linux/usb/nop-usb-xceiv.h> #include <linux/usb/usb_phy_gen_xceiv.h>
/* FIXME define these in <linux/pci_ids.h> */ /* FIXME define these in <linux/pci_ids.h> */
#define PCI_VENDOR_ID_SYNOPSYS 0x16c3 #define PCI_VENDOR_ID_SYNOPSYS 0x16c3
...@@ -58,13 +38,13 @@ struct dwc3_pci { ...@@ -58,13 +38,13 @@ struct dwc3_pci {
static int dwc3_pci_register_phys(struct dwc3_pci *glue) static int dwc3_pci_register_phys(struct dwc3_pci *glue)
{ {
struct nop_usb_xceiv_platform_data pdata; struct usb_phy_gen_xceiv_platform_data pdata;
struct platform_device *pdev; struct platform_device *pdev;
int ret; int ret;
memset(&pdata, 0x00, sizeof(pdata)); memset(&pdata, 0x00, sizeof(pdata));
pdev = platform_device_alloc("nop_usb_xceiv", 0); pdev = platform_device_alloc("usb_phy_gen_xceiv", 0);
if (!pdev) if (!pdev)
return -ENOMEM; return -ENOMEM;
...@@ -75,7 +55,7 @@ static int dwc3_pci_register_phys(struct dwc3_pci *glue) ...@@ -75,7 +55,7 @@ static int dwc3_pci_register_phys(struct dwc3_pci *glue)
if (ret) if (ret)
goto err1; goto err1;
pdev = platform_device_alloc("nop_usb_xceiv", 1); pdev = platform_device_alloc("usb_phy_gen_xceiv", 1);
if (!pdev) { if (!pdev) {
ret = -ENOMEM; ret = -ENOMEM;
goto err1; goto err1;
...@@ -211,7 +191,7 @@ static DEFINE_PCI_DEVICE_TABLE(dwc3_pci_id_table) = { ...@@ -211,7 +191,7 @@ static DEFINE_PCI_DEVICE_TABLE(dwc3_pci_id_table) = {
}; };
MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table); MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table);
#ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP
static int dwc3_pci_suspend(struct device *dev) static int dwc3_pci_suspend(struct device *dev)
{ {
struct pci_dev *pci = to_pci_dev(dev); struct pci_dev *pci = to_pci_dev(dev);
...@@ -236,28 +216,24 @@ static int dwc3_pci_resume(struct device *dev) ...@@ -236,28 +216,24 @@ static int dwc3_pci_resume(struct device *dev)
return 0; return 0;
} }
#endif /* CONFIG_PM_SLEEP */
static const struct dev_pm_ops dwc3_pci_dev_pm_ops = { static const struct dev_pm_ops dwc3_pci_dev_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(dwc3_pci_suspend, dwc3_pci_resume) SET_SYSTEM_SLEEP_PM_OPS(dwc3_pci_suspend, dwc3_pci_resume)
}; };
#define DEV_PM_OPS (&dwc3_pci_dev_pm_ops)
#else
#define DEV_PM_OPS NULL
#endif /* CONFIG_PM */
static struct pci_driver dwc3_pci_driver = { static struct pci_driver dwc3_pci_driver = {
.name = "dwc3-pci", .name = "dwc3-pci",
.id_table = dwc3_pci_id_table, .id_table = dwc3_pci_id_table,
.probe = dwc3_pci_probe, .probe = dwc3_pci_probe,
.remove = dwc3_pci_remove, .remove = dwc3_pci_remove,
.driver = { .driver = {
.pm = DEV_PM_OPS, .pm = &dwc3_pci_dev_pm_ops,
}, },
}; };
MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>"); MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
MODULE_LICENSE("Dual BSD/GPL"); MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("DesignWare USB3 PCI Glue Layer"); MODULE_DESCRIPTION("DesignWare USB3 PCI Glue Layer");
module_pci_driver(dwc3_pci_driver); module_pci_driver(dwc3_pci_driver);
...@@ -6,34 +6,14 @@ ...@@ -6,34 +6,14 @@
* Authors: Felipe Balbi <balbi@ti.com>, * Authors: Felipe Balbi <balbi@ti.com>,
* Sebastian Andrzej Siewior <bigeasy@linutronix.de> * Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* *
* Redistribution and use in source and binary forms, with or without * This program is free software: you can redistribute it and/or modify
* modification, are permitted provided that the following conditions * it under the terms of the GNU General Public License version 2 of
* are met: * the License as published by the Free Software Foundation.
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The names of the above-listed copyright holders may not be used
* to endorse or promote products derived from this software without
* specific prior written permission.
* *
* ALTERNATIVELY, this software may be distributed under the terms of the * This program is distributed in the hope that it will be useful,
* GNU General Public License ("GPL") version 2, as published by the Free * but WITHOUT ANY WARRANTY; without even the implied warranty of
* Software Foundation. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -168,6 +148,7 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep, ...@@ -168,6 +148,7 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep,
direction = !dwc->ep0_expect_in; direction = !dwc->ep0_expect_in;
dwc->delayed_status = false; dwc->delayed_status = false;
usb_gadget_set_state(&dwc->gadget, USB_STATE_CONFIGURED);
if (dwc->ep0state == EP0_STATUS_PHASE) if (dwc->ep0state == EP0_STATUS_PHASE)
__dwc3_ep0_do_control_status(dwc, dwc->eps[direction]); __dwc3_ep0_do_control_status(dwc, dwc->eps[direction]);
...@@ -553,8 +534,16 @@ static int dwc3_ep0_set_config(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl) ...@@ -553,8 +534,16 @@ static int dwc3_ep0_set_config(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl)
ret = dwc3_ep0_delegate_req(dwc, ctrl); ret = dwc3_ep0_delegate_req(dwc, ctrl);
/* if the cfg matches and the cfg is non zero */ /* if the cfg matches and the cfg is non zero */
if (cfg && (!ret || (ret == USB_GADGET_DELAYED_STATUS))) { if (cfg && (!ret || (ret == USB_GADGET_DELAYED_STATUS))) {
usb_gadget_set_state(&dwc->gadget,
USB_STATE_CONFIGURED); /*
* only change state if set_config has already
* been processed. If gadget driver returns
* USB_GADGET_DELAYED_STATUS, we will wait
* to change the state on the next usb_ep_queue()
*/
if (ret == 0)
usb_gadget_set_state(&dwc->gadget,
USB_STATE_CONFIGURED);
/* /*
* Enable transition to U1/U2 state when * Enable transition to U1/U2 state when
...@@ -571,7 +560,7 @@ static int dwc3_ep0_set_config(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl) ...@@ -571,7 +560,7 @@ static int dwc3_ep0_set_config(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl)
case USB_STATE_CONFIGURED: case USB_STATE_CONFIGURED:
ret = dwc3_ep0_delegate_req(dwc, ctrl); ret = dwc3_ep0_delegate_req(dwc, ctrl);
if (!cfg) if (!cfg && !ret)
usb_gadget_set_state(&dwc->gadget, usb_gadget_set_state(&dwc->gadget,
USB_STATE_ADDRESS); USB_STATE_ADDRESS);
break; break;
......
This diff is collapsed.
...@@ -6,34 +6,14 @@ ...@@ -6,34 +6,14 @@
* Authors: Felipe Balbi <balbi@ti.com>, * Authors: Felipe Balbi <balbi@ti.com>,
* Sebastian Andrzej Siewior <bigeasy@linutronix.de> * Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* *
* Redistribution and use in source and binary forms, with or without * This program is free software: you can redistribute it and/or modify
* modification, are permitted provided that the following conditions * it under the terms of the GNU General Public License version 2 of
* are met: * the License as published by the Free Software Foundation.
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The names of the above-listed copyright holders may not be used
* to endorse or promote products derived from this software without
* specific prior written permission.
* *
* ALTERNATIVELY, this software may be distributed under the terms of the * This program is distributed in the hope that it will be useful,
* GNU General Public License ("GPL") version 2, as published by the Free * but WITHOUT ANY WARRANTY; without even the implied warranty of
* Software Foundation. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef __DRIVERS_USB_DWC3_GADGET_H #ifndef __DRIVERS_USB_DWC3_GADGET_H
......
...@@ -5,34 +5,14 @@ ...@@ -5,34 +5,14 @@
* *
* Authors: Felipe Balbi <balbi@ti.com>, * Authors: Felipe Balbi <balbi@ti.com>,
* *
* Redistribution and use in source and binary forms, with or without * This program is free software: you can redistribute it and/or modify
* modification, are permitted provided that the following conditions * it under the terms of the GNU General Public License version 2 of
* are met: * the License as published by the Free Software Foundation.
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The names of the above-listed copyright holders may not be used
* to endorse or promote products derived from this software without
* specific prior written permission.
* *
* ALTERNATIVELY, this software may be distributed under the terms of the * This program is distributed in the hope that it will be useful,
* GNU General Public License ("GPL") version 2, as published by the Free * but WITHOUT ANY WARRANTY; without even the implied warranty of
* Software Foundation. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <linux/platform_device.h> #include <linux/platform_device.h>
......
...@@ -6,34 +6,14 @@ ...@@ -6,34 +6,14 @@
* Authors: Felipe Balbi <balbi@ti.com>, * Authors: Felipe Balbi <balbi@ti.com>,
* Sebastian Andrzej Siewior <bigeasy@linutronix.de> * Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* *
* Redistribution and use in source and binary forms, with or without * This program is free software: you can redistribute it and/or modify
* modification, are permitted provided that the following conditions * it under the terms of the GNU General Public License version 2 of
* are met: * the License as published by the Free Software Foundation.
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The names of the above-listed copyright holders may not be used
* to endorse or promote products derived from this software without
* specific prior written permission.
* *
* ALTERNATIVELY, this software may be distributed under the terms of the * This program is distributed in the hope that it will be useful,
* GNU General Public License ("GPL") version 2, as published by the Free * but WITHOUT ANY WARRANTY; without even the implied warranty of
* Software Foundation. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef __DRIVERS_USB_DWC3_IO_H #ifndef __DRIVERS_USB_DWC3_IO_H
......
/**
* platform_data.h - USB DWC3 Platform Data Support
*
* Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
* Author: Felipe Balbi <balbi@ti.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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/usb/ch9.h>
#include <linux/usb/otg.h>
struct dwc3_platform_data {
enum usb_device_speed maximum_speed;
enum usb_dr_mode dr_mode;
bool tx_fifo_resize;
};
...@@ -144,7 +144,6 @@ config USB_AT91 ...@@ -144,7 +144,6 @@ config USB_AT91
config USB_LPC32XX config USB_LPC32XX
tristate "LPC32XX USB Peripheral Controller" tristate "LPC32XX USB Peripheral Controller"
depends on ARCH_LPC32XX depends on ARCH_LPC32XX
depends on USB_PHY
select USB_ISP1301 select USB_ISP1301
help help
This option selects the USB device controller in the LPC32xx SoC. This option selects the USB device controller in the LPC32xx SoC.
...@@ -206,7 +205,6 @@ config USB_FOTG210_UDC ...@@ -206,7 +205,6 @@ config USB_FOTG210_UDC
config USB_OMAP config USB_OMAP
tristate "OMAP USB Device Controller" tristate "OMAP USB Device Controller"
depends on ARCH_OMAP1 depends on ARCH_OMAP1
depends on USB_PHY
select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG
help help
Many Texas Instruments OMAP processors have flexible full Many Texas Instruments OMAP processors have flexible full
...@@ -287,21 +285,6 @@ config USB_S3C_HSOTG ...@@ -287,21 +285,6 @@ config USB_S3C_HSOTG
The Samsung S3C64XX USB2.0 high-speed gadget controller The Samsung S3C64XX USB2.0 high-speed gadget controller
integrated into the S3C64XX series SoC. integrated into the S3C64XX series SoC.
config USB_IMX
tristate "Freescale i.MX1 USB Peripheral Controller"
depends on ARCH_MXC
depends on BROKEN
help
Freescale's i.MX1 includes an integrated full speed
USB 1.1 device controller.
It has Six fixed-function endpoints, as well as endpoint
zero (for control transfers).
Say "y" to link the driver statically, or "m" to build a
dynamically linked module called "imx_udc" and force all
gadget drivers to also be dynamically linked.
config USB_S3C2410 config USB_S3C2410
tristate "S3C2410 USB Device Controller" tristate "S3C2410 USB Device Controller"
depends on ARCH_S3C24XX depends on ARCH_S3C24XX
......
...@@ -13,7 +13,6 @@ obj-$(CONFIG_USB_NET2280) += net2280.o ...@@ -13,7 +13,6 @@ obj-$(CONFIG_USB_NET2280) += net2280.o
obj-$(CONFIG_USB_AMD5536UDC) += amd5536udc.o obj-$(CONFIG_USB_AMD5536UDC) += amd5536udc.o
obj-$(CONFIG_USB_PXA25X) += pxa25x_udc.o obj-$(CONFIG_USB_PXA25X) += pxa25x_udc.o
obj-$(CONFIG_USB_PXA27X) += pxa27x_udc.o obj-$(CONFIG_USB_PXA27X) += pxa27x_udc.o
obj-$(CONFIG_USB_IMX) += imx_udc.o
obj-$(CONFIG_USB_GOKU) += goku_udc.o obj-$(CONFIG_USB_GOKU) += goku_udc.o
obj-$(CONFIG_USB_OMAP) += omap_udc.o obj-$(CONFIG_USB_OMAP) += omap_udc.o
obj-$(CONFIG_USB_S3C2410) += s3c2410_udc.o obj-$(CONFIG_USB_S3C2410) += s3c2410_udc.o
......
...@@ -1122,7 +1122,7 @@ udc_queue(struct usb_ep *usbep, struct usb_request *usbreq, gfp_t gfp) ...@@ -1122,7 +1122,7 @@ udc_queue(struct usb_ep *usbep, struct usb_request *usbreq, gfp_t gfp)
goto finished; goto finished;
} }
if (ep->dma) { if (ep->dma) {
retval = prep_dma(ep, req, gfp); retval = prep_dma(ep, req, GFP_ATOMIC);
if (retval != 0) if (retval != 0)
goto finished; goto finished;
/* write desc pointer to enable DMA */ /* write desc pointer to enable DMA */
...@@ -1190,7 +1190,7 @@ udc_queue(struct usb_ep *usbep, struct usb_request *usbreq, gfp_t gfp) ...@@ -1190,7 +1190,7 @@ udc_queue(struct usb_ep *usbep, struct usb_request *usbreq, gfp_t gfp)
* for PPB modes, because of chain creation reasons * for PPB modes, because of chain creation reasons
*/ */
if (ep->in) { if (ep->in) {
retval = prep_dma(ep, req, gfp); retval = prep_dma(ep, req, GFP_ATOMIC);
if (retval != 0) if (retval != 0)
goto finished; goto finished;
} }
......
...@@ -870,6 +870,11 @@ static void clk_on(struct at91_udc *udc) ...@@ -870,6 +870,11 @@ static void clk_on(struct at91_udc *udc)
if (udc->clocked) if (udc->clocked)
return; return;
udc->clocked = 1; udc->clocked = 1;
if (IS_ENABLED(CONFIG_COMMON_CLK)) {
clk_set_rate(udc->uclk, 48000000);
clk_prepare_enable(udc->uclk);
}
clk_prepare_enable(udc->iclk); clk_prepare_enable(udc->iclk);
clk_prepare_enable(udc->fclk); clk_prepare_enable(udc->fclk);
} }
...@@ -882,6 +887,8 @@ static void clk_off(struct at91_udc *udc) ...@@ -882,6 +887,8 @@ static void clk_off(struct at91_udc *udc)
udc->gadget.speed = USB_SPEED_UNKNOWN; udc->gadget.speed = USB_SPEED_UNKNOWN;
clk_disable_unprepare(udc->fclk); clk_disable_unprepare(udc->fclk);
clk_disable_unprepare(udc->iclk); clk_disable_unprepare(udc->iclk);
if (IS_ENABLED(CONFIG_COMMON_CLK))
clk_disable_unprepare(udc->uclk);
} }
/* /*
...@@ -1697,7 +1704,7 @@ static int at91udc_probe(struct platform_device *pdev) ...@@ -1697,7 +1704,7 @@ static int at91udc_probe(struct platform_device *pdev)
int retval; int retval;
struct resource *res; struct resource *res;
if (!dev->platform_data && !pdev->dev.of_node) { if (!dev_get_platdata(dev) && !pdev->dev.of_node) {
/* small (so we copy it) but critical! */ /* small (so we copy it) but critical! */
DBG("missing platform_data\n"); DBG("missing platform_data\n");
return -ENODEV; return -ENODEV;
...@@ -1728,7 +1735,7 @@ static int at91udc_probe(struct platform_device *pdev) ...@@ -1728,7 +1735,7 @@ static int at91udc_probe(struct platform_device *pdev)
if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node)
at91udc_of_init(udc, pdev->dev.of_node); at91udc_of_init(udc, pdev->dev.of_node);
else else
memcpy(&udc->board, dev->platform_data, memcpy(&udc->board, dev_get_platdata(dev),
sizeof(struct at91_udc_data)); sizeof(struct at91_udc_data));
udc->pdev = pdev; udc->pdev = pdev;
udc->enabled = 0; udc->enabled = 0;
...@@ -1774,10 +1781,12 @@ static int at91udc_probe(struct platform_device *pdev) ...@@ -1774,10 +1781,12 @@ static int at91udc_probe(struct platform_device *pdev)
/* get interface and function clocks */ /* get interface and function clocks */
udc->iclk = clk_get(dev, "udc_clk"); udc->iclk = clk_get(dev, "udc_clk");
udc->fclk = clk_get(dev, "udpck"); udc->fclk = clk_get(dev, "udpck");
if (IS_ERR(udc->iclk) || IS_ERR(udc->fclk)) { if (IS_ENABLED(CONFIG_COMMON_CLK))
udc->uclk = clk_get(dev, "usb_clk");
if (IS_ERR(udc->iclk) || IS_ERR(udc->fclk) ||
(IS_ENABLED(CONFIG_COMMON_CLK) && IS_ERR(udc->uclk))) {
DBG("clocks missing\n"); DBG("clocks missing\n");
retval = -ENODEV; retval = -ENODEV;
/* NOTE: we "know" here that refcounts on these are NOPs */
goto fail1; goto fail1;
} }
...@@ -1851,6 +1860,12 @@ static int at91udc_probe(struct platform_device *pdev) ...@@ -1851,6 +1860,12 @@ static int at91udc_probe(struct platform_device *pdev)
fail2: fail2:
free_irq(udc->udp_irq, udc); free_irq(udc->udp_irq, udc);
fail1: fail1:
if (IS_ENABLED(CONFIG_COMMON_CLK) && !IS_ERR(udc->uclk))
clk_put(udc->uclk);
if (!IS_ERR(udc->fclk))
clk_put(udc->fclk);
if (!IS_ERR(udc->iclk))
clk_put(udc->iclk);
iounmap(udc->udp_baseaddr); iounmap(udc->udp_baseaddr);
fail0a: fail0a:
if (cpu_is_at91rm9200()) if (cpu_is_at91rm9200())
...@@ -1894,6 +1909,8 @@ static int __exit at91udc_remove(struct platform_device *pdev) ...@@ -1894,6 +1909,8 @@ static int __exit at91udc_remove(struct platform_device *pdev)
clk_put(udc->iclk); clk_put(udc->iclk);
clk_put(udc->fclk); clk_put(udc->fclk);
if (IS_ENABLED(CONFIG_COMMON_CLK))
clk_put(udc->uclk);
return 0; return 0;
} }
......
...@@ -126,7 +126,7 @@ struct at91_udc { ...@@ -126,7 +126,7 @@ struct at91_udc {
unsigned active_suspend:1; unsigned active_suspend:1;
u8 addr; u8 addr;
struct at91_udc_data board; struct at91_udc_data board;
struct clk *iclk, *fclk; struct clk *iclk, *fclk, *uclk;
struct platform_device *pdev; struct platform_device *pdev;
struct proc_dir_entry *pde; struct proc_dir_entry *pde;
void __iomem *udp_baseaddr; void __iomem *udp_baseaddr;
......
...@@ -1772,6 +1772,7 @@ static irqreturn_t usba_vbus_irq(int irq, void *devid) ...@@ -1772,6 +1772,7 @@ static irqreturn_t usba_vbus_irq(int irq, void *devid)
static int atmel_usba_start(struct usb_gadget *gadget, static int atmel_usba_start(struct usb_gadget *gadget,
struct usb_gadget_driver *driver) struct usb_gadget_driver *driver)
{ {
int ret = 0;
struct usba_udc *udc = container_of(gadget, struct usba_udc, gadget); struct usba_udc *udc = container_of(gadget, struct usba_udc, gadget);
unsigned long flags; unsigned long flags;
...@@ -1781,8 +1782,14 @@ static int atmel_usba_start(struct usb_gadget *gadget, ...@@ -1781,8 +1782,14 @@ static int atmel_usba_start(struct usb_gadget *gadget,
udc->driver = driver; udc->driver = driver;
spin_unlock_irqrestore(&udc->lock, flags); spin_unlock_irqrestore(&udc->lock, flags);
clk_enable(udc->pclk); ret = clk_prepare_enable(udc->pclk);
clk_enable(udc->hclk); if (ret)
goto out;
ret = clk_prepare_enable(udc->hclk);
if (ret) {
clk_disable_unprepare(udc->pclk);
goto out;
}
DBG(DBG_GADGET, "registered driver `%s'\n", driver->driver.name); DBG(DBG_GADGET, "registered driver `%s'\n", driver->driver.name);
...@@ -1797,9 +1804,11 @@ static int atmel_usba_start(struct usb_gadget *gadget, ...@@ -1797,9 +1804,11 @@ static int atmel_usba_start(struct usb_gadget *gadget,
usba_writel(udc, CTRL, USBA_ENABLE_MASK); usba_writel(udc, CTRL, USBA_ENABLE_MASK);
usba_writel(udc, INT_ENB, USBA_END_OF_RESET); usba_writel(udc, INT_ENB, USBA_END_OF_RESET);
} }
out:
spin_unlock_irqrestore(&udc->lock, flags); spin_unlock_irqrestore(&udc->lock, flags);
return 0; return ret;
} }
static int atmel_usba_stop(struct usb_gadget *gadget, static int atmel_usba_stop(struct usb_gadget *gadget,
...@@ -1822,8 +1831,8 @@ static int atmel_usba_stop(struct usb_gadget *gadget, ...@@ -1822,8 +1831,8 @@ static int atmel_usba_stop(struct usb_gadget *gadget,
udc->driver = NULL; udc->driver = NULL;
clk_disable(udc->hclk); clk_disable_unprepare(udc->hclk);
clk_disable(udc->pclk); clk_disable_unprepare(udc->pclk);
DBG(DBG_GADGET, "unregistered driver `%s'\n", driver->driver.name); DBG(DBG_GADGET, "unregistered driver `%s'\n", driver->driver.name);
...@@ -1922,7 +1931,7 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev, ...@@ -1922,7 +1931,7 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
static struct usba_ep * usba_udc_pdata(struct platform_device *pdev, static struct usba_ep * usba_udc_pdata(struct platform_device *pdev,
struct usba_udc *udc) struct usba_udc *udc)
{ {
struct usba_platform_data *pdata = pdev->dev.platform_data; struct usba_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct usba_ep *eps; struct usba_ep *eps;
int i; int i;
...@@ -2022,10 +2031,14 @@ static int __init usba_udc_probe(struct platform_device *pdev) ...@@ -2022,10 +2031,14 @@ static int __init usba_udc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, udc); platform_set_drvdata(pdev, udc);
/* Make sure we start from a clean slate */ /* Make sure we start from a clean slate */
clk_enable(pclk); ret = clk_prepare_enable(pclk);
if (ret) {
dev_err(&pdev->dev, "Unable to enable pclk, aborting.\n");
goto err_clk_enable;
}
toggle_bias(0); toggle_bias(0);
usba_writel(udc, CTRL, USBA_DISABLE_MASK); usba_writel(udc, CTRL, USBA_DISABLE_MASK);
clk_disable(pclk); clk_disable_unprepare(pclk);
if (pdev->dev.of_node) if (pdev->dev.of_node)
udc->usba_ep = atmel_udc_of_init(pdev, udc); udc->usba_ep = atmel_udc_of_init(pdev, udc);
...@@ -2081,6 +2094,7 @@ static int __init usba_udc_probe(struct platform_device *pdev) ...@@ -2081,6 +2094,7 @@ static int __init usba_udc_probe(struct platform_device *pdev)
free_irq(irq, udc); free_irq(irq, udc);
err_request_irq: err_request_irq:
err_alloc_ep: err_alloc_ep:
err_clk_enable:
iounmap(udc->fifo); iounmap(udc->fifo);
err_map_fifo: err_map_fifo:
iounmap(udc->regs); iounmap(udc->regs);
......
...@@ -2313,7 +2313,7 @@ static void bcm63xx_udc_cleanup_debugfs(struct bcm63xx_udc *udc) ...@@ -2313,7 +2313,7 @@ static void bcm63xx_udc_cleanup_debugfs(struct bcm63xx_udc *udc)
static int bcm63xx_udc_probe(struct platform_device *pdev) static int bcm63xx_udc_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct bcm63xx_usbd_platform_data *pd = dev->platform_data; struct bcm63xx_usbd_platform_data *pd = dev_get_platdata(dev);
struct bcm63xx_udc *udc; struct bcm63xx_udc *udc;
struct resource *res; struct resource *res;
int rc = -ENOMEM, i, irq; int rc = -ENOMEM, i, irq;
......
...@@ -3043,12 +3043,12 @@ fsg_config_from_params(struct fsg_config *cfg, ...@@ -3043,12 +3043,12 @@ fsg_config_from_params(struct fsg_config *cfg,
lun->filename = lun->filename =
params->file_count > i && params->file[i][0] params->file_count > i && params->file[i][0]
? params->file[i] ? params->file[i]
: 0; : NULL;
} }
/* Let MSF use defaults */ /* Let MSF use defaults */
cfg->vendor_name = 0; cfg->vendor_name = NULL;
cfg->product_name = 0; cfg->product_name = NULL;
cfg->ops = NULL; cfg->ops = NULL;
cfg->private_data = NULL; cfg->private_data = NULL;
......
...@@ -695,7 +695,7 @@ static int generic_get_cmd(struct usb_audio_control *con, u8 cmd) ...@@ -695,7 +695,7 @@ static int generic_get_cmd(struct usb_audio_control *con, u8 cmd)
} }
/* Todo: add more control selecotor dynamically */ /* Todo: add more control selecotor dynamically */
int __init control_selector_init(struct f_audio *audio) static int __init control_selector_init(struct f_audio *audio)
{ {
INIT_LIST_HEAD(&audio->cs); INIT_LIST_HEAD(&audio->cs);
list_add(&feature_unit.list, &audio->cs); list_add(&feature_unit.list, &audio->cs);
...@@ -719,7 +719,7 @@ int __init control_selector_init(struct f_audio *audio) ...@@ -719,7 +719,7 @@ int __init control_selector_init(struct f_audio *audio)
* *
* Returns zero on success, else negative errno. * Returns zero on success, else negative errno.
*/ */
int __init audio_bind_config(struct usb_configuration *c) static int __init audio_bind_config(struct usb_configuration *c)
{ {
struct f_audio *audio; struct f_audio *audio;
int status; int status;
......
...@@ -33,7 +33,7 @@ int fsl_udc_clk_init(struct platform_device *pdev) ...@@ -33,7 +33,7 @@ int fsl_udc_clk_init(struct platform_device *pdev)
unsigned long freq; unsigned long freq;
int ret; int ret;
pdata = pdev->dev.platform_data; pdata = dev_get_platdata(&pdev->dev);
mxc_ipg_clk = devm_clk_get(&pdev->dev, "ipg"); mxc_ipg_clk = devm_clk_get(&pdev->dev, "ipg");
if (IS_ERR(mxc_ipg_clk)) { if (IS_ERR(mxc_ipg_clk)) {
...@@ -80,7 +80,7 @@ int fsl_udc_clk_init(struct platform_device *pdev) ...@@ -80,7 +80,7 @@ int fsl_udc_clk_init(struct platform_device *pdev)
int fsl_udc_clk_finalize(struct platform_device *pdev) int fsl_udc_clk_finalize(struct platform_device *pdev)
{ {
struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev);
int ret = 0; int ret = 0;
/* workaround ENGcm09152 for i.MX35 */ /* workaround ENGcm09152 for i.MX35 */
......
...@@ -2248,7 +2248,7 @@ static int __init struct_udc_setup(struct fsl_udc *udc, ...@@ -2248,7 +2248,7 @@ static int __init struct_udc_setup(struct fsl_udc *udc,
struct fsl_usb2_platform_data *pdata; struct fsl_usb2_platform_data *pdata;
size_t size; size_t size;
pdata = pdev->dev.platform_data; pdata = dev_get_platdata(&pdev->dev);
udc->phy_mode = pdata->phy_mode; udc->phy_mode = pdata->phy_mode;
udc->eps = kzalloc(sizeof(struct fsl_ep) * udc->max_ep, GFP_KERNEL); udc->eps = kzalloc(sizeof(struct fsl_ep) * udc->max_ep, GFP_KERNEL);
...@@ -2343,7 +2343,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev) ...@@ -2343,7 +2343,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
} }
pdata = pdev->dev.platform_data; pdata = dev_get_platdata(&pdev->dev);
udc_controller->pdata = pdata; udc_controller->pdata = pdata;
spin_lock_init(&udc_controller->lock); spin_lock_init(&udc_controller->lock);
udc_controller->stopped = 1; udc_controller->stopped = 1;
...@@ -2524,7 +2524,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev) ...@@ -2524,7 +2524,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
static int __exit fsl_udc_remove(struct platform_device *pdev) static int __exit fsl_udc_remove(struct platform_device *pdev)
{ {
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev);
DECLARE_COMPLETION(done); DECLARE_COMPLETION(done);
......
...@@ -557,7 +557,7 @@ static void fusb300_set_cxdone(struct fusb300 *fusb300) ...@@ -557,7 +557,7 @@ static void fusb300_set_cxdone(struct fusb300 *fusb300)
} }
/* read data from cx fifo */ /* read data from cx fifo */
void fusb300_rdcxf(struct fusb300 *fusb300, static void fusb300_rdcxf(struct fusb300 *fusb300,
u8 *buffer, u32 length) u8 *buffer, u32 length)
{ {
int i = 0; int i = 0;
......
...@@ -772,7 +772,7 @@ goku_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) ...@@ -772,7 +772,7 @@ goku_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
} /* else pio or dma irq handler advances the queue. */ } /* else pio or dma irq handler advances the queue. */
if (likely(req != 0)) if (likely(req != NULL))
list_add_tail(&req->queue, &ep->queue); list_add_tail(&req->queue, &ep->queue);
if (likely(!list_empty(&ep->queue)) if (likely(!list_empty(&ep->queue))
......
...@@ -185,7 +185,7 @@ static int __exit hid_unbind(struct usb_composite_dev *cdev) ...@@ -185,7 +185,7 @@ static int __exit hid_unbind(struct usb_composite_dev *cdev)
static int __init hidg_plat_driver_probe(struct platform_device *pdev) static int __init hidg_plat_driver_probe(struct platform_device *pdev)
{ {
struct hidg_func_descriptor *func = pdev->dev.platform_data; struct hidg_func_descriptor *func = dev_get_platdata(&pdev->dev);
struct hidg_func_node *entry; struct hidg_func_node *entry;
if (!func) { if (!func) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment