summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-17dm: sata: imx: Allow driver model to be used for sataSimon Glass
Update the sata call to work with driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: sata: Support driver model with the 'sata' commandSimon Glass
Update this command to support driver model. This has a different way of starting and stopping SATA. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: sata: dw_sata: Set up common versions of operationsSimon Glass
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>
2017-08-17dm: sata: dw_sata: More ahci_init_one() futher downSimon Glass
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>
2017-08-17dm: sata: dw_sata: Drop is_readySimon Glass
This variable is set but never used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: sata: dw_sata: Rename the dwc_ahsata private headerSimon Glass
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>
2017-08-17dm: sata: dw_sata: Sort #include directivesSimon Glass
Sort the header file inclusions into the correct order. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: sata: dw_sata: Drop unnecessary bracketsSimon Glass
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>
2017-08-17dm: sata: dw_sata: Pass uc_priv to internal functionsSimon Glass
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>
2017-08-17dm: sata: dw_sata: Drop unnecessary castsSimon Glass
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>
2017-08-17dm: sata: dw_sata: Rename 'probe_ent' to uc_privSimon Glass
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>
2017-08-17dm: sata: dw_sata: Move exported functions to the endSimon Glass
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>
2017-08-17dm: sata: dw_sata: Drop dwc_ahsata_rw_ncq_cmd()Simon Glass
This function is not called from anywhere. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: sata: dwc_ahsata: Make functions staticSimon Glass
Some functions are not called from outside this file. Make these static to make that obvious. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: core: Add a comment about the device_remove() flagsSimon Glass
We should explain which flags are used for this function. Update the comment to indicate this. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: blk: Update return value in blk_create_devicef()Simon Glass
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>
2017-08-17dm: usb: Adjust the 'usb' command to use blk_common_cmd()Simon Glass
Instead of having separate code in the 'usb' command, adjust it to use the common function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17dm: ide: Adjust the 'ide' command to use blk_common_cmd()Simon Glass
Instead of having separate code in the 'ide' command, adjust it to use the common function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17dm: scsi: Adjust the 'scsi' command to use blk_common_cmd()Simon Glass
Instead of having separate code in the 'scsi' command, adjust it to use the common function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17dm: sata: Adjust the 'sata' command to use blk_common_cmd()Simon Glass
Instead of having separate code in the 'sata' command, adjust it to use the common function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17dm: blk: Add a generic function for block device commandsSimon Glass
Most block devices provide a command (e.g. 'sata', 'scsi', 'ide') and these commands generally do the same thing. This makes it harder to maintain this code and keep it consistent. We now have a block device interface which is either implemented by driver model (when CONFIG_BLK is enabled) or with a legacy interface. Therefore it is possible to handle most of what these commands do with generic code. Add a new generic function to process block-device commands using the interface type and the current device number for that type. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: blk: Add a function to find an interface-type nameSimon Glass
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>
2017-08-17dm: core: Avoid calling dm_scan_fdt_dev() with of-platdataSimon Glass
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>
2017-08-17mmc: gen_atmel_mci: Fix wrong arguments used of bind()Wenyou.Yang@microchip.com
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>
2017-08-17mmc: sd_sdhi: Enable clock using clock frameworkMarek Vasut
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>
2017-08-17mmc: sh_sdhi: Fix the ACMD handlingMarek Vasut
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>
2017-08-17mmc: sh_sdhi: Add DM and DT probing supportMarek Vasut
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>
2017-08-17mmc: uniphier-sd: Fix long response processingMarek Vasut
The long response entry 0..3 LSByte comes from the next response register MSByte, not from the next response register LSByte. Fix this to make the driver report correct values in response 136 . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-08-15Prepare v2017.09-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-15configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-14Merge git://git.denx.de/u-boot-netTom Rini
2017-08-14common: Move CONFIG_BOOTARGS to KconfigSam Protsenko
Also introduce CONFIG_USE_BOOTARGS option so we can control if CONFIG_BOOTARGS defined at all. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> [trini: Resync r8a779[56]_ulcb, various ls10xx targets] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-14driver: net: ldpaa: Update priv->phydev after free()Prabhakar Kushwaha
Even after memory free of phydev, priv is still pointing to the obsolete address. So update priv->phydev as NULL after memory free. Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-08-14usb: net: Add support for Microchip LAN75xx and LAN78xxYuiko Oshino
Add support for Microchip LAN7500, LAN7800 and LAN7850, USB to 10/100/1000 Ethernet Controllers. Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-08-14net: Add mii_resolve_flowctrl_fdx()Yuiko Oshino
Add an mii helper function to resolve flow control status per IEEE 802.3-2005 table 28B-3. This function was taken from the Linux source tree. Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-08-14net: fman: add support RGMII_TXID to memacMadalin Bucur
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-08-14ARM: rockchip: rock: Correct test to use CONFIG_IS_ENABLED not definedTom Rini
While it is likely that this entire case is superfluous and can be removed, correct the test now to match what is in rockchip-common.h and makes sense based on context of the code. Otherwise we get a large number of warnings. Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-14Merge branch 'master' of git://git.denx.de/u-boot-rockchipTom Rini
2017-08-13stm32f1: remove stm32f1 supportPatrice Chotard
A few years ago STM32F1 SoCs support has been added : 0144caf22ce6acd5c gpio: stm32: add stm32f1 support 2d18ef2364fd3561a ARMv7M: add STM32F1 support But neither STM32F1 dedicated defconfig nor board was associated to these commits. Got confirmation from Tom Rini and Matt Porter to remove all this code [1] [1] http://u-boot.10912.n7.nabble.com/Remove-STM32F1-support-td301603.html Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-13cmd/bdinfo: correct comment in board_detailChris Packham
This appears to be a simple typo that dates back to the original implementation of board_detail in commit e79394643b26 ("common: Update cmd_bdinfo for PPC"). Signed-off-by: Chris Packham <judge.packham@gmail.com>
2017-08-13test: Move the FIT test into the correct placeSimon Glass
Move this test so that it will run when 'make tests' is used. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-13test: Convert the FIT test to test/pySimon Glass
Convert this test to use the pytest framework. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-13test: Indent test-fit.py to match the next patchSimon Glass
We plan to rewrite this script to use the pytest framework. To make it easier to review the changes, indent the code to match the next patch. This gets all of the whitespace changes out of the way. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-13ARM: OMAP5: Enable support for AVS0 for OMAP5 production devicesNishanth Menon
OMAP5432 did go into production with AVS class0 registers which were mutually exclusive from AVS Class 1.5 registers. Most OMAP5-uEVM boards use the pre-production Class1.5 which has production efuse registers set to 0. However on production devices, these are set to valid data. scale_vcore logic is already smart enough to detect this and use the "Nominal voltage" on devices that do not have efuse registers populated. On a test production device populated as follows: MPU OPP_NOM: => md.l 0x04A0021C4 1 4a0021c4: 03a003e9 .... (0x3e9 = 1.01v) vs nom voltage of 1.06v MPU OPP_HIGH: => md.l 0x04A0021C8 1 4a0021c8: 03400485 ..@. MM OPP_NOM: => md.l 0x04A0021A4 1 4a0021a4: 038003d4 .... (0x3d4 = 980mV) vs nom voltage of 1.025v MM OPP_OD: => md.l 0x04A0021A8 1 4a0021a8: 03600403 ..`. CORE OPP_NOM: => md.l 0x04A0021D8 1 4a0021d8: 000003cf .... (0x3cf = 975mV) vs nom voltage of 1.040v Since the efuse values are'nt currently used, we do not regress on existing pre-production samples (they continue to use nominal voltage). But on boards that do have production samples populated, we can leverage the optimal voltages necessary for proper operation. Tested on: a) 720-2644-001 OMAP5UEVM with production sample. b) 750-2628-222(A) UEVM5432G-02 with pre-production sample. Data based on OMAP5432 Technical reference Manual SWPU282AF (May 2012-Revised Aug 2016) NOTE: All collaterals on OMAP5432 silicon itself seems to have been removed from ti.com, though EVM details are still available: http://www.ti.com/tool/OMAP5432-EVM Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-08-13ARM: OMAP5: Remove OPP_LOW Definitions for ES2.0Nishanth Menon
ES2.0 descopes OPP_LOW definition. So remove it from macros defined. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-08-13test: Fix FIT test to pass againSimon Glass
A recent change adjusted a test string so that the test no-longer passes. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Heiko Schocher <hs@denx.de> Fixes: b28c5fcc (test-fit.py: Minor grammar/spelling/clarification tweaks)
2017-08-13wdt: Update uclass to make clear that the timeout is in msAndy Shevchenko
Convert name to show explicitly that we are using milliseconds. For a watchdog timer this is precise enough. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-13boot_fit: Change return value from FDT_ERROR to -EINVAL in fdt_offset()Nobuhiro Iwamatsu
FDT_ERROR is defined as unsigned long. However, since the return value of fdt_offset() is int, a warning will occur when compiling. Also, it is better to use -EINVAL than FDT_ERROR. This fixes this problem by change return value from FDT_ERROR to -EINVAL. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> CC: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Franklin S Cooper Jr <fcooper@ti.com>
2017-08-13x86: qemu: Enable NVMe driverBin Meng
QEMU supports NVMe emulation. Enable the NVMe driver on QEMU x86. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-13nvme: Handle zero Maximum Data Transfer Size (MDTS)Bin Meng
Maximum Data Transfer Size (MDTS) field indicates the maximum data transfer size between the host and the controller. The host should not submit a command that exceeds this transfer size. The value is in units of the minimum memory page size and is reported as a power of two (2^n). The spec also says: a value of 0h indicates no restrictions on transfer size. On the real NVMe card this is normally not 0 due to hardware restrictions, but with QEMU emulated NVMe device it reports as 0. In nvme_blk_read/write() below we have the following algorithm for maximum number of logic blocks per transfer: u16 lbas = 1 << (dev->max_transfer_shift - ns->lba_shift); dev->max_transfer_shift being 0 will for sure cause lbas to overflow. Let's use 20. With this fix, the NVMe driver works on QEMU emulated NVMe device. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>