aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-mx6.c
AgeCommit message (Collapse)AuthorFilesLines
2023-05-02usb: ehci-mx6: move phy setup before register accessTim Harvey1-6/+4
For the CONFIG_PHY case, move the PHY setup before the register access. This avoids a hang when updating the imx8mm.dtsi which moves the USB OTG power-domains to the PHY. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Tested-by: Fabio Estevam <festevam@denx.de>
2023-02-10Correct SPL uses of IMX_MODULE_FUSESimon Glass1-2/+2
This converts 6 usages of this option to the non-SPL form, since there is no SPL_IMX_MODULE_FUSE defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2022-12-23global: Migrate CONFIG_MXC_USB_FLAGS et al to CFGTom Rini1-4/+4
Perform simple renames of: CONFIG_MXC_USB_FLAGS to CFG_MXC_USB_FLAGS CONFIG_MXC_USB_PORT to CFG_MXC_USB_PORT CONFIG_MXC_USB_PORTSC to CFG_MXC_USB_PORTSC Signed-off-by: Tom Rini <trini@konsulko.com>
2022-10-10usb: ehci: Make usage of generic_{setup,shutdown}_phy() helpersPatrice Chotard1-3/+3
Replace ehci_setup_phy() and ehci_shutdown_phy () by respectively generic_setup_phy() and generic_shutdown_phy(). Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org>
2022-07-25usb: ehci-mx6: Remove MX6Q_ARM2 related ifdeferyFabio Estevam1-5/+0
The imx6q arm2 board support has been removed from U-Boot as it did not get converted to DM. Remove the MX6Q_ARM2 related ifdefery in the driver. Signed-off-by: Fabio Estevam <festevam@denx.de>
2022-02-11usb: ehci-mx6: Enable OTG detection on imx8mm and imx8mnAdam Ford1-5/+18
The imx8mm and imx8mn appear compatible with imx7d-usb flags in the OTG driver. If the dr_mode is defined as host or peripheral, the device appears to operate correctly, however the auto host/peripheral detection results in an error. The solution isn't just adding checks for imx8mm and imx8mn to the check for imx7, because the USB clock needs to be running to read from the USBNC_PHY_STATUS_OFFSET register or it will hang. Marek requested that I not enable the clocks in ehci_usb_of_to_plat, so I modified that function to return an unknown state if the device tree does not explicitly state whether it is a host or a peripheral. When the driver probes, it looks to see if it's in the unknown state, and only then will it read the register to auto-detect. Signed-off-by: Adam Ford <aford173@gmail.com> Tested-by: Tim Harvey <tharvey@gateworks.com>
2021-09-22usb: ehci-mx6: use phy_type from device treeMatthias Schiffer1-2/+23
Allow using different PHY interfaces for multiple USB controllers. When no value is set in DT, we fall back to CONFIG_MXC_USB_PORTSC for now to stay compatible with current board configurations. This also adds support for the HSIC mode of the i.MX7. Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
2021-06-24usb: ehci-mx6: Do not fail when 'reg' is not foundFabio Estevam1-1/+1
Unlike imx6, on imx7 the USB PHY is described as: usbphynop1: usbphynop1 { compatible = "usb-nop-xceiv"; clocks = <&clks IMX7D_USB_PHY1_CLK>; clock-names = "main_clk"; #phy-cells = <0>; }; which does not have the 'reg' property. Do not return an error when the 'reg' property is not found for the USB PHY. This fixes USB gadget regression on a imx7s-warp board. Successfully tested the "ums 0 mmc 0" command on two boards: imx7s-warp and imx6dl-pico-pi. Signed-off-by: Fabio Estevam <festevam@denx.de>
2021-06-24usb: ehci-mx6: Move fdtdec_get_alias_seq() inside the CONFIG_MX6Fabio Estevam1-8/+7
On a imx7s-warp board the fdtdec_get_alias_seq() function always fails. As priv->portnr is only used on i.MX6, move fdtdec_get_alias_seq() inside the CONFIG_MX6 block. Signed-off-by: Fabio Estevam <festevam@denx.de>
2021-06-09usb: ehci-mx6: add support for i.MXRTGiulio Benetti1-6/+7
Add support for usb1 and usb2 present on i.IMXRT. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2021-04-28usb: ehci-mx6: Limit PHY address parsing to !CONFIG_PHYMarek Vasut1-5/+12
For systems which use generic PHY support and implement USB PHY driver, the parsing of PHY properties is unnecessary, disable it. Signed-off-by: Marek Vasut <marex@denx.de> Tested-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Fix aarch64 build warningsMarek Vasut1-4/+4
Fix cast from pointer to integer of different size by casting the pointer to uintptr_t instead of uint32_t, the former has correct size on both 32bit and 64bit architectures. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Add fsl,imx7d-usb compatible stringMarek Vasut1-0/+1
Add new compatible string, used by some more up-to-date DTs. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Set default CONFIG_MXC_USB_PORTSC if not definedMarek Vasut1-0/+5
There is now multiple copies of CONFIG_MXC_USB_PORTSC in configs set to PORT_PTS_UTMI | PORT_PTS_PTW, which is in fact the default register value for MX6, MX7 and MX7ULP. Define the default value of CONFIG_MXC_USB_PORTSC in the driver and use it in case CONFIG_MXC_USB_PORTSC is not defined in config, to reduce the duplication. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Add generic EHCI PHY supportMarek Vasut1-2/+17
In case PHY support is enabled, use the generic EHCI PHY support to start and stop the PHY. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Use portnr from DT in DM caseMarek Vasut1-45/+7
In case the platform uses DM, determine port number, which is used as offset in USBMISC registers, from PHY node DT aliases, just like Linux does. Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Pass MISC address to usb_oc_config()Marek Vasut1-11/+8
Instead of passing ad-hoc sequence number to usb_oc_config(), pass in the USB MISC address itself. The USB MISC address comes from DT in DM case, and from the old method using controller index in non-DM case. Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Split usb_power_config()Marek Vasut1-51/+92
Split usb_power_config() per SoC and pass in USB PHY, USBNC and ANATOP addresses instead of ad-hoc sequence numbers. This is only applicable on legacy systems which do not implement proper PHY support. Once PHY support is available, parts of this can be removed altogether and moved to the PHY driver, similar to Linux phy-mxs-usb.c . Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Pass PHY address to usb_*_phy*()Marek Vasut1-19/+10
Instead of passing ad-hoc index to USB PHY handling functions and then try and figure out the PHY address, pass in the PHY address itself. For DM case, this address comes easily from DT. For non-DM case, the previous method is still present, however the non-DM case will soon be removed. Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Split ehci_mx6_common_init()Marek Vasut1-30/+30
In order to pass component addresses around easily instead of passing ad-hoc sequence numbers, it is necessary to split ehci_mx6_common_init(). Make it so and call the separate functions instead. Since board_ehci_hcd_init() makes no sense in DM case, do not call it in DM case. Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Parse USB PHY and MISC offsets from DTMarek Vasut1-0/+55
In case DM and OF controler is enabled, but PHY support is disabled, parse USB PHY and MISC component addresses from DT manually. Those component addresses will be used in subsequent patches to access the ANATOP, PHY and MISC registers matching the controller and thus get rid of the ad-hoc controller sequence number mapping. Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Unify USBNC registersMarek Vasut1-34/+19
Merge USBNC register layout structure into a single one, instead of having three separate structures and a lot of ifdeffery. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Add DM clock supportMarek Vasut1-5/+32
Add support for using DM clock framework to enable and disable all the necessary clock for the USB controller. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-18usb: ehci-mx6: Turn off Vbus on probe failureMarek Vasut1-2/+27
The driver turns on Vbus regulator in probe, but fails to turn it back off in case of probe failure. Add the missing code. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass1-0/+1
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-05dm: core: Access device ofnode through functionsSimon Glass1-1/+1
At present ofnode is present in the device even if it is never used. With of-platdata this field is not used, so can be removed. In preparation for this, change the access to go through inline functions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-18usb: ehci-mx6: Drop assignment of sequence numberSimon Glass1-3/+9
This hack cannot work in the new sequence-numbering scheme. Remove it while we wait for the maintainer to complete DM conversion as noted in the existing comment. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-18dm: Avoid accessing seq directlySimon Glass1-1/+1
At present various drivers etc. access the device's 'seq' member directly. This makes it harder to change the meaning of that member. Change access to go through a function instead. The drivers/i2c/lpc32xx_i2c.c file is left unchanged for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass1-4/+4
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename ofdata_to_platdata() to of_to_plat()Simon Glass1-2/+2
This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename dev_get_platdata() to dev_get_plat()Simon Glass1-3/+3
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename 'platdata' variables to just 'plat'Simon Glass1-1/+1
We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass1-2/+2
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-25treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr()Masahiro Yamada1-2/+2
Use the _ptr suffixed variant instead of casting. Also, convert it to dev_read_addr_ptr(), which is safe to CONFIG_OF_LIVE. One curious part is an error check like follows in drivers/watchdog/omap_wdt.c: priv->regs = (struct wd_timer *)devfdt_get_addr(dev); if (!priv->regs) return -EINVAL; devfdt_get_addr() returns FDT_ADDR_T_NONE (i.e. -1) on error. So, this code does not catch any error in DT parsing. dev_read_addr_ptr() returns NULL on error, so this error check will work. I generated this commit by the following command: $ find . -name .git -prune -o -name '*.[ch]' -type f -print | \ xargs sed -i -e 's/([^*)]*\*)devfdt_get_addr(/dev_read_addr_ptr(/' I manually fixed drivers/usb/host/ehci-mx6.c Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-07-24Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"Tom Rini1-2/+2
This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing changes made to 56d37f1c564107e27d873181d838571b7d7860e7. Unfortunately this is causing CI failures: https://travis-ci.org/github/trini/u-boot/jobs/711313649 Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-20treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr()Masahiro Yamada1-2/+2
Use the _ptr suffixed variant instead of casting. Also, convert it to dev_read_addr_ptr(), which is safe to CONFIG_OF_LIVE. One curious part is an error check like follows in drivers/watchdog/omap_wdt.c: priv->regs = (struct wd_timer *)devfdt_get_addr(dev); if (!priv->regs) return -EINVAL; devfdt_get_addr() returns FDT_ADDR_T_NONE (i.e. -1) on error. So, this code does not catch any error in DT parsing. dev_read_addr_ptr() returns NULL on error, so this error check will work. I generated this commit by the following command: $ find . -name .git -prune -o -name '*.[ch]' -type f -print | \ xargs sed -i -e 's/([^*)]*\*)devfdt_get_addr(/dev_read_addr_ptr(/' I manually fixed drivers/usb/host/ehci-mx6.c Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-05-29usb: ehci-mx6: Print error code on failureMarek Vasut1-2/+2
Print the error code if the regulator enable fails, otherwise the error message is rather useless and confusing. Signed-off-by: Marek Vasut <marex@denx.de>
2020-05-29usb: ehci-mx6: Handle fixed regulators correctlyMarek Vasut1-2/+2
The regulator-fixed would return -ENOSYS when enabled/disabled, because this operation is not supported, but this is not an error e.g. on systems where the VBUS cannot be controlled, so if this is the error code reported by the regulator core, consider it a success and continue. Signed-off-by: Marek Vasut <marex@denx.de>
2020-05-18common: Drop linux/delay.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop log.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-10usb: mx6: add fuse checkPeng Fan1-0/+16
Add fuse check for USB. If the fuse indicates the module will not work in the SoC, let's fail the initialization. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-03-30usb: Migrate to support live DT for some driverKever Yang1-1/+1
Use ofnode_ instead of fdt_ APIs so that the drivers can support live DT. This patch updates usb_get_dr_mode() and usb_get_maximum_speed() to use ofnode as parameter instead of fdt offset. And all the drivers who use these APIs update to use live dt APIs at the same time. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-10-24ehci-mx6: Update EHCI driver to support OTG0 on i.MX7ULPYe Li1-13/+40
The ULP has two USB controllers. These two controllers have similar NC registers layout as i.MX7D. But OTG0 uses UTMI PHY simliar as i.MX6, not the integrated PHY on i.MX7D. The OTG1 needs off-chip HSIC PHY or ULPI PHY to work. This patch only supports OTG0 with UTMI PHY. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-10-24usb: ehci-mx6: Fix bus enumeration for iMX7 SoCsIgor Opaniuk1-7/+8
This fixes the issues with calculation of controller indexes in ehci_usb_bind() for iMX7, as USB controllers on iMX7 SoCs aren't placed next to each other, and their addresses incremented by 0x10000. Example of USB nodes for iMX7S/D: usbotg1: usb@30b10000 { compatible = "fsl,imx7d-usb", "fsl,imx27-usb"; reg = <0x30b10000 0x200>; ^^^^^^^^^^ .... usbotg2: usb@30b20000 { compatible = "fsl,imx7d-usb", "fsl,imx27-usb"; reg = <0x30b20000 0x200>; ^^^^^^^^^^ .... usbh: usb@30b30000 { compatible = "fsl,imx7d-usb", "fsl,imx27-usb"; reg = <0x30b30000 0x200>; ^^^^^^^^^^ .... Which was leading to usb enumeration issues: Colibri iMX7 # usb start starting USB... Bus usb@30b10000: USB EHCI 1.00 Bus usb@30b20000: probe failed, error -22 scanning bus usb@30b10000 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Fixes: 501547cec1("usb: ehci-mx6: Fix bus enumeration for DM case") Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-07-05usb: ehci-mx6: Fix bus enumeration for DM caseMarek Vasut1-0/+37
The EHCI iMX6 driver is only partly converted to DT probing and still uses a tremendous amount of hard-coded addresses. Worse, the driver uses hard-coded SoC-model-specific base addresses, which are derived from values protected by SoC-specific macros, hence the driver is also compiled for a specific SoC model. Even worse, the driver depends on specific sequential indexing of the controllers, from which it derives offsets in the PHY and ANATOP register sets. However, when the driver is probed from DT, the indexing is not correct. In fact, each controller has index 0. This patch derives the index for DT probing case from the controller base addresses, which is not the way this should be done, however it is the least intrusive approach, favorable this close to release. The necessary steps to convert this driver fully to DT probing are described inside the patch, however this should be done in the next release and depends on iMX clock driver patches. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Abel Vesa <abel.vesa@nxp.com> Cc: Adam Ford <aford173@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Ludwig Zenz <lzenz@dh-electronics.com> Cc: Lukasz Majewski <lukma@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Vagrant Cascadian <vagrant@debian.org>
2019-04-09usb: ehci-mx6: Use common code to extract dr_modeAdam Ford1-14/+15
There exists code in drivers/common/common.c to read the dr_mode from the device tree. This patch converts this driver to use that function to initialize the driver. Signed-off-by: Adam Ford <aford173@gmail.com>
2019-02-15usb: ehci-mx6: Make regulator DM_REGULATOR dependentAbel Vesa1-1/+6
Do the regulator related work only if the build has the DM_REGULATOR. Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2018-11-26usb: s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/Sven Schwermer1-1/+1
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. Signed-off-by: Sven Schwermer <sven@svenschwermer.de>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-01-24wait_bit: use wait_for_bit_le32 and remove wait_for_bitÁlvaro Fernández Rojas1-3/+2
wait_for_bit callers use the 32 bit LE version Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Jagan Teki <jagan@openedev.com>