summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* net: tsec: Use priv->tbiaddr to initialize TBI PHY addressBin Meng2016-01-28-1/+34
| | | | | | | | | Add a new member 'tbiaddr' to tsec_private struct. For non-DM driver, it is initialized as CONFIG_SYS_TBIPA_VALUE, but for DM driver, we can get this from device tree. Update the bindings doc as well. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: tsec: Add driver model ethernet supportBin Meng2016-01-28-0/+196
| | | | | | | | This adds driver model support to Freescale TSEC ethernet driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* doc: dt-bindings: Describe Freescale TSEC ethernet controllerBin Meng2016-01-28-0/+43
| | | | | | | | Adapted from the same file name in the kernel device tree bindings documentation, to use with U-Boot. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: tsec: Use tsec_private pointer as the parameter for internal routinesBin Meng2016-01-28-12/+12
| | | | | | | | For internal routines like redundant_init(), startup_tsec() and init_phy(), change to use tsec_private pointer as the parameter. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: tsec: Adjust orders to avoid forward declaration of tsec_send()Bin Meng2016-01-28-105/+103
| | | | | | | | Adjust static functions in a proper order so that forward declaration of tsec_send() can be avoided. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: tsec: Move rxbd and txbd to struct tsec_privateBin Meng2016-01-28-37/+36
| | | | | | | | | rxbd and txbd are declared static with 8 byte alignment requirement, but they can be put into struct tsec_private as well and are natually aligned to 8 byte. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: tsec: Move rx_idx and tx_idx to struct tsec_privateBin Meng2016-01-28-28/+28
| | | | | | | | | At present rx_idx and tx_idx are declared as static variables in the driver codes. To support multiple interfaces, move it to struct tsec_private. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: tsec: fsl_mdio: Fix several cosmetic issuesBin Meng2016-01-28-61/+62
| | | | | | | | | | Clean up the tsec and fsl_mdio driver codes a little bit, by: - Fix misuse of tab and space here and there - Use correct multi-line comment format - Replace license identifier to GPL-2.0+ Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* arm: ls1021atwr: Do not wrap pci_eth_init() with CONFIG_TSEC_ENETBin Meng2016-01-28-2/+2
| | | | | | | The call to pci_eth_init() should not be wrapped with CONFIG_TSEC_ENET. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* powerpc: p1010rdb: Do not wrap pci_eth_init() with CONFIG_TSEC_ENETBin Meng2016-01-28-2/+2
| | | | | | | The call to pci_eth_init() should not be wrapped with CONFIG_TSEC_ENET. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* powerpc: mpc8548cds: Do not wrap pci_eth_init() with CONFIG_TSEC_ENETBin Meng2016-01-28-2/+2
| | | | | | | The call to pci_eth_init() should not be wrapped with CONFIG_TSEC_ENET. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* powerpc: mpc8572ds: Do not wrap pci_eth_init() with CONFIG_TSEC_ENETBin Meng2016-01-28-2/+2
| | | | | | | The call to pci_eth_init() should not be wrapped with CONFIG_TSEC_ENET. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* powerpc: c29xpcie: Do not wrap pci_eth_init() with CONFIG_TSEC_ENETBin Meng2016-01-28-2/+2
| | | | | | | The call to pci_eth_init() should not be wrapped with CONFIG_TSEC_ENET. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* powerpc: bsc9132qds: Do not wrap pci_eth_init() with CONFIG_TSEC_ENETBin Meng2016-01-28-2/+2
| | | | | | | The call to pci_eth_init() should not be wrapped with CONFIG_TSEC_ENET. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: bootp: Ignore packets whose yiaddr is 0Peng Fan2016-01-28-0/+3
| | | | | | | | | | | | | | | | | When doing `dhcp`, there is a bad dhcp server in my network which always reply dhcp request with yiaddr 0, which cause uboot can not successfully get ipaddr from the good dhcp server. But the Linux PC can get the ip address even if there is a bad dhcp server. This patch is to fix that even if there is a bad dhcp server, uboot can still get ipaddr and tftp work ok. The way is to ignore the packets from the bad dhcp server by filtering out the yiaddr whose value is 0. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Wolfgang Denk <wd@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers: net: vsc9953: Add LAG supportCodrin Ciubotariu2016-01-28-1/+430
| | | | | | | | | | | | | | | | | | 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>
* common: cmd_ethsw: Spelling fixesCodrin Ciubotariu2016-01-28-2/+2
| | | | | Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* doc: t1040-l2switch: Update READMECodrin Ciubotariu2016-01-28-7/+20
| | | | | | | | The driver for VSC9953 L2 switch IP supports many features and the documentation needs to be updated. 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-28-0/+27
| | | | | | | | | 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>
* drivers: net: vsc9953: Fix number of reserved registersCodrin Ciubotariu2016-01-28-1/+1
| | | | | | | | There are only 21 registers reserved between ana_ana and ana_pgid register groups. 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-28-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>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-01-12-557/+1456
|\
| * sandbox: eth-raw-os.c: Ensure that our interface name is not too longTom Rini2016-01-12-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Coverity notes that we do not ensure when we copy ifname we still have space left to ensure NULL termination. As cannot control the size of ifr_name we must make sure that our argument will not overflow the buffer. Reported-by: Coverity (CID 131094) Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add option to configure an offset for the address translationStefan Roese2016-01-12-11/+62
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * rockchip: Use the debug UART on rk3036Simon Glass2016-01-12-65/+16
| | | | | | | | | | | | | | Rather than using a new debug UART implementation, use the standard one provided by U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
| * dm: ns16550: Allow the driver to be omitted if requestedSimon Glass2016-01-12-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-12-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-12-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-12-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-12-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-12-18/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-12-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-12-7/+67
| | | | | | | | | | | | | | 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-12-2/+2
| | | | | | | | | | | | | | | | 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-12-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-12-0/+195
| | | | | | | | | | | | | | | | 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: test: Convert PCI tests to use the DM PCI APISimon Glass2016-01-12-9/+6
| | | | | | | | | | | | Update these tests to use driver model API functions. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: tegra: net: Convert tegra boards to driver model for EthernetSimon Glass2016-01-12-32/+1
| | | | | | | | | | | | | | | | | | Adjust all Tegra boards to use driver model for Ethernet, now that the required drivers are converted. 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: Drop the old version of pci_find_class()Simon Glass2016-01-12-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-12-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-12-4/+5
| | | | | | | | | | | | | | | | 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-12-38/+36
| | | | | | | | | | | | | | | | | | | | 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: Convert bios_interrupts to use DM PCI APISimon Glass2016-01-12-13/+23
| | | | | | | | | | | | | | | | | | Adjust this code to use driver model for devices where possible. Since existing users have not been converted the old code must remain. 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: x86: ivybridge: Convert graphics init to use DM PCI APISimon Glass2016-01-12-12/+12
| | | | | | | | | | | | | | | | | | Use the driver-model PCI functions here where possible. For now we have to search for the device with pci_bus_find_bdf() but at some point we can put this in a proper driver and avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * dm: serial: Convert ns16550 driver to use driver model PCI APISimon Glass2016-01-12-75/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-12-0/+22
| | | | | | | | | | | | | | 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-12-0/+30
| | | | | | | | | | | | | | | | | | 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: scsi: Use driver-model PCI APISimon Glass2016-01-12-1/+13
| | | | | | | | | | | | | | | | Adjust the SCSI command to use driver model for its PCI interface. 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-12-0/+51
| | | | | | | | | | | | | | | | | | 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-12-63/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>