summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Convert CONFIG_SYS_I2C_DAVINCI to KconfigAdam Ford2018-08-171-0/+6
| | | | | | | This converts the following to Kconfig: CONFIG_SYS_I2C_DAVINCI Signed-off-by: Adam Ford <aford173@gmail.com>
* Convert CONFIG_TWL4030_LED et al to KconfigAdam Ford2018-08-172-0/+10
| | | | | | | | | | | This converts the following to Kconfig: CONFIG_TWL4030_LED CONFIG_TWL4030_INPUT This also removes dead references to: CONFIG_TWL4030_KEYPAD Signed-off-by: Adam Ford <aford173@gmail.com>
* Convert CONFIG_VIDEO_OMAP3 to KconfigAdam Ford2018-08-171-0/+6
| | | | | | | This converts the following to Kconfig: CONFIG_VIDEO_OMAP3 Signed-off-by: Adam Ford <aford173@gmail.com>
* Add BOOTCOUNT_BOOTLIMIT to set reboot limitAlex Kiernan2018-08-171-0/+8
| | | | | | Add ability to set environment bootlimit from Kconfig Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
* Convert CONFIG_MII et al to KconfigAdam Ford2018-08-171-0/+10
| | | | | | | | | | This converts the following to Kconfig: CONFIG_MII CONFIG_DRIVER_TI_EMAC Signed-off-by: Adam Ford <aford173@gmail.com> Acked-by: Jagan Teki <jagan@amarulasolutions.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* kconfig: fix typo 'parition'Simon Goldschmidt2018-08-171-1/+1
| | | | | | | | Replaced misspelled words "parition"/"paritioning" (missing 't') in two Kconfig files by correct words "partition"/"partitioning" Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* Merge branch 'master' of git://git.denx.de/u-boot-shTom Rini2018-08-174-1/+200
|\
| * phy: rcar: Add R-Car Gen2 PHY driverMarek Vasut2018-08-143-0/+199
| | | | | | | | | | | | | | | | Add a PHY driver for the R-Car Gen2 which allows configuring the mux connected to the EHCI controllers and USBHS controller. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * phy: Fix off-by-one error when parsing DT PHY bindingsMarek Vasut2018-08-141-1/+1
| | | | | | | | | | | | | | | | | | The code fails to copy the last PHY phandle argument, so it is missing from the adjusted phandle args and the consumer cannot use it to determine what the PHY should do. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Patrice Chotard <patrice.chotard@st.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini2018-08-177-9/+554
|\ \
| * | mmc: socfpga: Add clock framework supportMarek Vasut2018-08-131-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for fetching the clock frequency both using the legacy method in case clock framework is disabled as well as via the clock framework if it is enabled. This allows for migration to the clock framework on platforms which supports it while not breaking legacy platforms. That said, the legacy method must be removed eventually. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <chin.liang.see@intel.com> Cc: Dinh Nguyen <dinguyen@kernel.org> Cc: Ley Foon Tan <ley.foon.tan@intel.com>
| * | clk: socfpga: Add initial Arria10 clock driverMarek Vasut2018-08-133-0/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add clock driver for the Arria10, which allows reading the clock frequency from all the clock described in the DT. The driver also allows enabling and disabling the clock. Reconfiguring frequency is not supported thus far. Since the DT bindings for the SoCFPGA clock are massively misdesigned and the handoff DT adds additional incorrectly described entries to the DT, the driver contains workarounds which attempt to rectify all of those problems. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <chin.liang.see@intel.com> Cc: Dinh Nguyen <dinguyen@kernel.org> Cc: Ley Foon Tan <ley.foon.tan@intel.com>
| * | net: designware: socfpga: Add Arria10 extrasMarek Vasut2018-08-133-0/+152
| |/ | | | | | | | | | | | | | | | | | | | | | | Add wrapper around the designware MAC driver to handle the SoCFPGA specific configuration bits. On Arria10, this is configuration of syscon phy_intf. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <chin.liang.see@intel.com> Cc: Dinh Nguyen <dinguyen@kernel.org> Cc: Ley Foon Tan <ley.foon.tan@intel.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
* | tpm: sandbox: fix wrong assignment with a simplificationMiquel Raynal2018-08-131-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recv variable in sandbox_tpm2_fill_buf() is a pointer on a pointer of a char array. It means accessing *recv is the char array pointer itself while **recv is the first character of that array. There is no need for such indirection here, so simplify the code. Simplifying things will make the last assignment right: "*recv = NULL" is now correct. The issue has been found by the following Coverity Scan report: CID 183371: Incorrect expression (UNUSED_VALUE) Assigning value "4UL" to "*recv" here, but that stored value is overwritten before it can be used. 232 *recv += sizeof(rc); 233 234 /* Add trailing \0 */ 235 *recv = NULL; While at simplifying things, use '\0' instead of NULL when adding an empty char at the end of the buffer. Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | tpm: sandbox: fix wrong check on pcr_mapMiquel Raynal2018-08-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The second check on pcr_map in sandbox_tpm2_xfer() is wrong. It should check for pcr_map not being empty. Instead, it is a pure copy/paste of the first check which is redundant. This has been found thanks to a Coverity Scan report: CID 183370: Memory - illegal accesses (UNINIT) Using uninitialized value "pcr_index". put_unaligned_be32(tpm->pcr_extensions[pcr_index], recv); This is because pcr_index is initialized only if the user input is correct, ie. at least one valid bit is set in pcr_map. Fix the second check and also initialize pcr_index to 0 (which is harmless in case of error) to make Coverity Scan happy. Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | clk: at91: utmi: add timeout for utmi lockEugen Hristev2018-08-131-1/+6
| | | | | | | | | | | | | | | | | | | | In case the slow clock is not properly configured, the UTMI clock cannot lock the PLL, because UPLLCOUNT will "wait X slow clock cycles". In this case U-boot will loop indefinitely. Added a timeout in this case, to start U-boot even if UTMI clock is not enabled, so the user can use different media if needed, or investigate. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
* | Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini2018-08-135-41/+89
|\ \
| * | mtd: nand: fsl_ifc: Fix handling of bitflips in erased pagesDarwin Dingel2018-08-101-30/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix made for the fsl_ifc_nand driver on linux kernel by Pavel Machek and is applied to uboot. It is currently on applied on linux-mtd. https://patchwork.kernel.org/patch/9758117/ IFC always raises ECC errors on erased pages. It is only ignored when the buffer is checked for all 0xFF by is_blank(). The problem is a single bitflip will cause is_blank() and then mtd_read to fail. The fix makes use of nand_check_erased_ecc_chunk() to check for empty pages instead of is_blank(). This also makes sure that reads are made at ECC page size granularity to get a proper bitflip count. If the number of bitflips does not exceed the ECC strength, the page is considered empty and the bitflips will be corrected when data is sent to the higher layers (e.g. ubi). Signed-off-by: Darwin Dingel <darwin.dingel@alliedtelesis.co.nz> Cc: Pavel Machek <pavel@denx.de> Cc: Scott Wood <oss@buserror.net> Acked-by: Pavel Machek <pavel@denx.de> [Kurt: Replaced dev_err by printf due to compiler warnings] Tested-by: Kurt Kanzenbach <kurt@linutronix.de> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> Reviewed-by: York Sun <york.sun@nxp.com>
| * | armv8: ls1046a: add icid setup for qman portalsLaurentiu Tudor2018-08-101-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | Add support for ICID setting of qman portals and the required device tree fixups. Also fix an endiness issue in portal setup code. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * | misc: fsl_portals: setup QMAN_BAR{E} also on ARM platformsLaurentiu Tudor2018-08-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMAN_BAR{E} register setup was disabled on ARM platforms, however the register does need to be set. Enable the code also on ARMs and fix the CONFIG_SYS_QMAN_MEM_PHYS define to the correct value so that the newly enabled code works. Reviewed-by: Bharat Bhushan <bharat.bhushan@nxp.com> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * | fsl/mc: Limit the ethernet name to ETH_NAME_LENPankaj Bansal2018-08-082-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ethernet name should be within the ETH_NAME_LEN, as this is the buffer space allocated to ethernet name. Otherwise, this causes buffer overflow. Reported-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * | FSL PCI: Configure PCIe reference ratioJoakim Tjernlund2018-08-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most FSL PCIe controllers expects 333 MHz PCI reference clock. This clock is derived from the CCB but in many cases the ref. clock is not 333 MHz and a divisor needs to be configured. This adds PEX_CCB_DIV #define which can be defined for each type of CPU/platform. Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com> Reviewed-by: York Sun <york.sun@nxp.com>
* | | Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-stagingTom Rini2018-08-116-1/+497
|\ \ \
| * | | misc: Add gdsys_ioep driverMario Six2018-08-114-0/+353
| | | | | | | | | | | | | | | | | | | | | | | | Add driver for the IHS IO endpoint on IHS FPGAs. Signed-off-by: Mario Six <mario.six@gdsys.cc>
| * | | test: Add tests for misc uclassMario Six2018-08-112-1/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a set of tests for the misc uclass. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | | misc: uclass: Add enable/disable functionMario Six2018-08-111-0/+10
| | |/ | |/| | | | | | | | | | | | | | | | Add generic enable/disable function to the misc uclass. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
* | | Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2018-08-1115-21/+3784
|\ \ \ | |/ / |/| |
| * | video_display: Add Xilinx LogiCore DP TXMario Six2018-08-116-0/+3099
| | | | | | | | | | | | | | | | | | | | | Add a driver for the Xilinx LogiCORE DisplayPort IP core, which is a pure DP transmitter core for Xiling FPGA (no display capabilities). Signed-off-by: Mario Six <mario.six@gdsys.cc>
| * | video: Sort Makefile entriesMario Six2018-08-111-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | The entries of Makefiles should be sorted, which is not the case in the video driver Makefile. Sort the entries alphabetically as far as this makes sense. Signed-off-by: Mario Six <mario.six@gdsys.cc>
| * | axi: Add AXI sandbox driver and simple emulatorMario Six2018-08-115-0/+295
| | | | | | | | | | | | | | | | | | | | | Add test infrastructure and tests for the AXI uclass. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
| * | axi: Add ihs_axi driverMario Six2018-08-113-0/+306
| | | | | | | | | | | | | | | | | | | | | Add a driver for the gdsys IHS AXI bus used on IHS FPGAs. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
| * | drivers: Add AXI uclassMario Six2018-08-115-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | Add a uclass for AXI (Advanced eXtensible Interface) busses, and a driver for the gdsys IHS AXI bus on IHS FPGAs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | drivers: serial: document on_baudrate()Heinrich Schuchardt2018-08-101-0/+8
| | | | | | | | | | | | | | | | | | Add parameter description. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | | dm: led: move default state support in led uclassPatrick Delaunay2018-08-102-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch save common LED property "default-state" value in post bind of LED uclass. The configuration for this default state is only performed when led_default_state() is called; It can be called in your board_init() or it could added in init_sequence_r[] in future. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* | | Revert "dm: led: auto probe() LEDs with "default-state""Patrick Delaunay2018-08-101-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bc882f5d5c7b4d6ed5e927bf838863af43c786e7. because this patch adds the probe of LED driver during the binding phasis. It is not allowed in driver model because the drivers (clock, pincontrol) needed by the LED driver can be also probed before the binding of all the device and it is a source of problems. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* | | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2018-08-103-30/+245
|\ \ \ | |/ / |/| |
| * | dfu: Provide more verbose error messageSam Protsenko2018-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | It might be useful for user to see some human-readable root cause message in addition to "configuration failed" message, so that the issue can be fixed quickly. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
| * | dfu: Fix memory leak in dfu_init_env_entities()Sam Protsenko2018-08-081-3/+4
| | | | | | | | | | | | | | | | | | | | | In case of error in dfu_init_env_entities(), env_bkp will leak. Fix it by providing single return path. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
| * | dfu: Fix data abort in dfu_free_entities()Sam Protsenko2018-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5d8fae79163e ("dfu: avoid memory leak") brings a regression which described below. This patch is effectively reverting that commit, adding corresponding comment to avoid such regressions in future. In case of error in dfu_config_entities(), it frees "dfu" array, which leads to "data abort" in dfu_free_entities(), which tries to free the same array (and even tries to access it from linked list first). The issue occurs e.g. when partition table on device does not match $dfu_alt_info layout: => dfu 0 mmc 1 Couldn't find part #2 on mmc device #1 DFU entities configuration failed! data abort To fix this issue, do not free "dfu" array in dfu_config_entities(). It will be freed later in dfu_free_entities(). Tested on BeagleBone Black (where this regression was originally found). Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
| * | usb: rockchip: on K_FW_LBA_WRITE_10 remove magic block size of 512 bytesAlberto Panizzo2018-08-081-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As well as in K_FW_LBA_READ_10 and K_FW_LBA_ERASE_10 take device's block size from f_rkusb->desc->blksz instead of the fixed 512 bytes. Keep original behaviour of retry probing assigned block device on every host request to manage late SDCard plugs. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
| * | usb: rockchip: fix printing csw debug infoAlberto Panizzo2018-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Workstation tool was happy while console on device were printing random numbers.. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
| * | usb: rockchip: be quiet on serial port while transferring dataAlberto Panizzo2018-08-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While downloading or uploading megabytes of data we had thousands of printf in console like: transfer 0x10000 bytes done OR Uploading 0x1000 bytes This because transfers are chunked and there is no way on target side to know the overall transfer size (to print one string per overall transfer). All these prints on serial console do slow down significantly the transfer and does not offer a significant information to the developer: rkdeveloptool and Rockchip original tool do use small chunks read/writes on big transfers. This allows on workstation to print percentage of transfer complete and as well offers to developer the information about: transfer is running OK. On error, either the percentage will stop or an error will be shown on workstation console. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
| * | usb: rockchip: implement K_FW_LBA_ERASE_10 commandAlberto Panizzo2018-08-081-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | This command is part of the write partition sequence performed by rkdeveloptool: one partition is first completely erased and than wrote. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | usb: rockchip: implement K_FW_LBA_READ_10 commandAlberto Panizzo2018-08-081-1/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implement reading blocks form selected device with LBA addressing. Corresponding command on workstation is: rkdeveloptool rl <start_blk> <blk_cnt> <file> While we support reading more than one blocks per K_FW_LBA_READ_10 request, rkdeveloptool and original rockchip tool do perform chunk reads limiting the maximum size per chunk far lower than max int values. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | usb: rockchip: implement skeleton for K_FW_GET_CHIP_VER commandAlberto Panizzo2018-08-081-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chip Version is a string saved in BOOTROM address space Little Endian. Ex for rk3288: 0x33323041 0x32303134 0x30383133 0x56323030 which brings: 320A20140813V200 Note that memory version do invert MSB/LSB so printing the char buffer would show: A02341023180002V Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
| * | usb: rockchip: fix command failed on host side due to missing dataAlberto Panizzo2018-08-081-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two consecutive rockusb_tx_write without waiting for request complete do results in transfer reset of first request and thus no or incomplete data transfer. This because rockusb_tx_write do use just one USB request to keep serialization. So calls like: rockusb_tx_write_str(emmc_id); rockusb_tx_write_csw(cbw->tag, cbw->data_transfer_length, CSW_GOOD); was succeeding only when DEBUG was defined because the time spent printing debug info was enough for transfer to complete. This patch fixes the issue adding a simple request complete handler called rockusb_tx_write_csw to be set as complete handler of in_req when sending back simple payload + CSW replies to commands. This new handler will always send CSW_GOOD replies because in case of error the command callback itself must send back an error CSW as unique reply to command. This patch fixes execution of: $ rkdeveloptool rfi when DEBUG is not defined. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
| * | gadget: f_thor: fix hang-up with ctrl-cSeung-Woo Kim2018-08-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | After the commit 6aae84769a0b ("gadget: f_thor: Fix memory leaks of usb request and its buffer"), there is hang-up with ctrl-c in some udc. It is because req of out_ep is freed before out_ep is disabled. Fix hang-up with ctrl-c by disabling ep before free req of the ep. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
* | | Merge git://git.denx.de/u-boot-dmTom Rini2018-08-095-25/+232
|\ \ \
| * | | test: dm: pci: Add cases for finding PCI capability APIsBin Meng2018-08-081-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add several PCI capability and extended capability ID registers in the swap_case driver, so that we can add test case for dm_pci_find_capability() and dm_pci_find_ext_capability(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | | dm: pci: Add APIs to find capability and extended capabilityBin Meng2018-08-081-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces two new APIs dm_pci_find_capability() and dm_pci_find_ext_capability() to get PCI capability address and PCI express extended capability address for a given PCI device. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>