summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb-new
Commit message (Collapse)AuthorAgeFilesLines
* arm: Remove unused ST-Ericsson u8500 archStefan Roese2015-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This arch does not seem to be supported / used at all in the current U-Boot mainline source tree any more. So lets remove the core u8500 code and code that was only referenced by this platform. Please note that this patch also removes these config options: - CONFIG_PL011_SERIAL_RLCR - CONFIG_PL011_SERIAL_FLUSH_ON_INIT As they only seem to be referenced by u8500 based boards. Without any such board in the current code, these config option don't make sense any more. Lets remove them as well. If someone still wants to use this platform, then please send patches to re-enable support by adding at least one board that references this code. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: John Rigby <john.rigby@linaro.org> Cc: Simon Glass <sjg@chromium.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* sunxi: musb: Drop no longer accurate comment in Kconfig help textHans de Goede2015-08-311-3/+1
| | | | | | | | | Drop the no longer accurate part of the USB_MUSB_SUNXI Kconfig help text, since the musb-host code now supports the device-model, ehci and musb in host mode can both be enabled at the same time without issues. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: usb-phy: Never power off the usb portsHans de Goede2015-08-081-12/+16
| | | | | | | | | | | | | | | | | | | | | USB devices are not really designed to get the power bounced off and on at them. Esp. USB powered harddisks do not like this. Currently we power off the USB ports both on a "usb reset" and when booting the kernel, causing the usb-power to bounce off and then back on again. This patch removes the powering off calls, fixing the undesirable power bouncing. Note this requires some special handling for the OTG port: 1) We must skip the external vbus check if we've already enabled our own vbus to avoid false positives 2) If on an usb reset we no longer detect that the id-pin is grounded, turn off vbus as that means an external vbus may be present now Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* musb: sunxi: Force EP0 on re-enableMaxime Ripard2015-08-051-0/+3
| | | | | | | | Currently, the second use of a gadget will fail, while the first one works. Forcing the EP0 at every enable fix this issue. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* sunxi: usb: USB_MUSB_SUNXI move to musb-new KconfigPaul Kocialkowski2015-08-051-0/+14
| | | | | | | | | | | Now that the musb-new driver has a Kconfig, we can move Kconfig options to enable controllers to it, so that it's easier in e.g. menuconfig. In addition, this allows declaring support for USB_MUSB_HOST/GADGET in defconfigs instead of the USB_MUSB_SUNXI controller, that will get selected automatically when needed. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* usb: musb-new: Kconfig support for USB_MUSB_HOST and USB_MUSB_GADGETPaul Kocialkowski2015-08-051-0/+14
| | | | | | | Having MUSB_HOST and MUSB_GADGET in Kconfig allows more flexibility with regard to what Kconfig options to enable, such as USB_STORAGE or USB_KEYBOARD. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* usb: musb-new: CONFIG_MUSB prefix replacement with CONFIG_USB_MUSBPaul Kocialkowski2015-08-057-23/+23
| | | | | | | | | USB-related options are usually prefixed with CONFIG_USB and platform-specific adaptation for the MUSB controller already have a CONFIG_USB_MUSB prefix, so this switches all MUSB-related options to a CONFIG_USB_MUSB prefix, for consistency. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* sunxi: musb: Stop treating not having a vbus-det gpio as an errorHans de Goede2015-07-251-1/+1
| | | | | | | | | | | | | On some boards the otg is wired up in host-only mode in this case we have no vbus-det gpio. Stop logging an error from sunxi_usb_phy_vbus_detect() in this case, and stop treating sunxi_usb_phy_vbus_detect() returning a negative errno, as if a charger is plugged into the otg port. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: musb: Improve output during probingHans de Goede2015-07-251-5/+6
| | | | | | | | | When we return an error the usb core will print an error-message, so in this case do not print anything. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* sunxi: musb: Use device-model for musb host modeHans de Goede2015-07-251-0/+57
| | | | | | | | | | | | Modify the sunxi musb glue to use the device-model for musb host mode. This allows using musb in host mode together with other host drivers such as ehci / ohci, which is esp. useful on boards which use the musb controller in host-only mode, these boards have e.g. an usb-a receptacle or an usb to sata converter attached to the musb controller. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: musb: Move musb config and platdata to the sunxi-musb glueHans de Goede2015-07-251-10/+25
| | | | | | | | | Move the musb config and platdata to the sunxi-musb glue, which is where it really belongs. This is preparation patch for adding device-model support for the sunxi-musb-host code. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: musb: Add id pin supportHans de Goede2015-07-251-0/+5
| | | | | | | | | | When in host mode check if there is a host cable inserted into the otg port by checking the id pin. If there is no host cable return an error to make usb_lowlevel_init() exit early, rather then waiting for 1 second for a device which will never show up. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: musb: Move vbus check to sunxi_musb_enableHans de Goede2015-07-251-10/+9
| | | | | | | This way it can be re-checked on "usb reset". Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* linux_compat: remove cpu_relax() defineMasahiro Yamada2015-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | The macro cpu_relax() is defined by several headers in different ways. arch/{arm,avr32,mips}/include/asm/processor.h defines it as follows: #define cpu_relax() barrier() On the other hand, include/linux/compat.h defines it as follows: #define cpu_relax() do {} while (0) If both headers are included from the same source file, the warning warning: "cpu_relax" redefined [enabled by default] is displayed. It effectively makes it impossible to include <linux/compat.h> from some sources. Drop the latter. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* musb: Add device-model support to the musb-host u-boot glueHans de Goede2015-07-212-1/+73
| | | | | | | | | Add device-model support to the musb-host u-boot glue, note this only adds device-model support to the musb-core glue code, it does not add support for device-model to any of the SoC specific musb glue code. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* musb: Add musb_host_data struct to hold global dataHans de Goede2015-07-212-54/+77
| | | | | | | | Add a musb_host_data struct to hold all the global data host related musb data. This is a preparation patch for adding device-model support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* musb: Rename and wrap public functionsHans de Goede2015-07-211-11/+59
| | | | | | | | Rename and wrap the usb host API public functions, this is a preparation patch for adding device-model support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* musb: Update usb-compat to work with struct usb_device without a parent ptrHans de Goede2015-07-213-1/+75
| | | | | | | | When building with CONFIG_DM_USB=y struct usb_device does not have a parent pointer. This commit adds support to the musb code to deal with this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* musb: Allow musb_platform_enable to return an error codeHans de Goede2015-07-217-3/+64
| | | | | | | | | | | | | | | | | | | | Allow musb_platform_enable to return an error code and propagate it up to usb_lowlevel_init(). This allows moving the checks for an external vbus being present to be moved from platform_init to platform_enable, so that the user can unplug a charger, plug in a host adapter with a usb-device, do a "usb reset" and have things working. This also allows adding a check for the id-pin to platform_enable, so that it can short circuit the 1s delay in usb_lowlevel_init() when no host cable is plugged in and thus waiting for a device to show up is useless. Note that all the changes to code shared with the kernel are wrapped in the kernel. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* usb: Add an usb_device parameter to usb_reset_root_portHans de Goede2015-07-211-2/+2
| | | | | | | | | | | Add an usb_device parameter to usb_reset_root_port so that it knows which root-port it is resetting. This is necessary for proper device-model support for usb_reset_root_port. Also remove a duplicate declaration of usb_reset_root_port() from usb.h . Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* sunxi: musb: Remove unused sunxi_musb_exit methodHans de Goede2015-06-171-34/+0
| | | | | | | | | Remove the unused sunxi_musb_exit method, there is no code in u-boot calling the exit method, and our implementation was broken as it did not disable the clocks and asserted reset. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: musb: Do not fully reset the controler from sunxi_musb_disableHans de Goede2015-06-171-21/+31
| | | | | | | | | | | | | | Fully resetting the controller is a too big hammer, and the musb_core will then afterwards fail to communicate with any endpoints other then 0 as too much state was cleared. Instead report vbus low for 200ms which will effectively end the current session without needing to do a full reset. This fixes usb mass-storage devices no longer working after a "usb reset" Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: usb: Do not call phy_probe from hcd codeHans de Goede2015-05-041-6/+1
| | | | | | | | | | | | | | | | | | | The 2/3 usb-phys on the sunxi SoCs are really a single separate functional block, and are modelled as such in devicetree. So once we've moved all the sunxi usb code to the driver-model then phy_probe will be called once for the entire block from the driver-model enumeration code. Move to this now as this also avoids problems with phy_probe being called multiple times once we introduce ohci support. This also allows us to get rid of the sunxi_usb_phy_enabled_count variable as phy_probe now is guaranteed to be called only once. Since we're effectively rewriting the probe / remove functions, move them to the end of the file while we are at it, as that is the most logical place for them. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: usb: Rename the usbc.? files to usb_phy.?Hans de Goede2015-05-042-2/+2
| | | | | | | | The usbc.? files now only contain usb-phy related code, rename them to make this clear. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: usb: Rename sunxi_usbc_foo functions to sunxi_usb_phy_barHans de Goede2015-05-042-12/+12
| | | | | | | | | | | Rename the sunxi_usbc_foo functions to sunxi_usb_phy_bar to make it clear that these are usb-phy functions. Also change the verbs & nouns in the suffix to match the verbs & nouns used in the Linux kernels generic phy framework. This patch purely renames things, it contains no functional changes. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: usb: Move setup of host controller clocks to the host controller driversHans de Goede2015-05-041-0/+20
| | | | | | | | | | | | The sunxi "usbc" code is mostly about phy setup, but currently also sets up the host controller clocks, which is something which really belongs in the host controller drivers, so move it there. This is a preparation patch for moving the sunxi ehci code to the driver model and for adding ohci support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: Add basic A33 basic supportVishnu Patekar2015-05-041-0/+5
| | | | | | | | Enable full support for the A33 SoC including display, otg-usb, etc. Signed-off-by: Vishnu Patekar <vishnupatekar0510@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* dm: usb: Add a uclass for USB controllersSimon Glass2015-04-181-1/+3
| | | | | | | | Add a uclass that can represent a USB controller. For now we do not create devices for things attached to the controller. This will be added later. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* Merge branch 'master' of http://git.denx.de/u-boot-sunxiTom Rini2015-04-161-39/+6
|\
| * sunxi: common VBUS detection logic in usbcPaul Kocialkowski2015-04-151-29/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | VBUS detection could be needed not only by the musb code (to prevent host mode), but also by e.g. gadget drivers to start only when a cable is connected. In addition, this allows more flexibility in vbus detection, as it could easily be extended to other USBC indexes. Eventually, this would help making musb support independent from a hardcoded USB controller index (0). Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * sunxi: usb: Drop AXP-sepcific VBUS detection and drive logicPaul Kocialkowski2015-04-151-29/+19
| | | | | | | | | | | | | | | | | | VBUS detection and enable is now be used with virtual AXP GPIOs, so all the USB code has to use GPIO in every case and let sunxi_gpio do the heavy lifting. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* | usb: modify usb_gadget_handle_interrupts to take controller indexKishon Vijay Abraham I2015-04-141-1/+1
|/ | | | | | | | | | | | | | Since we support multiple dwc3 controllers to be existent at the same time, in order to handle the interrupts of a particular dwc3 controller usb_gadget_handle_interrutps should take controller index as an argument. Hence the API of usb_gadget_handle_interrupts is modified to take controller index as an argument and made the corresponding changes to all the usb_gadget_handle_interrupts calls. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* sunxi: musb: Fix some lo speed devices not working with musb hostHans de Goede2015-03-291-0/+14
| | | | | | | | | | | | | | | | The usb0 / otg phy on sunxi boards has a bug where it wrongly detects a high speed squelch on usb reset deassert when a lo speed device is plugged in. The android kernel has a work around for this in the form of temporary disabling the phy's squelch detection on reset deassert, this commit adds the same workaround to the u-boot sunxi musb code, thereby fixing various usb lo speed devices not working. Tested with a (before non working) usb keyboard and a usb 2.4 GHz wireless keyboard/mouse combo receiver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: musb: Return early on VBUS GPIO error instead of on a positive valuePaul Kocialkowski2015-03-211-1/+1
| | | | | | | | | This allows printing the error message when VBUS is detected, as it would with AXP VBUS detect. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* sunxi: musb: Support checking VBUS using AXP221 PMICChen-Yu Tsai2015-03-101-14/+38
| | | | | | | | | | | | | | | | This enables the musb glue layer to use the AXP221's VBUS detection function to check for VBUS. This fixes otg support on the A23 q8h tablets. Note that u-boot never calls musb_shutdown(), so once VBUS is enabled, it is never disabled until the system is powered off, or the OS does so. This can be used to our advantage to keep VBUS powered into the OS, where support for AXP221 is not available yet. Fixes: 52defe8f6570 ("sunxi: musb: Check Vbus-det before enabling otg port power") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb: musb-new: omap2430: Reset the MUSB controller earlyPaul Kocialkowski2015-02-241-0/+16
| | | | | | | | | | | | | | | When booting from USB peripheral boot, the bootrom will not properly deinit the MUSB controller, which doesn't clearly indicate an USB disconnection to the host and leaves U-Boot to deal with the state of the previous USB session. On some host controller drivers (e.g. xhci_hcd), this ends up in a failure during set address, caused by the lack of proper disconnection notification. Resetting the controller early in U-Boot notifies the host of the disconnection and doesn't hurt other use cases. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@ti.com>
* sunxi: musb: Check Vbus-det before enabling otg port powerHans de Goede2015-02-211-0/+29
| | | | | | | | | | | | Sending out 5V when there is a charger connected to the otg port is not a good idea, so check for this and error out. Note this commit currently breaks otg support on the q8h tablets, as we need to do some magic with the pmic there to get vbus info, this is deliberate (better safe then sorry), fixing this is on my TODO list. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: otg: Fix peripheral modeHans de Goede2015-02-161-12/+1
| | | | | | | | Peripheral mode needs us to signal vusb high to the phy for it to work, just like the host mode does. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* musb-new: Add interrupt queue supportHans de Goede2015-01-181-0/+65
| | | | | | | Add interrupt queue support, so that a usb keyboard can be used without causing huge latencies. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Add urb and hep parameters to construct_urbHans de Goede2015-01-181-32/+31
| | | | | | | | Make construct_urb take an urb and hep parameter, rather then having it always operate on the file global urb and hep structs. This is a preperation patch for adding interrupt queue support. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Properly remove a transfer from the schedule on timeoutHans de Goede2015-01-184-3/+14
| | | | | | | | | | | If a transfer / urb times-out, properly remove it from the schedule, rather then letting it sit on the ep head. This stops the musb code from getting confused and refusing to queue further transfers after a timeout. Tested by unplugging a usb-keyboard, replugging it and doing a usb-reset, before this commit the keyboard would not work after the usb-reset. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Fix reset sequence when in host modeHans de Goede2015-01-181-11/+20
| | | | | | | | | | | | | | | | | | | | | | This commit fixes a number of issues with the reset sequence of musb-new in host mode: 1) Our usb device probe relies on a second device reset being done after the first descriptors read. Factor the musb reset code into a usb_reset_root_port function (and add this as an empty define for other controllers), and call this when a device has no parent. 2) Just like with normal usb controllers there needs to be a delay after reset, for normal usb controllers, this is handled in hub_port_reset, add a delay to usb_reset_root_port. 3) Sync the musb reset sequence with the upstream kernel, clear all bits of power except bits 4-7, and increase the time reset is asserted to 50 ms. With these fixes an usb keyboard I have now always enumerates properly, where as earlier it would only enumerare properly once every 5 tries. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Fix interrupt transfers not workingHans de Goede2015-01-181-1/+1
| | | | | | | | | | | | | | For bulk and ctrl transfers common/usb.c sets udev->status = USB_ST_NOT_PROC, but it does not do so for interrupt transfers. musb_uboot.c: submit_urb() however was waiting for USB_ST_NOT_PROC to become 0, and thus without anyone setting USB_ST_NOT_PROC would exit immediately for interrupt urbs, returning the urb status of EINPROGRESS as error. This commit fixes this, thereby also making usb_kbd.c work together with musb_new and CONFIG_SYS_USB_EVENT_POLL. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Use time based timeouts rather then cpu-cycles based timeoutsHans de Goede2015-01-181-8/+8
| | | | | | | | | | | | CPU cycle based timeouts are no good, because how long they use depends on CPU speed. Instead use time based timeouts, and wait one second for a device connection to show up (per the USB spec), and wait USB_TIMEOUT_MS for various urbs to complete. This fixes "usb start" taking for ever when no device is plugged into the otg port. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Add sunxi musb controller supportHans de Goede2015-01-182-0/+280
| | | | | | | This is based on Jussi Kivilinna's work for the linux-sunxi-3.4 kernel to use the kernels musb driver instead of Allwinners own custom driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Add register defines for different reg layout on sunxiHans de Goede2015-01-181-0/+92
| | | | | | | The sunxi SoCs also have a musb controller, but with a different register layout. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb: musb-new: core: set MUSB_POWER_HSENAB in MUSB_POWER for host modeDaniel Mack2014-10-061-2/+0
| | | | | | | | | | | | | This bit allows the MUSB controller to negotiate for high-speed mode when the device is reset by the hub. If unset, Babble errors occur with high-speed mass storage devices right after the first packet. This condition is not caught by the interrupt handles in U-Boot, so no recovery is done, and the USB communication is stuck. To fix this, set the bit unconditionally, not only for CONFIG_USB_GADGET_DUALSPEED but also for host-only modes. Signed-off-by: Daniel Mack <zonque@gmail.com>
* kbuild: force to define __UBOOT__ in all the C sourcesMasahiro Yamada2014-09-168-8/+0
| | | | | | | | | | | | | | | | | | | | | | | U-Boot has imported various source files from other projects, mostly Linux. Something like #ifdef __UBOOT__ [ modification for U-Boot ] #else [ original code ] #endif is an often used strategy for clarification of adjusted parts, that is, easier re-sync in future. Instead of defining __UBOOT__ in each source file, passing it from the top Makefile would be easier. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
* lib, linux: move linux specific defines to linux/compat.hHeiko Schocher2014-08-251-58/+0
| | | | | | | | | | | | | | | | - move linux specific defines from usb and video code into linux/compat.h - move common linux specific defines from include/ubi_uboot.h to linux/compat.h - add for new mtd/ubi/ubifs sync new needed linux specific defines to linux/compat.h Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de> [trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from usb/lin_gadet_compat.h] Signed-off-by: Tom Rini <trini@ti.com>
* musb-new, dfu: first send request answer then call completionsHeiko Schocher2014-05-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | comment in ep0_txstate() states: "report completions as soon as the fifo's loaded; there's no win in waiting till this last packet gets acked". This is wrong for using dfu. In the dfu usecase we must send a PollTimeout to the host, so the host can wait until the U-Boot Code is ready for answering new usb requests. So the answer which contains the PollTimeout must send *before* U-Boot calls req->complete. The req->complete is used in the dfu case for flushing the medium, when entering DFU_STATE_dfuMANIFEST_SYNC state. Change-Id: Ib2941119c72761e48e15fedbdad1ecce07ae0b3d Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marex@denx.de> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
OpenPOWER on IntegriCloud