The error is:
In file included from include/part.h:10:0,
from include/usb.h:18,
from include/linux/usb/gadget.h:22,
from drivers/usb/dwc3/ep0.c:20:
include/ide.h:62:14: error: unknown type name ‘uchar’
void ide_led(uchar led, uchar status);
Fixing it by including common.h that defines the uchar type.
Change-Id: I97a5eabe32e03709a7e2800cd6ee8adf186daa76
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 4d3825c1915e1649c4be0320e74be158e4698655)
The select_dr_mode operation is executed when the glue driver is probed.
The role of this optional function is to configure the operating mode
of the controller at the glue level.
Change-Id: I613fc4e985d9400ae9f27b6becff9d6c8d105e98
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 93991cf1969077108ae36e90acb3cd25a6a449ac)
This make the driver more generic. At this point this driver can replace
the dwc3-of-simple implementation.
Make the description in the Kconfig more generic too.
Change-Id: Icf52db944e2559492cee912e14357f79713ba797
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 446e3a205b871943736e22565092771fac98a9a4)
Change-Id: I2a3b7e0afaadb36db46d36e84bdf03ca712aa84c
Fixes: d648a50c0a27 ("dwc3: move phy operation to core.c")
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Those operations can be used for peripheral operation as well as host
operation.
Change-Id: Ifa3b83bd690cd11f6750fd893e6ac36b2a0214b3
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit d648a50c0a27452a5439e7982b23b97c64820430)
UCLASS_USB_DEV_GENERIC was meant for USB devices connected to host
controllers, not gadget devices.
Adding a new UCLASS for gadget devices alone.
Also move the generic DM code for USB gadgets in a separate file for
clarity.
Conflicts:
board/sunxi/board.c
Change-Id: I9bd01ad0814b81f7718927660a8ece4080c5f988
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 0131162439508801b9f8a330fa731f04273c9337)
The driver will be probed when usb_gadget_initialize() is called.
Change-Id: I3783059179b8b4f21592227ea948f809a6b7c438
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 20bebd866690bb09dd1c1cb8ac674c3b17b63c6d)
When DM_USB_GADGET the platform code for the USB device must be replaced by
calls to a USB device driver.
usb_gadget_initialize() probes the USB device driver.
usb_gadget_release() removes the USB device driver.
Change-Id: I759a0d192d4baafeb188cfad4b3a08b5d2d05c23
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit ff8d75583487eb69bcb6f036088d979c76db3753)
Using CONFIG_DM_USB for this purpose prevents using DM_USB for host and not
for device.
Conflicts:
arch/arm/Kconfig
Change-Id: I075c887a77e2243463a580eac59d842b620af2f5
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 687ab54560809e01a10652ef82dbac6ae72deb91)
Add 2 functions to wrap the calls to board_usb_init() and
board_usb_cleanup().
This is a preparatory work for DM support for UDC drivers (DM_USB_GADGET).
Conflicts:
cmd/fastboot.c
cmd/rockusb.c
cmd/usb_mass_storage.c
Change-Id: I2b3a567d9dff75a03176d76d9fd9775cd8a0792e
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit a06955ae1ef2a942f18025d4fefceea2c638a76f)
The USB storage driver does not compile when CONFIG_BLK is set,
but DM_USB is not set, as we're missing the DM device links for
CONFIG_BLK enabled code paths.
So far it looks like nobody fell into this trap, because no board
enabled CONFIG_BLK and CONFIG_USB_STORAGE while not enabling
CONFIG_DM_USB, but we should still reflect that dependency properly
in Kconfig so that implicit enabling of CONFIG_USB_STORAGE works.
Change-Id: I5f87b577eb94e0ee33036b7162fcece7e04841aa
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit dc03b704f4364da6df6a86aafccc3828ade8ed43)
This allows to disable the USB driver model in SPL because it checks
the CONFIG_SPL_DM_USB variable for SPL builds. Nothing changes for
regular non-SPL builds.
Conflicts:
drivers/usb/host/ehci-atmel.c
drivers/usb/host/xhci-fsl.c
Change-Id: If6c980c620cf97c1dd131f60953c305e34dba505
Signed-off-by: Sven Schwermer <sven@svenschwermer.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit fd09c205fc57b90a782cac33449ef172575d0a8c)
platdata_auto_alloc_size was not initialized in structure.
Caused null pointer dereference when configuring device as
gadget.
Change-Id: Ia4e8b681de09fa290a1031bd43240ac2603d494b
Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 2df49234c6508052ed02602f882d3ce0332d937f)
Add vbus-supply regulator support.
On some board vbus is not controlled by the phy but by
an external regulator.
Change-Id: I1d2851dd9bc1294d0e7bbeff3e6695ca1235d247
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 5c349e179db794eff99dd5d3bbac6845d173709e)
Add code to reset all reset signals as in usb DT node. A reset property
is an optional feature, so only print out a warning and do not fail if a
reset property is not present.
If a reset property is discovered, then use it to deassert, thus
bringing the IP out of reset.
Change-Id: I1c8560b20900d65d628c05df20f5e6e5555bc2cf
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 88c34b8da62cfb4188ff9a59acb32f88ce9ed1b0)
Add support for operating a PHY attached to ehci-pci. There are
systems where the EHCI controller is internally wired to a PCI
bus and has a PHY connected to it as well, ie. the R-Car Gen2.
Change-Id: I012fad45af6f59e0e7e2d30dd2a4da578f68bef0
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 1335e7745f77f122cf4196b8da2aa2fc5edad475)
Pull out the EHCI PHY functions into the ehci-hcd.c to let other
EHCI drivers use them.
Change-Id: I5b1cbaf7acb4cee6034e891ee7aecf0ca7d50728
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit b43cdf9b3fe246a8920d2b62ee41fc1722315ef0)
Add an entry in usb_gadget_controller_number() for the DWC3 gadget
controller. Without it, it is not possible to bind the USB Ethernet driver.
Change-Id: I7d911f734aa279418cd43fa1ec9947e33236c35f
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit c73251eac199a54643ead1febde2db0b02970cc6)
With upcoming changes that require CONFIG_BLK, this broke
USB Mass Storage on the OMAP3 boards because if CONFIG_BLK is
enabled, it assumes that DM_USB is enabled, but it wasn't yet
available on omap3 and omap4 boards.
This patch converts the OMAP2430 MUSB glue to support DM_USB and
extracts the necessary information based on the device tree.
It's based on the ti-musb driver, but there are enough significant
differences in both the architecture and device tree entires between
am33xx and OMAP3/OMAP4, that I think it makes sense to continue to
keep the separate.
Per doc/driver-model/usb-info.txt, the USB gadget stuff hasn't
migrated to DM_USB yet, so this only supports USB Host for now.
Users wanting USB Gadgets will need to disable DM_USB and leave
it the old way for now.
Change-Id: I07fd347129706d136fadd4d6aa735c5df95cb17e
Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 1a35526e1d54a346e12435bee757bfe47093157d)
A bunch of code was encapsulated in #ifdef's whether or not
it is building or for U-Boot. Since this code is always building
for U-Boot, this patch removes the dead code.
Change-Id: If7d6332fb5690cc64a7379304b95221e94071d09
Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 10d5ed9a54c5498992ebda56383c23a42bc70438)
After the commit 6aae84769a0b ("gadget: f_thor: Fix memory leaks of
usb request and its buffer"), there is hang-up with ctrl-c in some
udc. It is because req of out_ep is freed before out_ep is disabled.
Fix hang-up with ctrl-c by disabling ep before free req of the ep.
Change-Id: I39257664aa47501172a217c39727a9f1ef66bc17
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit c194bdf226030e45bcb2db3dcbb2d72e5052820a)
When using CONFIG_OF_BOARD on rpi to use the dtb provided by the
RaspberryPi Fundation, the compatible string isn't the same, resulting
in not-functional usb from u-boot.
Change-Id: I1e780fe22dac4a19f099c6cf071c6be5e8eafea0
Signed-off-by: Oleksandr Tymoshenko <gonzo@FreeBSD.org>
Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit ff5d5cc2331033c8a6987bb644827b52484160d9)
This bug is the combination of dwc2 USB controller and lan78xx
USB ethernet controller, which is the combination in use on
the Raspberry Pi Model 3 B+.
When the host attempts to receive a packet, but a packet has not
arrived, the lan78xx controller responds by setting BIR
(Bulk-In Empty Response) to NAK. Unfortunately, this hangs
the USB controller and requires the USB controller to
be reset.
The fix proposed is to have the lan78xx controller respond
by setting BIR to ZLP.
Change-Id: I42751eefc9b2f449f550f129a76ab1ce4288d184
Signed-off-by: Andrew Thomas <andrew.thomas@oracle.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit af15946aa081dbcd0bec7d507a2b2db4e6b6cda5)
This fixes the following compiler warning:
"warning: cast from pointer to integer of different size
[-Wpointer-to-int-cast]"
Change-Id: I4e47b2bcb02dbc59ccc4f471d86bcc6d901eeec7
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 9fddf6c7dd9dca493969d4ebd5e5fc2b2e21be9c)
There is no reason to specify header with full soc name.
Symlink is setup automatically (arch -> arch-zynqmp)
Change-Id: I00fcdab4aafd7f4a6a32c6258bedde4af2212c6a
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit b168591c899e869dc4fcd71752cbe32c91355348)
There are memory leaks of usb request and its buffer for ep0,
in_ep, and out ep. Fix memory leaks of usb request and its buffer.
Change-Id: Ia0d3c872c06b16057d07ff1dfd9331a7ebef588f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 6aae84769a0be095daf94d34fdd61b12d59a7022)
The xhci wrapper-driver for Rockchip searches the DTS to find its
child node compatbile with 'rockchip,rk3399-usb3-phy' to retrieve the
base-address of the PHY. However, this is currently broken (and
always has been), returning NULL. However, the (wrongly) retrieved
base-address is never used.
We thus remove this code for now.
Change-Id: Ie62ad30b6faae8eb8f483aa9d9d43923ffee6020
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit afa314d3a37797bd88c9a379a6fa150e6829fdf9)
In xhci_set_configuration(), 'Context Entries' field in the slot
context was cleared with mask LAST_CTX_MASK, but it should have
taken the endianness into consideration.
Change-Id: I5d6b94d213751151b7b8180d01e88c5ce5bf9f5a
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit e40406603fe22a5b18d7e8ac7a2eb0f2d2b13cf1)
If a full speed hub connects to a high speed hub which supports MTT,
the MTT field of its slot context will be set to 1 when xHCI driver
setups an xHCI virtual device in xhci_setup_addressable_virt_dev().
Once usb core fetch its hub descriptor, and need to update the xHC's
internal data structures for the device, the HUB field of its slot
context will be set to 1 too, meanwhile MTT is also set before, this
will cause configure endpoint command fail. In the case, we should
clear MTT to 0 for full speed hub according to section 6.2.2.
This keeps in sync with Linux kernel commit:
096b110: usb: xhci: fix config fail of FS hub behind a HS hub with MTT
Change-Id: I48538e3d150f79f9bca591b0a4527cf9c5d7a2ba
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit eaaefb066c86f08fb285e73fb8c5fbf497be6b57)
Per xHCI spec chapter 6.2.2 table 6-7, as input, software shall
initialize the dev_state field to '0'. Though this does not seem
to cause any issue with most xHC implementations, let's do this
to conform with the spec.
Change-Id: I604a4c9edb9b88b25ba96e16d6f7013bee64df8c
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Marek Vasut <marek.vasut@gmail.com>
Tested-by: Matthias Blankertz <matthias.blankertz@cetitec.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit ae751b060e8cee3f9c48112898cd3e31ee6c0734)
If a USB 3.0 hub is plugged into the root port of the xHC, the xHCI
driver will issue a 'Configure Endpoint' command to the xHC for it
to update its internal data structure for this hub device. The hub
attributes are in the slot context so we need tell xHC to update the
slot context by setting the add context flags of the input control
context to only cover the slot context.
At present the add context flags is or'ed with the slot context bit,
but it should really be accurately set to the slot context, as the
variable that holds the value of the add context flags comes from
whatever was set in the last command execution, which may contain
additional contexts that 'Configure Endpoint' command should not
touch. Some xHC implementations like x86 don't complain such, but
it was observed on Renesas RCar Gen3 platform that the RCar xHC
complains with a 'TRB error' completion codes as the response.
Change-Id: I5141a85024ea60c3dbb7bde5b6a6811142ce1f8b
Reported-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Marek Vasut <marek.vasut@gmail.com>
Tested-by: Matthias Blankertz <matthias.blankertz@cetitec.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 793c819c6e2168110ad7cfca0349738c79d79a1f)
During the execution of xhci_deregister xHCI registers are accessed. If
the clock is already deactivated when xhci_deregister is called this can
lead to undefined behavior. Change the order to deregister the device
before deactivating the clock.
Change-Id: I038a8b46e8ebf7733dc850aaeb2915add0fc79ce
Signed-off-by: Matthias Blankertz <matthias.blankertz@cetitec.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 3f484226793166c75bd56784832d4c1a84061ad5)
Move struct sunxi_ccm_reg pointer to private structure
so-that accessing ccm reg base become more proper way
and avoid local initialization in each function.
Change-Id: Ic3b1456368fc6395b09a93a5535191bc78e7c0b7
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 831cc98b1f8cf81cf34185e34b2021e2766eb4d8)
Switch to DM_USB was done and there is no need to keep !DM_USB code in
tree.
Change-Id: Ib39e8431dbad9fa330d70235bb48bfb03d942f1b
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit d067624c47bf15b9b5b716ae8be510fa1fb615a2)
The patch is adding support for DM_USB for xhci driver.
Change-Id: I329d442af804384d5749d1559d7ffcc36362715f
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 41a3d4fda4377e971c4fbc7d0b7f335f2c4373ad)
Add support to get maximum speed from dt so that usb drivers
makes use of it for DT parsing.
Change-Id: I3c809fd822813efbb5d7494c36803eb9f502e466
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
(rebase and fix errors)
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 59592b99d884f0524a29afe4a412bbed65cfc5b7)
During file download, it only uses 32bit variable for file size and
it limits maximum file size less than 4GB. Update to support more
than 4GB file with using two 32bit variables for file size as thor
protocol 5.0.
Change-Id: If855ff85ef1984ac77d9caa6c49c99f32798121f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 1fe9ae76b113103bcc40aa15949f9dd8aa0a06a2)
The thor sender can send filename without null character and it is
used without consideration of overflow. Actually, character array
for filename is assigned with DEFINE_CACHE_ALIGN_BUFFER() and it
is bigger than size of memcpy, so there was no real overflow.
Fix filename overflow for code level integrity.
Change-Id: Ie6f2fdd29fede8f26ae72a6048204b9cc8ece3ed
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit f9e8dc0abda94869d2734843c1c14ba6f2867031)
Compiling the f_mass_storage driver for an x86 target results in a
compilation error as set_bit and clear_bit are provided by bitops.h
To address that situation we discussed on the list moving to
genetic_set_bit() instead.
Doing a quick grep for similar situations in drivers/usb shows that the
composite device is using __set_bit().
This patch switches over to generic_set_bit to maintain consistency between
the two gadget drivers.
Change-Id: I2716277c00dd9309d2fe57e4aa68c18ada82ef1a
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 31dd8efeb661c8dbffff9175a09cf2bab090906a)
Compiling the f_mass_storage driver for an x86 target results in a
compilation error as set_bit and clear_bit are provided by bitops.h
Looking at the provenance of the current u-boot code and the git change
history in the kernel, it looks like we have a local copy of set_bit and
clear_bit as a hold-over from porting the Linux driver into u-boot.
These days __set_bit and __clear_bit are optionally provided by an arch and
can be used as inputs to generic_bit_set and generic_bit_clear.
This patch switches over to generic_set_bit and generic_clear_bit to
accommodate.
Tested on i.MX WaRP7 and Intel Edison
Change-Id: Ic7a56f08dcd5782a963a935df8217f5fdb605ee2
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 5ac73f6879327beef45bc58484f1f09c2f0cb37c)
This patch adds the bulk clock API tests for the sandbox test suite.
It's very similar to the main test but only uses the _bulk() API and
checks if the clocks are correctly enabled/disabled.
Change-Id: Ibfd7ea033e9a1c2ca76d88be8ca562a660f30448
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 65388d0dc5a36fc86718ffcdf08ac5671ae27b5d)
This patch adds a "bulk" API to the clock API in order to get/enable/disable
/release a group of clocks associated with a device.
This bulk API will avoid adding a copy of the same code to manage
a group of clocks in drivers.
Conflicts:
drivers/clk/clk-uclass.c
Change-Id: I7f992b206662bf5f931a835d98b3e3cd0f4347f1
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit a855be87da49ba750e83ecc526235fe33099f76e)
In the commit "reset: Add get/assert/deassert/release for bulk of reset signals"
the disabled reset_release_bulk() and reset_get_bulk() used the wrong
struct clk_bulk instead of struct reset_ctl_bulk.
Change-Id: Id98f7a6f6f4d5f2fca88f71b6254ca3795888d85
Fixes: 0c28233903b5 ("reset: Add get/assert/deassert/release for bulk of reset signals")
Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 1dd181ff2b3009405d12ad0b3782176490da2446)
This patch adds the bulk reset API tests for the sandbox test suite.
Unlike the main test, it also check the "other" reset signal using the bulk API
and checks if the resets are correctly asserted/deasserted.
To allow the bulk API to work, and avoid changing the DT, the number of resets
of the sandbox reset controller has been bumped to 101 for the "other" reset
line to be valid.
Change-Id: Iac62a1c6ee5637695f7d0dd77b35f047eca641a9
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 91f5f8b73ccba5bf591912fe6e8c500a7d51eb93)
This patch adds a "bulk" API to the reset API in order to get/deassert/
assert/release a group of reset signals associated with a device.
This bulk API will avoid adding a copy of the same code to manage
a group of reset signals in drivers.
Change-Id: Iabad4ac36791622b6560cff8aafc6bfbc4c9bde3
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 0c28233903b5af9a7f41b3200993cfa197b35719)
An unsigned int is always >= 0.
Change-Id: Iba5723469069b0155bcaca876071e32679a0437d
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 48cdfa2f8177dbdfc77c365c0f3f918ceadbe484)
We should not make the same assignement twice.
Change-Id: Ic68e484297b575ff965b3dc21a9a2d7ce06bc08c
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit fa9da8ee60a7387b9e9b0358bd73ef5dbc73736c)
If SPL serial support is disabled nothing brings in sprintf, snprintf
or simple_strtoul:
env/built-in.o: In function `regex_callback':
env/attr.c:128: undefined reference to `sprintf'
disk/built-in.o: In function `blk_get_device_by_str':
disk/part.c:386: undefined reference to `simple_strtoul'
disk/part.c:395: undefined reference to `simple_strtoul'
disk/built-in.o: In function `blk_get_device_part_str':
disk/part.c:522: undefined reference to `simple_strtoul'
disk/built-in.o: In function `part_set_generic_name':
disk/part.c:704: undefined reference to `sprintf'
drivers/built-in.o: In function `init_peripheral_ep':
drivers/usb/musb-new/musb_gadget.c:1826: undefined reference to `sprintf'
drivers/built-in.o: In function `musb_core_init':
drivers/usb/musb-new/musb_core.c:1451: undefined reference to `snprintf'
Add those dependencies here.
Change-Id: I3512dc53bc93a556aee250d98d1a5977d9e2a537
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit ab9e12f651d9211aa0d3c9b9e579c38bd8704054)
In case usb configuration is unknown (cdev->config == NULL), non standard
request should not be processed.
Remove also the cdev->config check below which will never happen.
This issue was seen using ums feature.
Change-Id: I6930deeceadf0eff8e4bfbfb6fdfb254d47a4c83
Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit d57ed4d9f2cb6abc9438104f321b4fe3bc829d57)
When no PHYs are declared in the dwc3 node, the phy init fails.
This patch checks if the "phys" property is presend and reports
the error returned by dev_count_phandle_with_args().
This patchs also fixes the styles issues added in last commit.
This patch should fix the DWC3 support on the UniPhier SoC family.
Change-Id: I59c50f81dfd695a2a8047ed13c1af21af64b044b
Fixes: 7c839ea70c49 ("usb: host: dwc3: Add support for multiple PHYs")
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 003659bda94a1444ebdfefea3f0928f8e90f9d8f)