summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* serial: serial-uclass: Add generic serial RX buffer supportStefan Roese2017-08-242-2/+61
| | | | | | | | | | | | | | | | | | Pasting longer lines into the U-Boot console prompt sometimes leads to characters missing. One problem here is the small 16-byte FIFO of the legacy NS16550 UART, e.g. on x86 platforms. This patch now introduces a Kconfig option to enable RX buffer support for all DM based serial drivers. With this option enabled, I was able paste really long lines into the U-Boot console, without any characters missing. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* Revert "serial: ns16550: Add RX interrupt buffer support"Stefan Roese2017-08-242-128/+5
| | | | | | | | | | | | | | | | | | | This reverts commit 6822cf3ec7c8768b8727573b8f4b2cb3d870b881. As Bin Meng has tested and pointed out, we don't need the RX interrupt for the RX buffer support at all. Just reading all available characters into a buffer is sufficient to solve the problem with the dropped characters upon long lines pasted into the U-Boot prompt. Since this RX buffer support can be implemented in a generic way, without any device specifica (e.g. for the ns16550), I'll post a new patch with a new serial RX buffer support for DM, which all DM based serial drivers can use. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* vbe: Drop vbe_get_video_info()Bin Meng2017-08-241-41/+0
| | | | | | With DM video, this is not used any more. Drop it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ich-spi: Move opcode registers configuration to another routineBin Meng2017-08-241-6/+16
| | | | | | | | | | | At present the ICH SPI opcode registers configuration is done in the ich_spi_remove() routine, a little bit weird but that's how current. Linux MTD driver works. This changes to move the opcode registers configuration to a separate routine ich_spi_config_opcode() which might be called by U-Boot itself as well. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
* x86: ich-spi: Don't read cached lock statusBin Meng2017-08-242-8/+23
| | | | | | | | | | | | | | | | | | | At present the ICH SPI controller driver reads the controller lock status from its register in the probe routine and saves the lock status to a member of priv. Later the driver uses the cached status from priv to judge whether the controller setting is locked and do different setup. But such logic is only valid when there is only the SPI controller driver that touches the SPI hardware. In fact the lock status change can be trigged outside the driver, eg: during the fsp_notify() call when Intel FSP is used. This changes the driver to read the lock status every time when an SPI transfer is initiated instead of reading the cached one. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
* x86: ich-spi: Remove unnecessary assignment in ich_init_controller()Bin Meng2017-08-241-1/+0
| | | | | | | There is no need to do another assignment to ich7_spi. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
* x86: ich-spi: Remove spi_write_protect_region()Bin Meng2017-08-241-50/+0
| | | | | | | This routine is not called anywhere. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
* fastboot: Ensure we treat CONFIG_FASTBOOT_BUF_ADDR as longTom Rini2017-08-221-1/+1
| | | | | | | | | Otherwise: drivers/usb/gadget/f_fastboot.c:564:32: warning: format "%lx" expects argument of type "long unsigned int", but argument 3 has type "unsigned int" [-Wformat=] Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge git://git.denx.de/u-boot-usbTom Rini2017-08-212-2/+8
|\
| * fastboot: avoid printing invalid dataJohn Keeping2017-08-211-1/+1
| | | | | | | | | | | | | | | | There is no guarantee that commands are null-terminated in the USB request buffer, so limit the length of data that is printed. Signed-off-by: John Keeping <john@metanate.com> Tested-by: Steve Rae <steve.rae@raedomain.com>
| * Fix fastboot boot addressPeter Chubb2017-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Fastboot loads an image at CONFIG_FASTBOOT_BUF_ADDR, but currently tells do_bootm() to look for an image at $loadaddr. This breaks if CONFIG_FASTBOOT_BUF_ADDR is different from the current user-set loadaddr. Instead, tell do_bootm() to pick up the image where it was laoded. Signed-off-by: Peter Chubb <peter.chubb@data61.csiro.au> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Steve Rae <steve.rae@raedomain.com>
| * usb: ehci: Convert CONFIG_USB_EHCI_PCI to KconfigBin Meng2017-08-211-0/+6
| | | | | | | | | | | | | | This converts CONFIG_USB_EHCI_PCI to a Kconfig option, and updates all boards that use it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* | reset: uniphier: refactor reset data and add NAND/eMMC reset linesMasahiro Yamada2017-08-201-46/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | - Merge sys_reset data of LD4, Pro4, sLD8 and Pro5 - Merge sys_reset data of LD11 and LD20 - Use primitive UNIPHIER_RESETX() macro because bit assignments for system reset will be changed for every SoC in the future - Add NAND and eMMC resets Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | ARM: uniphier: remove sLD3 SoC supportMasahiro Yamada2017-08-206-153/+3
| | | | | | | | | | | | This SoC is too old. It is difficult to maintain any longer. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | clk: uniphier: fix unmet direct dependencies warningMasahiro Yamada2017-08-201-3/+2
|/ | | | | | | | | | | | | | Since commit f0776a551764 ("spl: dm: Kconfig: SPL_CLK depends on SPL_DM"), the following warning is displayed: $ make uniphier_v8_defconfig warning: (ARCH_ZYNQ && ARCH_ZYNQMP && STM32F7 && CLK_UNIPHIER) selects SPL_CLK which has unmet direct dependencies (CLK && SPL_DM) While I am here, I am removing the prompt to make it user-unconfigurable option so that "select CLK_UNIPHIER" can be omitted. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini2017-08-1818-606/+971
|\
| * mmc: Support generic PCI SD host controllerBin Meng2017-08-181-6/+1
| | | | | | | | | | | | | | | | This changes pci_mmc driver to use PCI_CLASS_SYSTEM_SDHCI instead of individual vendor id & device id pair to support generic PCI SD host controller. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| * cmd: mmc: add mmc partconf read capabilityAngelo Dureghello2017-08-171-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to show the EXT_CSD[179] partition_config register info, just by specifying the dev param: U-Boot> mmc partconf 0 EXT_CSD[179], PARTITION_CONFIG: BOOT_ACK: 0x0 BOOT_PARTITION_ENABLE: 0x0 PARTITION_ACCESS: 0x0 Signed-off-by: Angelo Dureghello <angelo@sysam.it> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * dm: mmc: Drop CONFIG_DM_MMC_OPSSimon Glass2017-08-177-54/+28
| | | | | | | | | | | | | | All boards which use DM_MMC have now been converted to use DM_MMC_OPS. Drop the option and good riddance. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: Correct Kconfig condition for SPL_DM_MMC_OPSSimon Glass2017-08-171-1/+1
| | | | | | | | | | | | | | This should depend on SPL_DM_MMC, not SPL_DM. For it and update the only affected board's defconfig. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: imx: cm_fx6: Enable more driver model supportSimon Glass2017-08-171-1/+1
| | | | | | | | | | | | | | | | Enable driver model for MMC (including BLK), SATA and USB. Note that USB does not yet work correctly since the nodes are disabled. Hopefully this can be resolved by the maintainer. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: fsl_esdhc: Update to support MMC operationsSimon Glass2017-08-171-5/+64
| | | | | | | | | | | | | | This driver does not currently support CONFIG_DM_MMC_OPS. Update it to fully convert it to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: fsl_esdhc: Update to support livetreeSimon Glass2017-08-171-9/+7
| | | | | | | | | | | | Update this driver to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: fsl_esdhc: Drop mmc_init() call from fsl_esdhc_init()Simon Glass2017-08-171-7/+7
| | | | | | | | | | | | | | We want to use fsl_esdhc_init() with driver model. Move the mmc_init() out of this function so that we can use it for our common init. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: fsl_esdhc: Set up platform dataSimon Glass2017-08-171-22/+39
| | | | | | | | | | | | | | With driver model we want to store the mmc and configuration structure in platform data. Set up structure up and use it for non-DM as well. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: fsl_esdhc: Detect init failureSimon Glass2017-08-171-3/+6
| | | | | | | | | | | | | | | | Since esdhc_init_common() can fail it should return an error code. Update this and also adjust the timeout mechanism to use get_timer(), which is a more common approach. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: fsl_esdhc: Detect reset failureSimon Glass2017-08-171-7/+15
| | | | | | | | | | | | | | | | Since esdhc_reset() can fail it should return an error code. Update this and also adjust the timeout mechanism to use get_timer(), which is a more common approach. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: fsl_esdhc: Set up common versions of operationsSimon Glass2017-08-171-11/+36
| | | | | | | | | | | | | | | | | | Driver model wants to use the core functions in this file but accesses the driver-private data in a different way. Move the code into new 'common' functions and set up stubs to call these. Also sort the operations into alphabetical order for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: fsl_esdhc: Pass private data to internal functionsSimon Glass2017-08-171-14/+11
| | | | | | | | | | | | | | | | | | With driver model we will not use mmc->priv to access driver-private data. To accomodate this, update internal functions so that we can pass the private data directly. This will allow the caller to obtain it as it prefers. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dwc_ahsata: Add support for driver modelSimon Glass2017-08-171-0/+113
| | | | | | | | | | | | | | Update this driver to support driver model. This involves implementing the AHCI operations and reusing existing common code. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: Update the AHCI uclass to support operationsSimon Glass2017-08-171-0/+37
| | | | | | | | | | | | | | At present the AHCI uclass is just a shell and we still use the global functions to access SATA. Fix this by adding operations to the uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dw_sata: Set up common versions of operationsSimon Glass2017-08-171-105/+131
| | | | | | | | | | | | | | | | Driver model wants to use the core functions in this file but accesses the uclass-private data in a different way. Move the code into new 'common' functions and set up stubs to call these. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dw_sata: More ahci_init_one() futher downSimon Glass2017-08-171-33/+33
| | | | | | | | | | | | | | This function will not be used with driver model and it relates to the other exported functions. Move it down next to them. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dw_sata: Drop is_readySimon Glass2017-08-171-4/+0
| | | | | | | | | | | | This variable is set but never used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dw_sata: Rename the dwc_ahsata private headerSimon Glass2017-08-172-4/+4
| | | | | | | | | | | | | | Rename dwc_ahsata.h to indicate that it is a private header file. We plan to create another header with some public functions. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dw_sata: Sort #include directivesSimon Glass2017-08-171-7/+6
| | | | | | | | | | | | Sort the header file inclusions into the correct order. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dw_sata: Drop unnecessary bracketsSimon Glass2017-08-171-50/+48
| | | | | | | | | | | | | | There is a strange &(var) coding style in this driver. Adjust it to use &var instead, which is more usual. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dw_sata: Pass uc_priv to internal functionsSimon Glass2017-08-171-48/+41
| | | | | | | | | | | | | | | | | | With driver model sata_dev_desc[] does not exist. We still want to use the common code of this driver so update it to pass struct ahci_uc_priv * to each of these functions, instead of an integer which must be looked up in sata_dev_desc[]. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dw_sata: Drop unnecessary castsSimon Glass2017-08-171-38/+22
| | | | | | | | | | | | | | Most of the casts in this driver are not necessary. With driver model we do not cast from void *. Update the driver to follow this rule. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dw_sata: Rename 'probe_ent' to uc_privSimon Glass2017-08-171-90/+85
| | | | | | | | | | | | | | | | | | | | | | With driver model this becomes uclass-private data. Rename the parameter varable to reflect this. With the driver model conversion we will not have any exported functions. Move all exported functions to be together at the end of the file so that we can deal with them in one #ifdef block. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dw_sata: Move exported functions to the endSimon Glass2017-08-171-62/+62
| | | | | | | | | | | | | | | | With the driver model conversion we will not have any exported functions. Move all exported functions to be together at the end of the file so that we can deal with them in one #ifdef block. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dw_sata: Drop dwc_ahsata_rw_ncq_cmd()Simon Glass2017-08-171-43/+0
| | | | | | | | | | | | This function is not called from anywhere. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sata: dwc_ahsata: Make functions staticSimon Glass2017-08-171-6/+6
| | | | | | | | | | | | | | Some functions are not called from outside this file. Make these static to make that obvious. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: blk: Update return value in blk_create_devicef()Simon Glass2017-08-171-1/+1
| | | | | | | | | | | | | | This returns 'ret' but the value is always zero. Update it to simply return 0, for clarity. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: blk: Add a function to find an interface-type nameSimon Glass2017-08-172-0/+12
| | | | | | | | | | | | | | | | | | | | Add a function to find the name of an interface type (e.g. "sata", "scsi") from the interface type enum. This is useful for generic code (not specific to SATA or SCSI, for example) that wants to display the type of interface it is dealing with. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Avoid calling dm_scan_fdt_dev() with of-platdataSimon Glass2017-08-171-0/+3
| | | | | | | | | | | | | | | | We cannot call dm_scan_fdt_dev() with of-platdata since there is no device tree. Fix this with an #if check. Fixes: 3be9a37 (dm: syscon: scan sub-nodes of the syscon node) Signed-off-by: Simon Glass <sjg@chromium.org>
| * mmc: gen_atmel_mci: Fix wrong arguments used of bind()Wenyou.Yang@microchip.com2017-08-171-22/+42
| | | | | | | | | | | | | | | | | | The bind() method is called before the device is probed and so the device has no private data, should use the platform data, and set up a new struct to hold the mmc and cfg members. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * mmc: sd_sdhi: Enable clock using clock frameworkMarek Vasut2017-08-171-0/+15
| | | | | | | | | | | | | | | | | | | | | | Since we now have clock driver for the RCar Gen3 , add support for enabling the clock into the SH SDHI driver to prevent hacks in the board files. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * mmc: sh_sdhi: Fix the ACMD handlingMarek Vasut2017-08-171-48/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command handling in this driver is awful, esp. because the driver depends on command numbers to determine whether this is APPCMD or not. Also, handling of command RSP response types is totally wrong. This patch at least plucks out some of the custom command encoding and fixes the APPCMD handling. The RSP handling still needs work, yet that might not be needed as it turns out the uniphier-sd.c driver is in much better shape and supports the same IP, so we might be able to just drop this driver in favor of the uniphier one. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * mmc: sh_sdhi: Add DM and DT probing supportMarek Vasut2017-08-171-20/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | Add MMC DM and DT probing support into the SH SDHI driver. This patch abstracts out the common bits of the send command and set ios functions, so they can be used both by DM and non DM setups and adds the DM probe support. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>