summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2018-06-18Merge git://git.denx.de/u-boot-x86Tom Rini3-0/+156
2018-06-17dm: video: Add an EFI framebuffer driverBin Meng3-0/+156
This adds a DM video driver for U-Boot as the EFI payload. The driver makes use of all necessary information from the passed EFI GOP info to create a linear framebuffer device, as if it were initialized by U-Boot itself. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2018-06-17Merge branch 'master' of git://git.denx.de/u-boot-shTom Rini12-1186/+7498
2018-06-16Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2-41/+166
2018-06-15serial: zynq: Make zynq_serial_setbrg staticMichal Simek1-1/+1
This function is used only inside this driver that's why should be static. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-15serial: zynq: Initialize uart only before relocationMichal Simek1-0/+6
This issue was found when OF_LIVE was enabled that there are scrambled chars on the console like this: Chip ID: zu3eg Watchdog: Started��j� sdhci@ff160000: 0, sdhci@ff170000: 1 In: serial@ff010000 I found a solution for this problem exactly the same as I found later in serial_msm fixed by: "serial: serial_msm: initialize uart only before relocation" (sha1: 7e5ad796bcd65772a87da236ae21cd536ae3a4d2) What it is happening is that output TX fifo still contains chars to be sent and _uart_zynq_serial_init() resets TX fifo even in the middle of transfer. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-15serial: zynq: Write chars till output fifo is fullMichal Simek1-2/+2
Change logic and put char to fifo till there is a space in output fifo. Origin logic was that output fifo needs to be empty. It means only one char was in output queue. Also remove unused ZYNQ_UART_SR_TXEMPTY macro. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-15serial: zynq: Use BIT macros instead of shifts and full hex numbersMichal Simek1-8/+8
Coding style is checking to use BIT macros instead of shifts. The patch is also fixing the rest of macros which should be BITs instead of hex numbers. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-15gpio: zynq_gpio: bank description should use unsigned typeMichal Simek1-4/+4
Use u32 instead of int for max_bank, bank_min and bank_max. These values can't be negative that's why no reason to use signed type. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15mmc: zynq: Fix tuning_loop_counter type in arasan_sdhci_execute_tuning()Michal Simek1-1/+1
Code around tuning_loop_counter variable expects to go below zero. That's why this variable can't use unsigned type. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15gpio: zynq: Do not check unsigned type that is >= 0Michal Simek1-1/+1
There is no reason to check that unsigned type that is >= 0. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15mmc: sdhci: Fix MMC HS200 tuning command failuresSiva Durga Prasad Paladugu1-4/+4
This patch fixes the mmc tuning command failures when tuning pattern data needs to read back for comparision against the expected bit pattern. Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-15timer: cadence: Implement timer_get_boot_usMichal Simek1-0/+22
This function is required for adding bootstage support. Also enable it directly for ZynqMP R5 configuration. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-14pinctrl: renesas: Sync Gen3 PFC tables with Linux v4.17Marek Vasut7-1180/+6929
Sync the PFC tables with Linux v4.17. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2018-06-14pinctrl: renesas: Sync Gen2 PFC tables with Linux v4.17Marek Vasut3-6/+559
Sync the PFC tables with Linux v4.17. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2018-06-14clk: rmobile: Add R8A77995 RPC clockMarek Vasut1-0/+5
Add missing RPC entry into the R8A77995 clock driver tables. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2018-06-14clk: rmobile: Add R8A77990 RPC clockMarek Vasut1-0/+5
Add missing RPC entry into the R8A77990 clock driver tables. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2018-06-14Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini14-69/+1294
2018-06-14usb: sunxi: access ahb_reset0_cfg in CCM using its offsetVasily Khoruzhick2-6/+37
struct sunxi_ccm_reg doesn't have ahb_reset0_cfg on sun4i and sun5i, thus compilation fails with: drivers/usb/host/ohci-sunxi.c:96:26: error: 'struct sunxi_ccm_reg' has no member named 'ahb_reset0_cfg' Access this reg using its offset to fix this issue. Fixes commit 1ed9c1118 ("usb: sunxi: ehci: get rid of ifdefs") and commit 56830cee3 ("usb: sunxi: ohci: get rid of ifdefs") Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2018-06-13net: gem: Check return value from memalign/mallocMichal Simek1-0/+6
Functions can return NULL in case of error that's why checking return value is needed. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13net: zynq_gem: Initialize phyreg variableMichal Simek1-1/+1
In case of phyread()/phy_setup_op() timeout code is working with uninitialized phyreg variable. Initialize this variable to make sure that code it not working with random value. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13net: zynq_gem: Fix return type for phy...()Michal Simek1-4/+4
wait_for_bit_le32 returns negative value on failure. Fix phy...() to handle these failures properly. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13net: mvgbe: extract common code for SMI waitChris Packham2-24/+24
Combine repeated code from smi_reg_read/smi_reg_write into a common function smi_wait_ready. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Chris Packham <judge.packham@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13net: designware: set the PS bit when resetting DMA bus in MII configurationQuentin Schulz1-0/+9
On the SPEAr600 SoC, which has the dwmac1000 variant of the IP block, the DMA reset never succeeds when a MII PHY is used (no problem with a GMII PHY). The designware_eth_init() function sets the DMAMAC_SRST bit in the DMA_BUS_MODE register, and then polls until this bit clears. When a MII PHY is used, with the current driver, this bit never clears and the driver therefore doesn't work. The reason is that the PS bit of the GMAC_CONTROL register should be correctly configured for the DMA reset to work. When the PS bit is 0, it tells the MAC we have a GMII PHY, when the PS bit is 1, it tells the MAC we have a MII PHY. Doing a DMA reset clears all registers, so the PS bit is cleared as well. This makes the DMA reset work fine with a GMII PHY. However, with MII PHY, the PS bit should be set. We have identified this issue thanks to two SPEAr600 platform: - One equipped with a GMII PHY, with which the existing driver was working fine. - One equipped with a MII PHY, where the current driver fails because the DMA reset times out. Note: Taken from https://www.spinics.net/lists/netdev/msg432578.html Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13net: phy: mv88e61xx: Force CPU port link upChris Packham1-21/+30
When connecting to from a CPU direct to a 88e6097 typically RGMII is used. In order for traffic to actually pass we need to force the link up so the CPU MAC on the other end will see the link. Signed-off-by: Chris Packham <judge.packham@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13mvebu: neta: align DMA buffersJon Nettleton1-6/+12
This makes sure the DMA buffers are properly aligned for the hardware. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Nettleton <jon@solid-run.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13net: add Socionext AVE ethernet driver supportKunihiko Hayashi3-0/+1006
Add driver for Socionext AVE ethernet controller that includes MAC and MDIO bus supporting RGMII/RMII modes. The driver behaves the ethernet driver model (DM_ETH) with devicetree. Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13drivers/net/vsc9953: Initialize action RAM in VCAP complexRadu Bulie1-0/+134
VCAP tables must be initialized even if no advanced classification is used. If no initialization is performed, then ECC error will be observed by the user when the first packet enters the l2switch. The error is marked in MPIC_EISR0 -bit 29 which means - Internal RAM multi-bit ECC error. This patch fixes the aforementioned ECC error by performing the initialization of VCAP tables. Signed-off-by: Radu Bulie <radu-andrei.bulie@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13net: cpsw: ti: Reap completed packets before stopping interfaceAlex Kiernan1-8/+16
If you send a final packet just before stopping the interface (e.g. a final ACK as part of the UDP fastboot protocol), then that packet isn't reliably delivered onto the wire. Reap packets prior to stopping the interface to ensure any which are in-flight make it out. Also remove buffer and len from the call to cpdma_process() as we weren't using them on their return. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13net/phy/cortina: Add support for CS4223 PHYVicentiu Galanopulo1-1/+47
Add support for Cortina CS4223 10G PHY - As per the CS4223 specs, an EEPROM module is connected to the PHY. At startup the PHY reads the firmware line and tries to load the firmware into the internal memory. - This driver reads the EEPROM status and checks if firmware has been loaded Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13net: sunxi: Correct MAC address register orderJoe Hershberger1-2/+2
Put the enetaddr data in the same order as it was before the change in commit ace1520cb5fc ("net: sunxi-emac: Write HW address via function") Reported-by: Udo Maslo <u.maslo@web.de> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13tsec: Fix reading phy registers from DTMario Six1-2/+3
Bus translations should be applied when reading the address of the sgmii phy registers from the DT. Use ofnode_get_addr_index instead of the plain ofnode_read_u32_default to fix this. Signed-off-by: Mario Six <mario.six@gdsys.cc> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-13Merge git://git.denx.de/u-boot-x86Tom Rini3-21/+46
2018-06-13lib: Add hexdumpAlexey Brodkin6-11/+16
Often during debugging session it's very interesting to see what data we were dealing with. For example what we write or read to/from memory or peripherals. This change introduces functions that allow to dump binary data with one simple function invocation like: ------------------->8---------------- print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len); ------------------->8---------------- which gives us the following: ------------------->8---------------- 00000000: f2 b7 c9 88 62 61 75 64 72 61 74 65 3d 31 31 35 ....baudrate=115 00000010: 32 30 30 00 62 6f 6f 74 61 72 67 73 3d 63 6f 6e 200.bootargs=con 00000020: 73 6f 6c 65 3d 74 74 79 53 33 2c 31 31 35 32 30 sole=ttyS3,11520 00000030: 30 6e 38 00 62 6f 6f 74 64 65 6c 61 79 3d 33 00 0n8.bootdelay=3. 00000040: 62 6f 6f 74 66 69 6c 65 3d 75 49 6d 61 67 65 00 bootfile=uImage. 00000050: 66 64 74 63 6f 6e 74 72 6f 6c 61 64 64 72 3d 39 fdtcontroladdr=9 00000060: 66 66 62 31 62 61 30 00 6c 6f 61 64 61 64 64 72 ffb1ba0.loadaddr 00000070: 3d 30 78 38 32 30 30 30 30 30 30 00 73 74 64 65 =0x82000000.stde 00000080: 72 72 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 rr=serial0@e0022 00000090: 30 30 30 00 73 74 64 69 6e 3d 73 65 72 69 61 6c 000.stdin=serial 000000a0: 30 40 65 30 30 32 32 30 30 30 00 73 74 64 6f 75 0@e0022000.stdou 000000b0: 74 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 30 t=serial0@e00220 000000c0: 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00.............. ... ------------------->8---------------- Source of hexdump.c was copied from Linux kernel v4.7-rc2. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Mario Six <mario.six@gdsys.cc> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Stefan Roese <sr@denx.de>
2018-06-13usb: sunxi: sun50i: enable OHCI0 clock when OHCI1 is in useVasily Khoruzhick1-2/+10
On A64 OHCI1 clock source is OHCI0 clock, so we need to enable OHCI0 clock when OHCI1 is in use. Fixes commit dd3228170ad7 ("usb: sunxi: Switch to use generic-phy") Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2018-06-13usb: sunxi: ohci: get rid of ifdefsVasily Khoruzhick1-20/+63
We can use compatibles instead. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2018-06-13usb: sunxi: ehci: get rid of ifdefsVasily Khoruzhick1-20/+63
We can use compatibles instead. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2018-06-13dm: pci: Use a 1:1 mapping for bus <-> phy addressesChristian Gmeiner1-0/+10
If U-Boot gets used as coreboot payload all pci resources got assigned by coreboot. If a dts without any pci ranges gets used the dm is not able to access pci device memory. To get things working make use of a 1:1 mapping for bus <-> phy addresses. This change makes it possible to get the e1000 U-Boot driver working on a sandybridge device where U-Boot is used as coreboot payload. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: fixed 'u-boot' in the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-13dm: pci: Make ranges dt property optionalChristian Gmeiner1-13/+10
If we use U-Boot as coreboot payload with a generic dts without any ranges specified we fail in pci pre_probe and our pci bus is not usable. So convert decode_regions(..) into a void function and do the simple error handling there. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: fixed 'u-boot' in the commit message and checkpatch warning] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-13usb: xhci-pci: Fix compiler warningBin Meng1-3/+2
This fixes the following compiler warning: "warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]" Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-13x86: tsc: add support for reading CPU freq from cpuidChristian Gmeiner1-5/+24
Starting with cpuid level 0x16 (Skylake-based processors) it is possible to get CPU base freq via cpuid. This fixes booting on a skylake based system. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: fixed wrong indention of labels] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2018-06-12Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini1-0/+29
2018-06-11LS1012AFRWY: Add Secure Boot supportVinitha V Pillai1-0/+29
Added the following: 1. defconfig for LS1012AFRWY Secure boot 2. PfE Validation support Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-06-08Merge branch 'master' of git://git.denx.de/u-boot-ubiTom Rini1-6/+6
2018-06-08Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini1-1/+23
2018-06-08bug.h: introduce WARN_ONCERamon Fried2-7/+0
Add WARN_ONCE definition to allow single time notification of warnings to the user. Taken from Linux kernel (4.17) with slight changes (Removed __section(.data.once)) Signed-off-by: Ramon Fried <ramon.fried@gmail.com> [trini: Drop the musb and dwc3 compat versions] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-06-07block: Have BLOCK_CACHE default to y in some casesTom Rini1-1/+2
When dealing with filesystems that come from block devices we can get a noticeable performance gain in some use cases from having the block cache enabled. The code paths are valid in other cases when we have BLK set and may provide wins in raw reads in some use cases, so have this be default when BLK is enabled. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-06-07i2c: mvtwsi: disable i2c slave on Armada 38xBaruch Siach1-1/+23
Equivalent code that disables the hidden i2c0 slave already exists in the Turris Omnia platform specific code. But this hidden i2c0 slave that interferes the i2c bus is not board specific. Armada 38x SoCs and at least some Kirkwood variants are affected as well. Add code to disable this slave to the i2c bus driver to make it work on all affected hardware. Use the bind callback because we want this to always run at boot, regardless of whether U-Boot uses the i2c bus. Cc: Rabeeh Khoury <rabeeh@solid-run.com> Cc: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2018-06-06Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini3-11/+4
2018-06-06mtd: ubi: Add missing newlines in ubi_init()Stefan Roese1-6/+6
I just stumbled over some cluttered UBI messages. It seems some newline chars are missing in the current U-Boot UBI source. Lets fix this in U-Boot as well (Linux has those fixes already). Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de>