summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2015-08-05Tegra: clocks: Add 38.4MHz OSC support for T210 useTom Warren
Added 38.4MHz/48MHz entries to pll_x_table for CPU PLL. Needs to be measured - should be close to 700MHz (1.4G/2). Note that some freqs aren't in the PLLU table in T210 TRM (13, 26MHz), so I used the 12MHz table entry for them. They shouldn't be selected since they're not viable T210 OSC freqs. Since there are now 2 new OSC defines, all tables (pll_x_table, PLLU) had to increase by two entries, but since 38.4/48MHz are not viable osc freqs on T20/30/114, etc, they're just set to 0. Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-08-05Merge git://git.denx.de/u-boot-x86Tom Rini
2015-08-05pci: Remove DEBUG from pci_compat.cBin Meng
Remove DEBUG in drivers/pci/pci_compat.c. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-08-05net: asix: fix operation without eepromMarcel Ziswiler
This patch fixes operation of our on-board AX88772B chip without EEPROM but with a ethaddr coming from the regular U-Boot environment. This is a forward port of some remaining parts initially implemented by Antmicro. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Marek Vasut <marex@denx.de>
2015-08-05usb: USB storage-specific part ifdef in uclassPaul Kocialkowski
usb_stor_reset is only defined when USB storage support is enabled, thus the function is not declared when such support is missing. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-08-05musb: sunxi: Force EP0 on re-enableMaxime Ripard
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>
2015-08-05sunxi: usb: USB_MUSB_SUNXI move to musb-new KconfigPaul Kocialkowski
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>
2015-08-05usb: musb-new: Kconfig support for USB_MUSB_HOST and USB_MUSB_GADGETPaul Kocialkowski
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>
2015-08-05usb: musb-new: CONFIG_MUSB prefix replacement with CONFIG_USB_MUSBPaul Kocialkowski
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>
2015-08-05usb: Generic USB Kconfig option, that fits both host and gadget and commentsPaul Kocialkowski
There is no particular reason why the USB Kconfig option should be specific to host mode. In prevision of adding MUSB host and gadget to Kconfig, this moves the title and help message of the USB Kconfig option to a more generic format. Adding comments to the usb Kconfig allows for a better separation and more readability in generated configs and in menuconfig. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-08-05usb: USB_ARCH_HAS_HCD Kconfig option removalPaul Kocialkowski
The USB_ARCH_HAS_HCD currently serves no purpose and adds some confusion to the required Kconfig options that are required to have USB support. Dropping it makes things easier and doesn't break anything, since it was unused anyways. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-08-05usb: dwc2: Call board_usb_init() from usb_lowlevel_init()Peter Griffin
This patch makes the dwc2 controller like ehci / ohci / xhci controllers by calling the board_usb_init() function from usb_lowlevel_init. This can then be implemented by specific platforms to initialise their USB hardware (phys / clocks etc). Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
2015-08-05x86: Gracefully disable the vesa driver when running from EFISimon Glass
We cannot use this driver when running from EFI as we have no direct hardware access. In fact coreboot uses a different driver which uses tables provided by coreboot. So far it does not seem possible to use a normal video driver when booting from EFI. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05efi: Add a serial driverSimon Glass
Add a serial driver which makes use of EFI's console in/out service. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested on Intel Crown Bay and QEMU Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05x86: Move CONFIG_X86_SERIAL to KconfigSimon Glass
Move this config option to Kconfig and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05pci: Indicate prefetchable memory allocate when debuggingSimon Glass
At present the PCI output displays 'Mem' when it allocates memory for a PCI device, whether it is prefetchable or not. There is a distinction since the memory comes from separate pools. Use 'Prf' instead of 'Mem' when allocating prefetchable memory. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05pci: Add a constant for an invalid interruptSimon Glass
Rather than using 0xff in the code, add a constant. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05pci: Fix up code for CONFIG_PCI_ENUM_ONLYSimon Glass
This option is not used by any board but appears to still be useful, at least for testing. With recent commits it does not build, so fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05pci: Use debug() instead of DEBUGF() in pci_auto.cSimon Glass
This file does not need its own way of doing debug(). Clean it up to use the new way. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Pavel Machek <pavel@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05x86: Add some missing global_data declarations in files that use gdSimon Glass
Some files use global_data but don't declare it. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05dm: serial: Correct logic in serial_find_console_or_panic()Simon Glass
In a final attempt to find a console UART this function uses the first first available serial device. However the check for a valid device is inverted. This code is only executed when there is in fact no serial UART, but at present it can fail to reach the panic_str() call in this case, and start trying to use a non-existent UART. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05dm: core: Check for empty list in uclass_find_device()Simon Glass
This function needs to check the list has entries before traversing it. Fix this bug. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-05x86: Sanity test on vesa parameters before setting up kernel screen_infoBin Meng
We should not set up kernel screen_info when the vesa parameters are insane, otherwise kernel will panic. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-08-05dm: pci: Allow scan bridge child devices before relocationBin Meng
On some platforms pci devices behind bridge need to be probed (eg: a pci uart on recent x86 chipset) before relocation. Remove such limitation so that dm pci can be used before relocation. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-08-03drivers/ddr/fsl: Adjust bstopre valueYork Sun
By default the bstopre value has been set to 0x100, used to be 1/4 value of refint. Modern DDR has increased the refresh time. Adjust to 1/4 of refresh interval dynamically. Individual board can still override this value in board ddr file, or to use auto-precharge. Signed-off-by: York Sun <yorksun@freescale.com>
2015-08-03drivers/crypto/fsl: clean-up - use fdt_setprop_u32 helperhoria.geanta@freescale.com
Signed-off-by: Horia Geantă <horia.geanta@freescale.com> Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
2015-08-03drivers/crypto/fsl: fix snooping for write transactionshoria.geanta@freescale.com
HW coherency won't work properly for CAAM write transactions if AWCACHE is left to default (POR) value - 4'b0001. It has to be programmed to 4'b0010. For platforms that have HW coherency support: -PPC-based: the update has no effect; CAAM coherency already works due to the IOMMU (PAMU) driver setting the correct memory coherency attributes -ARM-based: the update fixes cache coherency issues, since IOMMU (SMMU) driver is not programmed to behave similar to PAMU Fixes: b9eebfade974c ("fsl_sec: Add hardware accelerated SHA256 and SHA1") Signed-off-by: Horia Geantă <horia.geanta@freescale.com> Reviewed-by: Aneesh Bansal <aneesh.bansal@freescale.com> Reviewed-by: Mingkai Hu <Mingkai.Hu@freescale.com> Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
2015-08-03drivers/crypto/fsl: fix "era" property value on LE platformshoria.geanta@freescale.com
Use fdt_setprop_u32() instead of fdt_setprop(). Fixes: 0181937fa371a ("crypto/fsl: Add fixup for crypto node") Signed-off-by: Horia Geantă <horia.geanta@freescale.com> Reviewed-by: Mingkai Hu <Mingkai.Hu@freescale.com> Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
2015-08-03drivers/pci/layerscape: Add EP mode supportMinghuan Lian
The patch will initialize PCIe controller on EP mode 1. Setup bar: bar0 32bit 4K for specific configuration bar1 32bit 8K for MSIX bar2 64bit 4K for descriptor of memory bar4 64bit 1M for DMA memory test 2. Setup iATU: iATU inbound 0-3 to map bar transaction to memory address started at CONFIG_SYS_PCI_EP_MEMORY_BASE iATU outbound 0 to map 4G memory space Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
2015-08-03drivers/pci: Add function to find an extended capabilityMinghuan Lian
PCIe extends device's configuration space to 4k and provides extended capability. The patch adds function to find them. The code is ported from Linux PCIe driver. Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: York Sun <yorksun@freescale.com>
2015-08-03drivers/fsl-mc: flib changes for mc 8.0.0Prabhakar Kushwaha
MC firware version 8.0.0 contains new command flags. This patch contains modifications in FLIB files to support the new command flags. Signed-off-by: Itai Katz <itai.katz@freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
2015-08-03drivers/crypto/fsl: enable raw data instead of von Neumann dataAlex Porosanu
The sampling of the oscillator can be done in multiple modes for generating the entropy value. By default, this is set to von Neumann. This patch changes the sampling to raw data, since it has been discovered that the generated entropy has a better 'quality'. Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com> Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
2015-08-03drivers/crypto/fsl: disable RNG oscillator maximum frequency checkAlex Porosanu
The rtfrqmax & rtfrqmin set the bounds of the expected frequency of the oscillator, when SEC runs at its maximum frequency. For certain platforms (f.i. T2080), the oscillator is very fast and thus if the SEC runs at a lower than normal frequency, the ring oscillator is incorrectly detected as being out of bounds. This patch effectively disables the maximum frequency check, by setting a high enough maximum allowable frequency for the oscillator. The reasoning behind this is that usually a broken oscillator will run too slow (i.e. not run at all) rather than run too fast. Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com> Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
2015-08-03driver/qe: use strncpy instead of strcpyZhao Qiang
strncpy is safer than strcpy, use it to instead of strcpy. Signed-off-by: Zhao Qiang <B45475@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
2015-08-03drivers/qe: transform parameter to compatible typeZhao Qiang
when using printf, the parameter type need to be compatible type, so transform them to compatible type Signed-off-by: Zhao Qiang <B45475@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
2015-08-02fsl_esdhc.c: Always make check_and_invalidate_dcache_range availableTom Rini
This function is called from esdhc_send_cmd so we need it available to everyone. Signed-off-by: Tom Rini <trini@konsulko.com>
2015-08-02Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini
2015-08-02mxc: gpio add i.MX6UL supportPeng Fan
i.MX6UL does not have GPIO6/7, so do not include them for i.MX6UL. Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
2015-08-02sf: kconfig: add kconfig options for spi flashesNikita Kiryanov
Add kconfig options for various SPI flashes and use them in cm-fx6 defconfig. Cc: Jagan Teki <jteki@openedev.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2015-08-02usb: kconfig: create a menu for usbNikita Kiryanov
With recent additions to USB Kconfig the number of USB options had grown large enough to warrant a separate menu for USB. Add a Kconfig menu for USB. Cc: Marek Vasut <marex@denx.de> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
2015-08-02usb: kconfig: usb keyboard kconfigNikita Kiryanov
Add Kconfig options for USB keyboard and use them for cm-fx6. Cc: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2015-08-02arm: mx6: usb: kconfig: add USB_EHCI_MX6 kconfig optionNikita Kiryanov
Add USB_EHCI_MX6 option to menuconfig and use it when migrating cm-fx6 usb config to defconfig. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2015-07-29Merge branch 'master' of git://git.denx.de/u-boot-tegraTom Rini
2015-07-28ARM: Tegra210: Add support to common Tegra source/config filesTom Warren
Derived from Tegra124, modified as appropriate during T210 board bringup. Cleaned up debug statements to conserve string space, too. This also adds misc 64-bit changes from Thierry Reding/Stephen Warren. Signed-off-by: Tom Warren <twarren@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
2015-07-28dm: pci: Support bridge device configuration correctlyBin Meng
Commit aec241d "dm: pci: Use the correct hose when configuring devices" was an attempt to fix pci bridge device configuration, but unfortunately that does not work 100%. In pciauto_config_devices(), the fix tried to call pciauto_config_device() with a ctlr_hose which is supposed to be the root controller hose, however when walking through a pci topology with 2 or more pci bridges this logic simply fails. The call chain is: pciauto_config_devices()->pciauto_config_device() ->dm_pci_hose_probe_bus(). Here the call to dm_pci_hose_probe_bus() does not make any sense as the given hose is not the bridge device's hose, instead it is either the root controller's hose (case#1: if it is the 2nd pci bridge), or the bridge's parent bridge's hose (case#2: if it is the 3rd pci bridge). In both cases the logic is wrong. For example, for failing case#1 if the bridge device to config has the same devfn as one of the devices under the root controller, the call to pci_bus_find_devfn() will return the udevice of that pci device under the root controller as the bus, but this is wrong as the udevice is not a bus which does not contain all the necessary bits associated with the udevice which causes further failures. To correctly support pci bridge device configuration, we should still call pciauto_config_device() with the pci bridge's hose directly. In order to access valid pci region information, we need to refer to the root controller simply by a call to pci_bus_to_hose(0) and get the region information there in the pciauto_prescan_setup_bridge(), pciauto_postscan_setup_bridge() and pciauto_config_device(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2015-07-28dm: pci: Pass only device/function to pci_bus_find_devfn()Bin Meng
In dm_pci_hose_probe_bus(), pci_bus_find_devfn() is called with a bdf which includes a bus number, but it really should not as this routine only expects a device/function encoding. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2015-07-28dm: pci: Use complete bdf in all pci config read/write routinesBin Meng
Currently pci_bus_read_config() and pci_bus_write_config() are called with bus number masked off in the parameter bdf, and bus number is supposed to be added back in the bridge driver's pci config read/write ops if the device is behind a pci bridge. However this logic only works for a pci topology where there is only one bridge off the root controller. If there is addtional bridge in the system, the logic will create a non-existent bdf where its bus number gets accumulated across bridges. To correct this, we change all pci config read/write routines to use complete bdf all the way up to the root controller. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2015-07-28dm: pci: Correct primary/secondary/subordinate bus number assignmentBin Meng
In driver model, each pci bridge device has its own hose structure. hose->first_busno points to the bridge device's device number, so we should not substract hose->first_busno before programming the bridge device's primary/secondary/subordinate bus number registers. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2015-07-28Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblazeTom Rini
2015-07-28spi: zynq_spi: Simplify debug macroMichal Simek
Trivial fix. Signed-off-by: Michal Simek <michal.simek@xilinx.com>