summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* imx: hab: rework secure boot support for imx6Adrian Alonso2015-10-30-2/+2
| | | | | | | Rework secure boot support for imx6, move existing hab support for imx6 into imx-common for SoC reuse. Signed-off-by: Adrian Alonso <aalonso@freescale.com>
* imx: cpu: move common chip revision id'sAdrian Alonso2015-10-30-19/+13
| | | | | | | Move common chip revision id's to main cpu header file mx25 generic include cpu header for chip revision Signed-off-by: Adrian Alonso <aalonso@freescale.com>
* imx: mx6sabresd: add i.MX6DQP Sabresd supportPeng Fan2015-10-30-6/+65
| | | | | | | | | | Add i.MX6DQP-Sabresd board support: 1. set fdt_file according to board_rev which is set at runtime. 2. Add mx6dqp_ddr_ioregs and calibration value for this board. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com>
* imx: mx6sabresd discard PHYS_SDRAM_SIZEPeng Fan2015-10-30-1/+0
| | | | | | | | | | This macro is not needed, since gd->ram_size is assigned value using function imx_ddr_size(). Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
* imx35, flea3: add FIT image supportHeiko Schocher2015-10-30-0/+4
| | | | | | add FIT image support for the flea3 board. Signed-off-by: Heiko Schocher <hs@denx.de>
* ts4800: add CONFIG_OF_LIBFDTDamien Riegel2015-10-30-0/+2
| | | | | | | | Linux only boots IMX.51-based boards with device tree, so this board would benefit from supporting it. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Cc: Stefano Babic <sbabic@denx.de>
* arm, imx6, aristainetos2: set gpr register after resetHeiko Schocher2015-10-30-0/+16
| | | | | | | | | setting the gpr 1,8 and 12 registers to a fix value. This is needed because after a WDT reset, this registers are not correct resettet, and prevent linux from booting again. Signed-off-by: Heiko Schocher <hs@denx.de>
* arm, imx: add some gpr register definesHeiko Schocher2015-10-30-0/+35
| | | | | | add some missing gpr register defines. Signed-off-by: Heiko Schocher <hs@denx.de>
* driver: misc: add MXC_OCOTP Kconfig entryPeng Fan2015-10-30-0/+7
| | | | | | | | | Add MXC_OCOTP Kconfig entry. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Simon Glass <sjg@chromium.org> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com>
* imx-common: timer: clean up codePeng Fan2015-10-30-73/+2
| | | | | | | | | | | We can reuse common functions in lib/time.c, but not reimplement functions in imx-common/time.c. Only keep timer_init ,get_tbclk and implement timer_read_counter in imx-common/time.c. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com>
* Merge branch 'master' of git://git.denx.de/u-bootStefano Babic2015-10-30-10293/+7187
|\
| * Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini2015-10-29-114/+326
| |\
| | * net: eth: Check return value in various placesBin Meng2015-10-29-18/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eth_get_dev() can return NULL which means device_probe() fails for that ethernet device. Add return value check in various places or U-Boot will crash due to NULL pointer access. With this commit, 'dm_test_eth_act' test case passes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * dm: test: Add a new test case against dm eth codes for NULL pointer accessBin Meng2015-10-29-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot crashes when doing a 'ping' with the following test scenario: - All ethernet devices are not probed - "ethaddr" for all ethernet devices are not set - "ethact" is set to a valid ethernet device name Add a new test case 'dm_test_eth_act' to hit such scenario. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: eth: Clear MAC address in eth_pre_remove()Bin Meng2015-10-29-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platdata->enetaddr was assigned to a value in dev_probe() last time. If we don't clear it, for dev_probe() at the second time, dm eth will end up treating it as a MAC address from ROM no matter where it came from originally (maybe env, ROM, or even random). Fix this by clearing platdata->enetaddr when removing an Ethernet device. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * dm: core: Remove unnecessary codes in uclass_pre_remove_device()Bin Meng2015-10-29-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | dev->uclass->uc_drv->per_device_auto_alloc_size is to be freed in device_free(), so is dev->seq. Remove these unnecessary codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| | * net: pch_gbe: Add driver remove supportBin Meng2015-10-29-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In pch_gbe_probe(), some additional resources are allocated (eg: mdio, phy). We should free these in the driver remove phase. Add pch_gbe_remove() to clean it up. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: designware: Add driver remove supportBin Meng2015-10-29-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | In designware_eth_probe(), some additional resources are allocated (eg: mdio, phy). We should free these in the driver remove phase. Add designware_eth_remove() to clean it up. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| | * net: mdio: Add mdio_free() and mdio_unregister() APIBin Meng2015-10-29-0/+21
| | | | | | | | | | | | | | | | | | | | | Currently there is no API to uninitialize mdio. Add two APIs for this. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: phy: Test previous phydev->dev against new mac devBin Meng2015-10-29-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In phy_connect_dev(), if the phy device has an accociated mac device before, a warning message will be printed. But we should test the old device against the new one, if they are actually the same one, don't print the warning message. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: phy: Change to print all phys that are not foundBin Meng2015-10-29-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In get_phy_device_by_mask(), when no phy is found, currently we only print a message to show the first phy address that is not found. But this is not always the case as multiple phys can be specified by phy_mask. Change to print all phys that are not found, and to reduce the console boot log, change to use 'debug' instead of 'printf'. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: phy: Don't create phy device when there is no phyBin Meng2015-10-29-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | In get_phy_device_by_mask(), when no phy is found, we should not create any phy device. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: phy: micrel: disable NAND-tree for KSZ8051Sylvain Rochet2015-10-29-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NAND-tree is used to check wiring between MAC and PHY using NAND gates on the PHY side, hence the name. NAND-tree initial status is latched at reset by probing the IRQ pin. However some devices are sharing the PHY IRQ pin with other peripherals such as Atmel SAMA5D[34]x-EK boards when using the optional TM7000 display module, therefore they are switching the PHY in NAND-tree test mode depending on the current IRQ line status at reset. This patch ensure PHY is not in NAND-tree test mode only for the Micrel KSZ8051 PHY used by Atmel. There are other Micrel PHY affected but I doubt they are used on such weird hardware design. Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: rtl8169: Build warning fixes for 64-bitStephen Warren2015-10-29-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Casting from dev->priv to pci_dev_t changes the value's size on a 64-bit system. This causes the compiler to complain about casting a pointer to an integer of a different (smaller) size. To avoid this, cast to an integer of matching size first, then perform an int->int cast to perform the size change. This signals explicitly that we do want to change the size, and avoids the compiler warning. This is legitimate since we know the pointer actually stores a small integer, not a pointer value. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: Increase the size of the net_boot_file_name bufferJacob Stiffler2015-10-29-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The net_boot_file_name buffer is used as storage for the bootfilename command line argument to network boot commands such as tftp and nfs. Increase the size of this buffer to 1024 bytes as the current size of 128 bytes is restrictive for arbitrary paths on the server. Signed-off-by: Jacob Stiffler <j-stiffler@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: phy: micrel: add support for KSZ8021RNL & KSZ8031RNLSylvain Lemieux2015-10-29-0/+11
| | | | | | | | | | | | | | | | | | | | | This patch adds support for Micrel KSZ8021RNL & KSZ8031RNL. Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * smsc95xx: Use zero length packets when RX fifo is emptyStefan Brüns2015-10-29-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using NAKs on empty RX fifo for bulk in transfers is the right choice for a interrupt driven model, but U-Boot uses polling and expects an immediate answer if there is no incoming packet. Using ZLP Bulk In Response (BIR) mode avoids unexpected timeouts in the host controller driver. As ZLP mode is reset default, there is no need to set it. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: parse DHCP options from overloaded file/sname fieldsStefan Brüns2015-10-29-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Option 52 in the vendor option field signals overloading of the file and/or sname fields, these field may contain additional options. Formatting of file/sname contained options is the same as in the vendor options field, but without the leading magic. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: Do not overwrite options found in overloaded 'file' fieldStefan Brüns2015-10-29-26/+18
| | | | | | | | | | | | | | | | | | | | | | | | If 'file' is overloaded, it is wrong to get or put the bootfile name from it/to it. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: change the env name to use constJosh Wu2015-10-28-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | As we don't modify the 'name' parameter, so change it to const. Signed-off-by: Josh Wu <josh.wu@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net/eth: fix a bug in on_ethaddr()Gong Qianyu2015-10-28-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The loop should check all ethenet devices, not only the first device, to set each specified ethaddr, or it'll cause failure when we use other devices. Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * smsc95xx: Fetch whole burst with 1 URB, avoid framing errorsStefan Brüns2015-10-28-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | smsc95xx_recv() does not reassemble bursts spread over multiple URBs. If there is a lot of broadcast traffic, the fifo will fill up to the burst cap limit. Lowering the burst cap to the URB size ensures no packet spans multiple urbs. Caveat, lower limit for working burst cap is 5/33 HS/FS packets. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: cancel timeout handler after DHCPACKStefan Brüns2015-10-28-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Timeout handler should be stopped after reception of DHCPACK. If "autoload" is not set, the handler is immediately replaced by the TFTP handler, otherwise it may trigger before the next boot stage begins. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net/arp: account for ARP delay, avoid duplicate packets on timeoutStefan Brüns2015-10-28-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eth_rx() in the main reception loop may trigger sending a packet which is already timed out (or will immediately) upon reception of an ARP reply. As long as the ARP reply is pending, the timeout handler of a packet should be postponed. Happens on TFTP with bad network (e.g. WLAN). Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net/arp: Do not run net_start_again() on timeoutStefan Brüns2015-10-28-1/+1
| | | | | | | | | | | | | | | | | | | | | net_start_again() will be called from net_loop() if state is NETLOOP_FAIL. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: Fix parsing of Bootp/DHCP option 0 (Pad)Stefan Brüns2015-10-28-1/+10
| | | | | | | | | | | | | | | | | | | | | Pad has no len byte, so the normal parsing code fails. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: send RFC1542 compliant value for bootp requestsStefan Brüns2015-10-28-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC1542, 3.2: "The 'secs' field of a BOOTREQUEST message SHOULD represent the elapsed time, in seconds, since the client sent its first BOOTREQUEST message. Note that this implies that the 'secs' field of the first BOOTREQUEST message SHOULD be set to zero." Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: reject Bootp/DHCP packets with bad OP valueStefan Brüns2015-10-28-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename check_packet to check_reply_packet to make its function more obvious. The check for DHCP_* values is completely off, as it should compare against DHCP option 53 (Message Type). Only valid value for any Bootp/DHCP reply is BOOTREPLY. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: protect status led access in bootpThomas Chou2015-10-28-1/+1
| | | | | | | | | | | | | | | | | | | | | This fixes the error when STATUS_LED_BOOT is not defined. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| | * net: bootp fix vci string on SPL-BootHannes Petermaier2015-10-28-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CONFIG_CMD_DHCP is enabled, the vci (vendor-class-identifier) string isn't inserted into the bootp-packet during SPL stage because the CONFIG_BOOTP_VCI_STRING instead CONFIG_SPL_NET_VCI_STRING We fix this with testing for CONFIG_SPL_BUILD and testing for existing CONFIG_SPL_NET_VCI_STRING. Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| | * net: TFTP: variables cleanup and additionAlbert ARIBAUD \(3ADEV\)2015-10-28-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TFTP source and destination port variable names are 'tftpsrcp' and 'tftpdstp' in the code, but 'tftpsrcport' and 'tftpdstport' in the README file. Fix the README. Add environment variable 'tftptimeoutcountmax'. As per the comments about the global variable tftp_timeout_count_max, make sure tftptimeoutcountmax is nonnegative. Introduce configuration option CONFIG_NET_TFTP_VARS, which controls whether environment variables tftpblocksize, tftptimeout, and tftptimoueoutcountmax are read by the TFTP client code. CONFIG_NET_TFTP_VARS defaults to y but can be set to n by targets with to tight size contraints. Make bf527-ezkit set CONFIG_NET_TFTP_VARS to n to keep the target size below limit.
| * | Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2015-10-28-366/+1101
| |\ \
| | * | spi: altera_spi: Minor cleanupJagan Teki2015-10-28-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moved macro definitions to top - Give tab space to CONFIG_ALTERA_SPI_IDLE_VAL value - Re-arrange header includes ascending order Acked-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Jagan Teki <jteki@openedev.com>
| | * | spi: altera_spi: Use BIT macroJagan Teki2015-10-28-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace numerical bit shift with BIT macro in altera_spi :%s/(1 << nr)/BIT(nr)/g where nr = 0, 1, 2 .... 31 Cc: Marek Vasut <marex@denx.de> Acked-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Jagan Teki <jteki@openedev.com>
| | * | spi: xilinx_spi: Use GENMASKJagan Teki2015-10-27-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace numeric mask hexcodes with GENMASK macro in xilinx_spi Cc: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Jagan Teki <jteki@openedev.com>
| | * | spi: tegra: Use GENMASKJagan Teki2015-10-27-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace numeric mask hexcodes with GENMASK macro in tegra*.c Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Tom Warren <twarren@nvidia.com> Signed-off-by: Jagan Teki <jteki@openedev.com>
| | * | spi: omap3_spi: Use GENMASKJagan Teki2015-10-27-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace numeric mask hexcodes with GENMASK macro in omap3_spi Cc: Nikita Kiryanov <nikita@compulab.co.il> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Jagan Teki <jteki@openedev.com>
| | * | spi: fsl_qspi: Use GENMASKJagan Teki2015-10-27-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace numeric mask hexcodes with GENMASK macro in fsl_qspi Cc: York Sun <yorksun@freescale.com> Cc: Haikun Wang <Haikun.Wang@freescale.com> Signed-off-by: Jagan Teki <jteki@openedev.com>
| | * | spi: designware_spi: Use GENMASKJagan Teki2015-10-27-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace numeric mask hexcodes with GENMASK macro in designware_spi Cc: Stefan Roese <sr@denx.de> Cc: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Jagan Teki <jteki@openedev.com>
| | * | spi: atmel_spi: Use GENMASKJagan Teki2015-10-27-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace numeric mask hexcodes with GENMASK macro in atmel_spi Cc: Bo Shen <voice.shen@atmel.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Jagan Teki <jteki@openedev.com>