summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-23arm: mvebu: serdes: Move Armada XP SERDES / PHY init code into new directoryStefan Roese
With the upcoming addition of the Armada 38x SPL support, which is not compatible to the Armada XP SERDES init code, we need to introduce a new directory infrastructure. So lets move the AXP serdes init code into a new directory. This way the A38x code can be added in a clean way. Signed-off-by: Stefan Roese <sr@denx.de>
2015-07-23Makefile: Fix mvebu build target to use SPL load and exe-addressStefan Roese
The u-boot-spl.kwb build target needs the SPL text-base (CONFIG_SPL_TEXT_BASE) as load and execution address. Signed-off-by: Stefan Roese <sr@denx.de>
2015-07-23arm: mvebu: Disable MMU before changing register base addressStefan Roese
Only with disabled MMU its possible to switch the base register address on Armada 38x. Without this the SDRAM located at >= 0x4000.0000 is also not accessible, as its still locked to cache. Signed-off-by: Stefan Roese <sr@denx.de>
2015-07-23arm: mvebu: spl.c: Add call to board_early_init_f()Stefan Roese
Pin muxing needs to be done before UART output, since on A38x the UART pins need some re-muxing for output to work. Signed-off-by: Stefan Roese <sr@denx.de>
2015-07-23arm: mvebu: Use default reg base address for SPL on A38xStefan Roese
On A38x switching the regs base address without running from SDRAM doesn't seem to work. So let the SPL still use the default base address and switch to the new address in the mail u-boot later. Signed-off-by: Stefan Roese <sr@denx.de>
2015-07-23ci_udc: fix 64-bit compile warningsStephen Warren
This is the same as f72d8320b605 "usb: ci_udc: fix warnings on 64-bit builds", but more. Signed-off-by: Stephen Warren <swarren@nvidia.com>
2015-07-23arm: mvebu: Call timer_init early before PHY and DDR initStefan Roese
Without calling timer_init(), the xdelay() functions return immediately. We need to call timer_init() early, so that these functions work and the PHY and DDR init code works correctly. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Anton Schubert <anton.schubert@gmx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
2015-07-23arm: mvebu: add Armada XP SATA supportAnton Schubert
This patch initializes the SATA address windows on Armada XP and allows it to work with the existing mvsata_ide driver. It also adds the necessary configuration for the db-mv784mp-gp board. Signed-off-by: Anton Schubert <anton.schubert@gmx.de> Tested-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
2015-07-22linux_compat: handle __GFP_ZERO in kmalloc()Masahiro Yamada
Currently, kzalloc() returns zero-filled memory, while kmalloc() simply ignores the second argument and never fills the memory area with zeros. I want kmalloc(size, __GFP_ZERO) to behave as kzalloc() does, which will make it easier to add more memory allocator variants. With the introduction of __GFP_ZERO flag, going forward, kzmalloc() variants can fall back to kmalloc() enabling the __GFP_ZERO flag. 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>
2015-07-22linux_compat: move vzalloc() to header file as an inline functionMasahiro Yamada
The vzalloc(size) is equivalent to kzalloc(size, 0). Move it to include/linux/compat.h as an inline function in order to avoid the function call overhead. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-22linux_compat: remove cpu_relax() defineMasahiro Yamada
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>
2015-07-22x86: delete unneeded declarations of disable_irq() and enable_irq()Masahiro Yamada
These two declarations in arch/x86/include/asm/interrupt.h conflict with ones in include/linux/compat.h, so x86 boards cannot include <linux/compat.h>. The comment /* arch/x86/lib/interrupts.c */ is bogus now, and we do not see any definitions of disable_irq() and enable_irq() in there. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-22usb: ehci-marvell: Drop wrl accessor functionStefan Roese
This patch removes the wrl accessor function from the Marvell EHCI driver by replacing it with the writel function. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Marek Vasut <marex@denx.de>
2015-07-22usb: CONFIG_USB_FASTBOOT prefix replacement for consistencyPaul Kocialkowski
FASTBOOT is defined both by CONFIG_USB_FUNCTION_FASTBOOT AND CONFIG_CMD_FASTBOOT, so it doesn't make much sense to have a CONFIG_USB_FASTBOOT prefix for fastboot-specific options, especially given that other config options for fastboot use the CONFIG_FASTBOOT prefix. This replaces the CONFIG_USB_FASTBOOT prefix with CONFIG_FASTBOOT, for consistency. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-07-22implement Fastboot via USB OTG on bcm28155_ap boardsJiandong Zheng
Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com> Signed-off-by: Steve Rae <srae@broadcom.com>
2015-07-22usb: gadget: bcm_udc_otg filesJiandong Zheng
Add the required files for the Broadcom UDC OTG interface. Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com> Signed-off-by: Steve Rae <srae@broadcom.com>
2015-07-22g_dnl: add missing declarationSteve Rae
Signed-off-by: Steve Rae <srae@broadcom.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Test HW: Exynos 4210 (trats), Exynos 5422 (Odroid XU3)
2015-07-22usb: gadget: fastboot: Dequeue the previous IN request for the current requestPaul Kocialkowski
Recent versions of the fastboot tool will query the partition type before doing an operation on a partition (such as erase, flash, etc). It will then submit the operation as soon as the response for the partition type is received. Usually, the MUSB controller will see that the partition type request return status was read by the host at the very same time as the actual operation request is submitted by the host. However, the operation will be read first (int_rx is handled first in musb_interrupt) and after it is completed, the fastboot USB gadget driver will send another return status. Hence, this happens before the musb gadget framework has had a chance to handle the previous acknowledgement that the host read the return status and dequeue the request. The host will then usually empty the FIFO by the time musb_interrupt gets around handling the return status acknowledgement (for the previous request, this is still on the same musb_interrupt call), so no other interrupt is generated and the most recent return status acknowledgement remains unaccounted for. It will then be used as a response for the next command, and the proper response for it will be delayed to the next command, and so on. Dequeuing the previous IN request in the fastboot code ensures that no previous return status remains. It is acceptable to do it since there is no callback to it anyways. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-07-22usb: gadget: fastboot: Request status and length check in rx handlerPaul Kocialkowski
This avoids handling requests that have an error status or no data. In particular, this avoids showing unnecessary error messages when the USB gadget gets disconnected (e.g. with fastboot continue) and the fastboot USB gadget driver sends an error back to the host (that has disconnected already). Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-07-22fastboot: Dynamic controller index for usb_gadget_handle_interruptsPaul Kocialkowski
Since we're now using a dynamic controller index for fastboot too, usb_gadget_handle_interrupts should be using it instead of 0 (despite the fact that it's currently not being used at all in the musb-new implementation). Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-07-22usb: gadget: Weak board_usb_init/cleanup definitions in USB download gadget codePaul Kocialkowski
Weak versions of board_usb_init and board_usb_cleanup are defined in common USB host code, but it is also used for USB device gadgets, so we also need a weak definition of it when there is no USB host enabled. Both weak definitions do not conflict. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)
2015-07-22usb: board_usb_init and board_usb_cleanup calls in the fastboot commandPaul Kocialkowski
Each USB download function command calls board_usb_init before registering the USB gadget and board_usb_cleanup after de-registering it. On devices currently using fasboot, musb-new is usually initialized earlier, but some other boards might need the board_usb_init call to properly initialize musb-new. This requires adding an argument (the USB controller index) to the fastboot command, as it is currently done with other USB download gadget functions. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)
2015-07-22usb: Fastboot function config for better consistency with other functionsPaul Kocialkowski
USB download gadget functions such as thor and dfu have a separate config option for the USB gadget part of the code, independent from the command part. This switches the fastboot USB gadget to the same scheme, for better consistency. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)
2015-07-22usb: USB download gadget and functions config options coherent namingPaul Kocialkowski
This introduces a coherent scheme for naming USB download gadget and functions config options. The download USB gadget config option is moved to CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each function's config option is moved to a CONFIG_USB_FUNCTION_ prefix. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)
2015-07-22drivers: usb: fsl: Remove LS102XA immap inclusionNikhil Badola
Remove LS102XA immap header inclusion from xhci fsl driver. It removes redefinition warnings when built for platforms other than LS102XA Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2015-07-22include: usb: Map USB controller base addresses for LS2085ANikhil Badola
Map USB XHCI controller base addresses for LS2085A SOC Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2015-07-22include: usb: Move USB controller base address mappingNikhil Badola
Move USB controller Base address mapping from ls102xa immap to fsl xhci header. This is required to remove any warnings when controller base addresses are mapped for multiple platforms in their respective files. Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2015-07-22drivers: usb: fsl: Implement Erratum A-009116 for XHCI controllerNikhil Badola
This adjusts (micro)frame length to appropriate value thus avoiding USB devices to time out over a longer run Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2015-07-22drivers: usb: fsl: Remove warnings for 64-bit architecturesNikhil Badola
Replace uint32_t with uintptr_t to remove compilation warnings for 64-bit architectures. Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2015-07-22ls1021aqds: Enable USB IP supportRamneek Mehresh
Enable USB IP support for both EHCI and XHCI for ls1021aqds platform Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-22ls1021atwr: Enable USB IP supportRamneek Mehresh
Enable USB IP support for both EHCI and XHCI for ls1021atwr platform Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-22arch: arm: fsl: Add XHCI support for LS1021ARamneek Mehresh
Add base register address information for USB XHCI controller on LS1021A Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-22usb: fsl: Add XHCI driver supportRamneek Mehresh
Add xhci driver support for all FSL socs Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-22usb: xhci: keystone: Remove common dwc3 drv functions callsRamneek Mehresh
Remove all redundant dwc3 driver function calls that are defined by dwc3 driver Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-22usb: xhci: omap: Remove common dwc3 drv functions callsRamneek Mehresh
Remove all redundant dwc3 driver function calls that are defined by dwc3 driver Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-22usb: xhci: exynos: Remove common dwc3 drv functions callsRamneek Mehresh
Remove all redundant dwc3 driver function calls that are defined by dwc3 driver Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-22usb: dwc3: Add DWC3 controller driver supportRamneek Mehresh
Add support for DWC3 XHCI controller driver Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-21net: Allow drivers to return -ENOSYS with the write_hwaddr() methodSimon Glass
Some drivers may want to implement this method for some of their devices but not for others. So it is not possible to just leave the operation out of the table. Drivers could get around this by masquerading as two separate drivers but that seems unpleasant. Allow the driver to return an error when it does not want to process the write_hwaddr() method. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: usb: eth: Add driver-model support to the asix driverSimon Glass
This USB Ethernet driver is quite widely use. Allow it to work with CONFIG_DM_ETH enabled. Most of the code remains common but there is a new packet receive flow which is handled specially. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: usb: Add driver-model support to ehci-pciSimon Glass
Support driver model in this driver. This uses the normal USB driver search mechanism. Any EHCI controllers will be set up as they are found during usb_init(). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
2015-07-21x86: minnowmax: Drop the cache line size hackSimon Glass
Now that the RTL8169 driver warning is fixed we can drop this. The incorrect value is causing problems with USB EHCI. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-07-21dm: usb: Adjust the USB_DEVICE() macro namingSimon Glass
In Linux USB_DEVICE() is used to declare a USB device by vendor/device ID. We should follow the same convention in U-Boot. Rename the existing USB_DEVICE() macro to U_BOOT_USB_DEVICE() and bring in the USB_DEVICE() macro from Linux for use in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: usb: eth: Support driver model with USB EthernetSimon Glass
At present USB Ethernet does not work with CONFIG_DM_ETH. Add driver model support to this feature, so that it can work alongside other Ethernet devices with driver model. It was found that quite a bit of code is common in most of the USB Ethernet drivers. Add this code to the common layer to reduce the amount of duplicate code needed in USB Ethernet drivers when CONFIG_DM_ETH is used. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
2015-07-21dm: eth: Avoid blocking on packet receptionSimon Glass
Some devices can take a long time to work out whether they have a new packet or now. For example the ASIX USB Ethernet dongle can take 5 seconds to do this, since it waits until it gets a new packet on the wire before allowing the USB bulk read packet to be submitted. At present with driver mode the Ethernet receive code reads 32 packets. This can take a very long time if we must wait for all 32 packets. The old code (before driver model) worked by reading a single set of packets from the USB device, then processing all the packets with in. It would be nice to use the same behaviour with driver model. Add a flag to the receive method which indicates that the driver should try to find a packet if available, by consulting the hardware. When the flag is not set, it should just return any packet data it has already received. If there is none, it should return -EAGAIN so that the loop will terminate. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: usb: Avoid using USB ethernet with CONFIG_DM_USB and no DM_ETHSimon Glass
If driver model is used for Ethernet then USB Ethernet does not build. This can be made to work with driver model is used for USB also. Add #ifdef logic to make this clear when building. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
2015-07-21dm: usb: Correct the struct usb_driver_entry commentSimon Glass
The function documentation is incorrect. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
2015-07-21dm: pci: Add a function to get the BDF for a deviceSimon Glass
It is useful to be able to find the full PCI address (bus, device and function) for a PCI device. Add a function to provide this. Adjust the existing code to use this. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: eth: Add driver-model support to the rtl8169 driverSimon Glass
This driver is used by the Intel Minnowmax board. Convert it to driver model so it can use the new Ethernet implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: pci: Add support for PCI driver matchingSimon Glass
At present all PCI devices must be present in the device tree in order to be used. Many or most PCI devices don't require any configuration other than that which is done automatically by U-Boot. It is inefficent to add a node with nothing but a compatible string in order to get a device working. Add a mechanism whereby PCI drivers can be declared along with the device parameters they support (vendor/device/class). When no suitable driver is found in the device tree the list of such devices is consulted to determine the correct driver. If this also fails, then a generic driver is used as before. The mechanism used is very similar to that provided by Linux and the header file defintions are copied from Linux 4.1. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2015-07-21usb: Update some EHCI driver licenses to use SPDXSimon Glass
A few drivers still write out the license in full. Fix these. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>