summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* drivers: net: vsc9953: Add LAG supportCodrin Ciubotariu2016-01-281-1/+330
| | | | | | | | | | | | | | | | | | You can now configure LAG on VSC9953's ports using the command: ethsw [port <port_no>] aggr {[help] | show | <lag_group_no>} A port must belong to a single LAG. By default, a port belongs to a LAG equal to the port's number. For each frame, a hash will be calculated based on Source/Destination MAC addresses, Source/Destination IP(v4/v6) addresses, Source/Destination ports. This hash will be used to select a single egress port from LAG. This also assures that frames from the same flow will always have the same egress port. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers: net: vsc9953: Fix FDB aging timeCodrin Ciubotariu2016-01-281-0/+23
| | | | | | | | | By default, the aging period is set to 0, so the dynamic FDB entries are never removed. This patch sets the aging time to 300 seconds. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: phy: do not read configuration register on resetStefan Agner2016-01-281-9/+2
| | | | | | | | | | | | When doing a software reset, the reset flag should be written without other bits set. Writing the current state will lead to restoring the state of the PHY (e.g. Powerdown), which is not what is expected from a software reset. Signed-off-by: Stefan Agner <stefan@agner.ch> Acked-by: Michael Welling <mwelling@ieee.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* dm: core: Add option to configure an offset for the address translationStefan Roese2016-01-122-11/+41
| | | | | | | | | | | | Some platforms need to ability to configure an offset to the standard addresses extracted from the device-tree. This patch allows this by adding a function to DM to configure this offset (if needed). Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Simon Glass <sjg@chromium.org> Cc: Simon Glass <sjg@chromium.org> Fixed space before tab: Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: ns16550: Allow the driver to be omitted if requestedSimon Glass2016-01-121-0/+2
| | | | | | | Allow the ns16550 debug UART to be used without the full driver. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
* dm: serial: Allow the UART driver to be dropped from the imageSimon Glass2016-01-122-1/+23
| | | | | | | | | | | In very very space-constrained devices even the full UART driver is too large. In this case the debug UART can still be used in some cases. Add options to enable the UART driver in SPL and U-Boot proper. Enable both options by default. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
* dm: net: usb: Convert mcs7830 driver to support driver modelSimon Glass2016-01-121-0/+105
| | | | | | | Adjust this driver to support driver model for Ethernet. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* dm: net: usb: Refactor mcs7830 driver ready for DM conversionSimon Glass2016-01-121-121/+144
| | | | | | | | | Remove stamp data and create common functions for the main Ethernet operations. This will make it easier to convert this driver to support driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* pci: Tidy up comments in pci_bind_bus_devices()Simon Glass2016-01-121-3/+1
| | | | | | | | | The current comments are confusing. We don't actually bind a generic device when the device tree has no information. We try to scan available PCI drivers. Update the comments to reflect this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: Convert PCI MMC over to use DM PCI APISimon Glass2016-01-121-8/+7
| | | | | | | | | | | | | | At present pci_mmc_init() does not correctly use the PCI function since the list it passes is not terminated. The array size passed to pci_mmc_init() is actually not used correctly. Fix this and adjust the pci_mmc_init() to scan all available MMC devices. Adjust this code to use the new driver model PCI API. This should move over to the new MMC uclass at some point. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: usb: Convert echi-pci to use new DM PCI APISimon Glass2016-01-121-12/+39
| | | | | | | | Convert this driver to use the new driver model PCI API. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Marek Vasut <marex@denx.de>
* dm: ahci: Convert to use new DM PCI APISimon Glass2016-01-121-7/+63
| | | | | | | Convert this driver to use the new driver model PCI API. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: pci: Switch to DM API for PCI address mappingSimon Glass2016-01-121-1/+1
| | | | | | | | We should use the new address mapping functions unless we are in compatibility mode. Disable the old functions by default. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: net: Convert rtl8169 to use DM PCI APISimon Glass2016-01-121-19/+66
| | | | | | | | Update this driver to use the proper driver-model PCI API functions. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* dm: pci: Add driver model API functions for address mappingSimon Glass2016-01-121-0/+136
| | | | | | | | At present the PCI address map functions use the old API. Add new functions for this so that drivers can be converted. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: pci: Drop the old version of pci_find_class()Simon Glass2016-01-121-42/+42
| | | | | | | | Move this function into the compatibility file so that it is not available by default. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: pci: Drop the old version of pci_find_device/s()Simon Glass2016-01-121-0/+2
| | | | | | | | Move these functions into the compatibility file so that they are not available by default. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: x86: pci: Adjust bios_run_on_x86() to use the DM PCI APISimon Glass2016-01-121-2/+2
| | | | | | | | This function should take a struct udevice rather than pci_dev_t. Update it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* dm: pci: video: Convert video and pci_rom to use DM PCI APISimon Glass2016-01-123-33/+31
| | | | | | | | | | Adjust these files to use the driver-model PCI API instead of the legacy functions. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* dm: serial: Convert ns16550 driver to use driver model PCI APISimon Glass2016-01-121-3/+2
| | | | | | | | | | | | | | | | | Use the driver model version of the function to find the BAR. This updates the fdtdec function, of which ns16550 is the only user. The fdtdec_get_pci_bdf() function is dropped for several reasons: - with driver model we should use 'struct udevice *' rather than passing the device tree offset explicitly - there are no other users in the tree - the function parses for information which is already available in the PCI device structure (specifically struct pci_child_platdata which is available at dev_get_parent_platdata(dev) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* dm: pci: Add a function to read a PCI BARSimon Glass2016-01-121-0/+13
| | | | | | | Add a driver-model function for reading the PCI BAR from a device. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: pci: Add a driver-model version of pci_find_class()Simon Glass2016-01-121-0/+20
| | | | | | | | | Add a function which scans the driver model device information rather than scanning the PCI bus again. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* dm: pci: Add a driver-model version of pci_find_device()Simon Glass2016-01-121-0/+39
| | | | | | | | | Add a function which scans the driver model device information rather than scanning the PCI bus again. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* dm: pci: Use driver model PCI API in auto-configSimon Glass2016-01-125-62/+444
| | | | | | | | | | | | | At present we are using legacy functions even in the auto-configuration code used by driver model. Add a new pci_auto.c version which uses the correct API. Create a new pci_internal.h header to hold functions that are used within the PCI subsystem, but are not exported to other drivers. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* dm: pci: Add a dm_ prefix to pci_bus_find_bdf()Simon Glass2016-01-121-1/+1
| | | | | | | | | | | | Most driver model PCI functions have a dm_ prefix. At some point, when the old code is converted to driver model and the old functions are removed, we will drop that prefix. For consistency, we should use the dm_ prefix for all driver model functions. Update pci_bus_find_bdf() accordingly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: pci: Add a dm_ prefix to pci_get_bdf()Simon Glass2016-01-127-15/+17
| | | | | | | | | | | | Most driver model PCI functions have a dm_ prefix. At some point, when the old code is converted to driver model and the old functions are removed, we will drop that prefix. For consistency, we should use the dm_ prefix for all driver model functions. Update pci_get_bdf() accordingly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: pci: Mark legacy files as suchSimon Glass2016-01-122-4/+10
| | | | | | | | We don't want people changing the legacy PCI files while migration is in progress. Update the file headers to indicate that. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini2016-01-084-10/+32
|\
| * imx_watchdog: always set minimal timeout in reset_cpuAndrey Skvortsov2016-01-071-1/+1
| | | | | | | | | | | | | | | | | | The problem is that timeout bits in WCR register were leaved unchanged. So previously set timeout value was applied and therefore 'reset' command takes any value up to two minutes, depending on previous watchdog settings, instead of minimal 0.5 seconds. Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
| * gpio: mxs: add name_to_gpio() functionMåns Rullgård2016-01-071-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Override the default name_to_gpio() function with one that accepts strings of the form bank:pin. If a colon is present in the provided name, it behaves like the default version. This lets the "gpio" command work with sane names rather than requiring the user to enter the bank/pin composite in decimal. Signed-off-by: Mans Rullgard <mans@mansr.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
| * imx: mx7: fix the temperature checking for Rev1.1Peng Fan2016-01-071-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | To TO1.0, we can not rely on finish bit to read temperature. But to TO1.1, the issue was fixed by IC, we can rely on finish bit for temperature reading for TO1.1. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Tim Harvey <tharvey@gateworks.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Adrian Alonso <aalonso@freescale.com>
| * phy: atheros: Use ar8035_config for AR8031Fabio Estevam2016-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 08ad9b068afb88 (" ar8031: modify the config func of ar8031 to ar8021_config") selected 'ar8021_config' as the configuration function for AR8031. The correct would be to use 'ar8035_config' instead as AR8031/AR8035 have the same programming model and even share the same phy driver in the linux kernel: drivers/net/phy/at803x.c. Tested on a mx6qsabresd and wandboard, which now can work without any PHY setup code in the board files. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | pci: layerscape: Adjust the return value when ls_pcie_addr_valid() failsBin Meng2016-01-081-1/+1
| | | | | | | | | | | | | | | | | | When trying to access non-existent/unsupported PCI devices in ls_pcie_read_config(), when ls_pcie_addr_valid() fails it returns error code and fills in the result with 0xffffffff manually. But it really should return zero to upper layer codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* | pci: imx: Adjust the return value when imx_pcie_addr_valid() failsBin Meng2016-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | When trying to access non-existent/unsupported PCI devices in imx_pcie_read_config(), when imx_pcie_addr_valid() fails it returns error code and fills in the result with 0xffffffff manually. But it really should return zero to upper layer codes. Reported-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
* | serial: zynq: Use static inline for _debug_uart_init()Michal Simek2016-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Mark _debug_uart_init() as static to avoid sparse warning and inline it to debug_uart_init(). Reported-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | bootcount: Correct #endif comment to match, other aestheticsRobert P. J. Day2016-01-081-6/+4
| | | | | | | | | | | | | | | | | | Correct mismatched comment on #endif to agree with its #if defined(). Also add some missing #endif comments for consistency, take out extraneous blank lines for readability. rday
* | Merge git://git.denx.de/u-boot-dmTom Rini2016-01-081-1/+1
|\ \
| * | net: Fix delay in net_retry testJoe Hershberger2016-01-071-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced in 45b4773 (net/arp: account for ARP delay, avoid duplicate packets on timeout) Check the arp timeout and adjust the timeout start time before the call to eth_recv() so that the sandbox driver has the opportunity to adjust the sandbox timer after the new start time has been recorded. Also, change the adjustment amount by 11 seconds instead of exactly the 10 seconds that the ping timout is expecting since the timeout check is looking for the time elapsed to be greater than but not equal to the specified delay. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2016-01-072-3/+3
|\ \ | |/ |/|
| * spi: fsl_qspi: fix an error of using GENMASKGong Qianyu2016-01-071-1/+1
| | | | | | | | | | | | | | | | | | This commit fixes the change of below commit "spi: fsl_qspi: Use GENMASK" (sha1 :bad490a24212c068c5b718b9189f47ea4075d078) Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
| * spi: spi_flash: Fix the arguments of stm_is_locked_sr()Fabio Estevam2016-01-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | stm_is_locked_sr() takes the status register (SR) value as the last parameter, not the second. Based on a patch from Brian Norris for the linux kernel: http://git.infradead.org/linux-mtd.git/commit/a32d5b726ff8cf32bf491522b0ac8ae2545a063e Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
* | net: e1000: use correct helper to do endianness conversionMiao Yan2016-01-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | In struct e1000_rx_desc, field 'length' is declared as uint16_t, so use le16_to_cpu() to do endianness conversion. Also drop conversion on 'status' which is declared as uint8_t. Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | mmc: update MMC_ERASE argument to match Linux kernel.Eric Nelson2016-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Table 41 of the JEDEC standard for eMMC says that bit 31 of the command argument is obsolete when issuing the ERASE command (CMD38) on page 115 of this document: http://www.jedec.org/sites/default/files/docs/jesd84-B45.pdf The SD Card Association Physical Layer Simplified Specification also makes no mention of the use of bit 31. https://www.sdcard.org/downloads/pls/part1_410.pdf The Linux kernel distinguishes between secure (bit 31 set) and non-secure erase, and this patch copies the macro names from include/linux/mmc/core.h. Tested-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Eric Nelson <eric@nelint.com> Tested-by: Hector Palacios <hector.palacios@digi.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-ubiTom Rini2016-01-041-1/+0
|\ \
| * | UBI: Fix compile error when CONFIG_UBI_SILENCE_MSG definedLadislav Michl2016-01-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | drivers/mtd/ubi/io.c:1354:3: error: 'dump_len' undeclared (first use in this function) dump_len = max_t(int, 128, len - i); Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
* | | Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini2016-01-034-8/+48
|\ \ \
| * | | i2c: mxc: add a condition in case the parameter is NULLGong Qianyu2016-01-031-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This could avoid executing the code that only applies to i.MX platforms. The bus_i2c_init() is called before relocation and will assgin value to a static variable. If U-Boot is then still running in a flash device, it's theoretically not allowed to write data to flash without an erasing operation. For i.MX platforms, the U-Boot is always running in DDR. Actually it causes asynchronous error when the ARM64 system error report is enabled and the flash write protect is set. Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com> Reviewed-by: Heiko Schocher <hs@denx.de>
| * | | net: fec_mxc: unregister mdio bus on probe errorMåns Rullgård2016-01-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If fecmxc_initialize_multi() fails, it frees but does not unregister the mdio bus, causing subsequent uses of the "mii" command to crash. Fix this by adding mdio_unregister() calls where needed. Signed-off-by: Mans Rullgard <mans@mansr.com> Reviewed-by: Eric Nelson <eric@nelint.com>
| * | | net: fec_mxc: configure MDIO hold timeMåns Rullgård2016-01-031-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the host clock frequency is higher than 100 MHz, the MDIO hold time needs to be increased from its current setting of one cycle in order to meet the specified minium of 10 ns. Writing an appropriate value to the HOLDTIME field of the MII_SPEED register achieves this. Comment copied from Linux kernel. Signed-off-by: Mans Rullgard <mans@mansr.com> Reviewed-by: Eric Nelson <eric@nelint.com>
| * | | serial_mxc: Fix setup of UARTx_UFCR registerMaximilian Schwerin2016-01-031-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch writes the default values for TXTL and RXTL to UARTx_UFCR. Without this patch some older kernel versions crash as UARTx_UFCR was not always correctly initialized. Signed-off-by: Maximilian Schwerin <maximilian.schwerin@tigris.de>
OpenPOWER on IntegriCloud