summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2018-02-13rockchip: gpio: remove dead codeHeinrich Schuchardt1-4/+0
In the following statements if (a) return a; if (a) return c; the second return can never be executed. Identified by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-02-09drivers/ddr/fsl: Dual-license DDR driverYork Sun17-17/+17
To make this driver easier to be reused, dual-license DDR driver. Signed-off-by: York Sun <york.sun@nxp.com> CC: Simon Glass <sjg@chromium.org> CC: Tom Rini <trini@konsulko.com> CC: Heinrich Schuchardt <xypron.glpk@gmx.de> CC: Thomas Schaefer <thomas.schaefer@kontron.com> CC: Masahiro Yamada <yamada.masahiro@socionext.com> CC: Robert P. J. Day <rpjday@crashcourse.ca> CC: Alexander Merkle <alexander.merkle@lauterbach.com> CC: Joakim Tjernlund <joakim.tjernlund@transmode.se> CC: Curt Brune <curt@cumulusnetworks.com> CC: Valentin Longchamp <valentin.longchamp@keymile.com> CC: Wolfgang Denk <wd@denx.de> CC: Anatolij Gustschin <agust@denx.de> CC: Ira W. Snyder <iws@ovro.caltech.edu> CC: Marek Vasut <marek.vasut@gmail.com> CC: Kyle Moffett <Kyle.D.Moffett@boeing.com> CC: Sebastien Carlier <sebastien.carlier@gmail.com> CC: Stefan Roese <sr@denx.de> CC: Peter Tyser <ptyser@xes-inc.com> CC: Paul Gortmaker <paul.gortmaker@windriver.com> CC: Peter Tyser <ptyser@xes-inc.com> CC: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2018-02-09crypto/fsl: instantiate all rng state handlesLukas Auer4-39/+57
Extend the instantiate_rng() function and the corresponding CAAM job descriptor to instantiate all RNG state handles. This moves the RNG instantiation code in line with the CAAM kernel driver. Previously, only the first state handle was instantiated. The second one was instantiated by the CAAM kernel driver. This works if the kernel runs in secure mode, but fails in non-secure mode since the kernel driver uses DEC0 directly instead of over the job ring interface. Instantiating all RNG state handles in u-boot removes the need for using DEC0 in the kernel driver, making it possible to use the CAAM in non-secure mode. Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: York Sun <york.sun@nxp.com>
2018-02-09Move most CONFIG_HAVE_BLOCK_DEVICE to KconfigAdam Ford6-2/+13
config_fallbacks.h has some logic that sets HAVE_BLOCK_DEVICE based on a list of enabled options. Moving HAVE_BLOCK_DEVICE to Kconfig allows us to drastically shrink the logic in config_fallbacks.h Signed-off-by: Adam Ford <aford173@gmail.com> [trini: Rename HAVE_BLOCK_DEVICE to CONFIG_BLOCK_DEVICE] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-02-09block: Migrate SystemACE chip to KconfigTom Rini1-0/+18
Migrate the base and sub-options to Kconfig. Note that we only enable this in the base sandbox config now. Cc: Alexey Brodkin <alexey.brodkin@gmail.com> Cc: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tom Rini <trini@konsulko.com> --- Is this driver still used anywhere? It's fishy that it's only enabled in sandbox anymore.
2018-02-08Convert CONFIG_APBH_DMA et al to KconfigAdam Ford3-0/+22
This converts the following to Kconfig: CONFIG_APBH_DMA CONFIG_APBH_DMA_BURST CONFIG_APBH_DMA_BURST8 Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Stefan Agner <stefan.agner@toradex.com> [trini: Add in MMC as well] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-02-08Kconfig: net: phylib: Phylib should depends on NETMichal Simek1-0/+1
There is no value to enable phylib without networking support. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-02-08Convert CONFIG_NAND_MXS to KconfigStefan Agner1-1/+1
This converts CONFIG_NAND_MXS to Kconfig. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-02-08Convert CONFIG_MXC_GPIO to KconfigAdam Ford1-0/+5
This converts the following to Kconfig: CONFIG_MXC_GPIO Signed-off-by: Adam Ford <aford173@gmail.com>
2018-02-08atcspi200: avoid possible NULL dereferenceHeinrich Schuchardt1-2/+2
Check if ns before and not after dereferencing it. Indicated by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-02-06Merge git://git.denx.de/u-boot-ubiTom Rini1-5/+0
2018-02-06ubi: Ensure no fastmap flush after uif_closeMartin Townsend1-5/+0
On detach UBI attempts to update fastmap after closing user interfaces but at this point UBI volumes have already been free()'ed and fastmap can no longer access these data structures. Signed-off-by: Martin Townsend <mtownsend1973@gmail.com> Cc: hs@denx.de Cc: kmpark@infradead.org Cc: richard@sigma-star.at
2018-02-06i2c: mvtwsi.c: Avoid NULL dereferenceHeinrich Schuchardt1-1/+2
For '#ifndef CONFIG_DM_I2C' twsi_i2c_init() passes NULL as 4th parameter to __twsi_i2c_init(). Identified with cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-02-06i2c: ihs_i2c: Factor out send_buffer methodMario Six1-24/+26
Simplify the driver logic by extracting a common send_buffer method. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-02-06i2c: ihs_i2c: Make DM compatibleMario Six2-3/+199
Make the ihs_i2c driver DM-compatible; for legacy boards, the old functions are retained within #ifdefs. No board uses the new DM driver yet; this patch only lays the foundation for future support. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-02-06i2c: ihs_i2c: Prepare DM conversionMario Six1-29/+40
Prepare the function interface of the ihs_i2c driver for DM conversion in a future patch. While we're at it, fix some style violations, and make the code more readable. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-02-06i2c: fsl_i2c: Make live-tree compatibleMario Six1-10/+6
Make the fsl_i2c driver compatible with a live device tree. Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-02-06i2c: fsl_i2c: Remove inline declarationsMario Six1-7/+7
Some functions in the fsl_i2c driver are declared as inline, even though they are quite large, which needlessly increases the size of the resulting binary. This patch removes the inline declarations. Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-02-06i2c: fsl_i2c: Fix style violationsMario Six1-55/+56
Fix some style violations in the fsl_i2c I2C driver, and use shorter type names for variables in some cases. Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-02-06usb: ulpi: kconfig: Remove meaningless choice defaultUlf Magnusson1-1/+0
'default' on a choice refers to the symbol selected by default, not to the choice mode, so 'default n' is meaningless. No functional changes. Optional choices implicitly default to n mode (and there is no way to make them default to another mode). Discovered in Kconfiglib (https://github.com/ulfalizer/Kconfiglib), which prints the following warning: warning: the default selection n (undefined) of <choice> (defined at drivers/usb/ulpi/Kconfig:3) is not contained in the choice I've added a corresponding warning to the C tools too, which is currently in linux-next: https://patchwork.kernel.org/patch/9983667/ Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-02-05usb: dwc2: make casts of ep->dma_buf consistentTom Rini1-1/+1
In most places in the code we cast this to an unsigned long, but in one place we cast to an unsigned int. For consistency and to fix a warning on 64bit targets, always cast this to unsigned long. For the long term we should however change the declaration of dma_buf. Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Lukasz Majewski <lukma@denx.de> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2018-02-04Merge git://git.denx.de/u-boot-dmTom Rini1-0/+14
2018-02-04drivers/crypto/fsl: assign job-rings to non-TrustZoneBryan O'Donoghue2-0/+11
After enabling TrustZone various parts of the CAAM silicon become inaccessible to non TrustZone contexts. The job-ring registers are designed to allow non TrustZone contexts like Linux to still submit jobs to CAAM even after TrustZone has been enabled. The default job-ring permissions after the BootROM look like this for job-ring zero. ms=0x00008001 ls=0x00008001 The MS field is JRaMIDR_MS (job ring MID most significant). Referring to "Security Reference Manual for i.MX 7Dual and 7Solo Applications Processors, Rev. 0, 03/2017" section 8.10.4 we see that JROWN_NS controls whether or not a job-ring is accessible from non TrustZone. Bit 15 (TrustZone) is the logical inverse of bit 3 hence the above value of 0x8001 shows that JROWN_NS=0 and TrustZone=1. Clearly then as soon as TrustZone becomes active the job-ring registers are no longer accessible from Linux, which is not what we want. This patch explicitly sets all job-ring registers to JROWN_NS=1 (non TrustZone) by default and to the Non-Secure MID 001. Both settings are required to successfully assign a job-ring to non-secure mode. If a piece of TrustZone firmware requires ownership of job-ring registers it can unset the JROWN_NS bit itself. This patch in conjunction with a modification of the Linux kernel to skip HWRNG initialisation makes CAAM usable to Linux with TrustZone enabled. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Alex Porosanu <alexandru.porosanu@nxp.com> Cc: Ruchika Gupta <ruchika.gupta@nxp.com> Cc: Aneesh Bansal <aneesh.bansal@nxp.com> Link: https://github.com/OP-TEE/optee_os/issues/1408 Link: https://tinyurl.com/yam5gv9a Tested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-02-04mmc: fsl_esdhc: support SDR104 and HS200Peng Fan1-5/+358
Introduce SDR104 and HS200 support The implementation takes linux kernel sdhci.c and sdhci-esdhc-imx.c as reference. - Implement esdhc_change_pinstate to dynamically change pad settings - Implement esdhc_set_timing - Implement esdhc_set_voltage to switch voltage - Implement fsl_esdhc_execute_tuning to execute time process - Enlarge the cfg->f_max to 200MHz. - Parse fsl,tuning-step, fsl,tuning-start-tap and fsl,strobe-dll-delay-target from device tree. - Parse no-1-8-v property - Introduce esdhc_soc_data to indicate the flags and caps Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2018-02-04mmc: fsl_esdhc: add strobe and tuning entryPeng Fan1-8/+12
Add entries that will be used for tuning control. The whole layout not changed, just expand reserved3[84] and rename other reservedx in sequence. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2018-02-04rtc: adding RX8010SJ rtc driverNandor Han3-0/+385
Add a new driver for RX8010SJ rtc chip. The driver implements both formats of U-Boot driver model. Signed-off-by: Nandor Han <nandor.han@ge.com> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2018-02-04net: e1000: implement eth_write_hwaddrHannu Lounento1-0/+40
Implement programming MAC address to the hardware, i.e. external flash seen as EEPROM. MAC address is only written if it differs from what is already stored in flash or if reading the current MAC address fails. Signed-off-by: Hannu Lounento <hannu.lounento@ge.com> CC: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2018-02-04net: e1000: split e1000_read_mac_addrHannu Lounento1-18/+63
Split the implementation of e1000_read_mac_addr into eeprom and register versions called by e1000_read_mac_addr. This allows for calling e1000_read_mac_addr when MAC address is needed with no constraints where it is read from, and for calling the register and, especially, the eeprom version directly in order to specify where to read the address from. Signed-off-by: Hannu Lounento <hannu.lounento@ge.com> CC: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2018-02-04net: e1000: add support for writing to EEPROMHannu Lounento2-2/+174
Port functions for writing to EEPROM, updating the checksum and committing data to flash from the Linux kernel igb driver. Functions were ported from Linux 4.8-rc2 (694d0d0bb20). Signed-off-by: Hannu Lounento <hannu.lounento@ge.com> CC: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Reviewed-by: Stefano Babic <sbabic@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2018-02-04power: pmic/regulator allow dm be omitted by SPLPeng Fan2-2/+2
Allow the dm driver be omitted by SPL. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2018-02-04net: fec: fix build warnings for 64bits supportYe Li1-31/+43
When building for 64bits system, we get some warnings about type cast between pointer and integer. This patch eliminates the warnings by using ulong/long type which is 32bits on 32bits system or 64bits on 64bits system. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-02-04net: fec: do not access reserved register for i.MX8MPeng Fan1-2/+2
The MIB RAM and FIFO receive start register does not exist on i.MX8M. Accessing these register will cause system hang. Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2018-02-04gpio: mxc: add i.MX8M supportPeng Fan1-7/+15
Add i.MX8M GPIO support. There are 4 GPIO banks on i.MX8M. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
2018-02-04mmc: fsl_esdhc: support i.MX8MPeng Fan1-4/+8
Support i.MX8M in fsl esdhc driver. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-02-04misc: ocotp: add i.MX8M supportPeng Fan1-0/+7
i.MX8M OCOTP follow same flow as i.MX6Q, but it has 64 banks and each bank 4 words. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-02-03dm: core: Add a function to look up a uclass by nameSimon Glass1-0/+14
Each uclass has a driver name which we can use to look up the uclass. This is useful for logging, where the uclass ID is used as the category. Add a function to handle this, as well as a test. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-02-02Kconfig: gadget: Move CONFIG_USB_FUNCTION_MASS_STORAGE to KconfigLukasz Majewski1-0/+6
This commit moves USB_FUNCTION_MASS_STORAGE config to Kconfig. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2018-02-02Kconfig: gadget: Move CONFIG_USB_FUNCTION_THOR to KconfigLukasz Majewski1-0/+6
This commit moves USB_FUNCTION_THOR config to Kconfig. Signed-off-by: Lukasz Majewski <lukma@denx.de> Acked-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2018-02-02Kconfig: usb: Sort USB_FUNCTION_* entriesLukasz Majewski1-7/+7
Lets provide alphabetical order for USB_FUNCTION_* entries of USB_GADGET_DOWNLOAD Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-02-01Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini10-60/+220
2018-01-31Merge tag 'xilinx-for-v2018.03' of git://git.denx.de/u-boot-microblazeTom Rini2-36/+151
Xilinx changes for v2018.03 - Several Kconfig fixes (also moving configs to defconfigs) - Some DTS updates - ZynqMP psu rework based on Zynq concept - Add low level initialization for zc770 and zcu102 - Add support for Zynq zc770 x16 nand configuration - Add mini nand/emmc ZynqMP targets - Some arasan nand changes
2018-01-30Convert CONFIG_SYS_OMAP24_I2C_SLAVE et al to KconfigAdam Ford1-0/+14
This converts the following to Kconfig: CONFIG_SYS_OMAP24_I2C_SLAVE CONFIG_SYS_OMAP24_I2C_SPEED Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Paul Kocialkowski <contact@paulk.fr>
2018-01-30drivers/ddr/fsl: Cleanup unused variableYork Sun5-5/+0
Variable "row_density" is no longer used. Drop it from DIMM structure. Signed-off-by: York Sun <york.sun@nxp.com>
2018-01-30drivers/ddr/fsl: Modify binding registers to save time on data initYork Sun1-11/+49
DDR controllers always use binding register to determine the memory space to perform data initialization. In case of controller interleaving, the space is doubled, resulting twice long wait. It wasn't too bad until the memory capacity increases. To reduce the wait time, reduce the binding space to half and restore it after data initialization. Three-way interleaving is no longer used and is removed. Signed-off-by: York Sun <york.sun@nxp.com>
2018-01-30drivers/ddr/fsl: Add calculation of register control wordsYork Sun3-7/+48
DDR4 RDIMM has some information in SPD to be used to calculate the control words for register chip. The rest can be found from JEDEC spec DDR4RCD02. Signed-off-by: York Sun <york.sun@nxp.com>
2018-01-30drivers/ddr/fsl: Add 3DS RDIMM supportYork Sun5-14/+80
On top of RDIMM support, add new register calculation to support 3DS RDIMMs. Only symmetrical 3DS is supported at this time. Signed-off-by: York Sun <york.sun@nxp.com>
2018-01-30drivers/ddr/fsl: Fix workaround for A009803York Sun1-1/+1
Wrong field was masked in this workaround due to wrong endianness. The impacted SoCs have big-endian. Signed-off-by: York Sun <york.sun@nxp.com>
2018-01-30drivers/ddr/fsl: Fix DDR4 RDIMM supportYork Sun3-22/+40
For DDR4, command/address delay in mode registers and parity latency in timing config register are only needed for UDIMMs, but not RDIMMs. Add additional register rcw_3 for DDR4 RDIMM. Fix mirrored bit for dual rank RDIMMs. Set sdram_cfg_3[DIS_MRS_PAR] for RDIMMs. Fix calculation of timing config registers. Use hexadecimal format for printing RCW (register control word) registers. Signed-off-by: York Sun <york.sun@nxp.com>
2018-01-30driver: fsl-mc: Perform fsl-mc fdt fixup for lazyapply dplYogesh Gaur1-1/+3
For for case of lazyapply method, API fdt_fixup_board_enet() gets invoked before DPL being deployed. This leads to an issue that fsl-mc fdt fixup status marked as fail and dprc driver didn't get registered in linux boot. Fixes this issue by calling fdt_fixup_board_enet() for case when DPL is deployed successfully in lazyapply method. Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-01-30x86: qemu: qfw: Implement acpi_get_rsdp_addr()Bin Meng1-0/+8
U-Boot on QEMU does not build ACPI table by ourself, instead it uses the prebuilt ACPI table via the qfw interface. This implements the qfw version of acpi_get_rsdp_addr() for setup_zimage(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>