Michal Simek [Fri, 30 Oct 2015 14:05:54 +0000 (15:05 +0100)]
ARM: zynq: Remove zc70x target
Remove zc70x target which was one setting for zc702 and zc706.
Currently zc702 and zc706 are separated.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Simon Glass [Sun, 18 Oct 2015 01:41:27 +0000 (19:41 -0600)]
arm: zynq: Move serial driver to driver model
Update this driver to use driver model and change all users.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Simon Glass [Sun, 18 Oct 2015 01:41:26 +0000 (19:41 -0600)]
arm: zynq: serial: Drop non-device-tree serial driver portions
Since we use device tree in SPL also, we can drop this code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Sun, 18 Oct 2015 01:41:25 +0000 (19:41 -0600)]
ARM: zynqmp: Enable DM and OF binding
SPI requires DM and OF that's why enable DM for ZynqMP
and start to use configuration based on embedded OF.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 18 Oct 2015 01:41:24 +0000 (19:41 -0600)]
arm: zynq: dts: Add U-Boot device tree additions
We need to mark some device tree nodes so that they are available before
relocation. This enables driver model to find these automatically. In the
case of SPL it ensures that these nodes will be retained in SPL.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Simon Glass [Sun, 18 Oct 2015 01:41:23 +0000 (19:41 -0600)]
dm: arm: zynq: Enable device tree control in SPL
Move to using device tree control in SPL so that we can use the same driver
code in both SPL and U-Boot proper.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Simon Glass [Sun, 18 Oct 2015 01:41:22 +0000 (19:41 -0600)]
arm: zynq: Support the debug UART
Add support for the debug UART to assist with early debugging. Enable it
for Zybo as an example.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Simon Glass [Sun, 18 Oct 2015 01:41:21 +0000 (19:41 -0600)]
arm: zynq: Drop unnecessary code in SPL board_init_f()
Move to the new way of starting up SPL. Clearing of BSS and calling
board_init_r() is now handled by crt0.S.
Also tidy up the header include order.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Simon Glass [Sun, 18 Oct 2015 01:41:20 +0000 (19:41 -0600)]
arm: zynq: Use separate device tree instead of embedded
Production boards should not use CONFIG_OF_EMBED. Fix this for the Zybo
boards.
The image to use now becomes u-boot-dtb.bin.
For example, the .bif file should contain a line like:
[load = 0x04000000,startup=0x04000000]/path/to/u-boot-dtb.bin
instead of:
[load = 0x04000000,startup=0x04000000]/path/to/u-boot.bin
When device tree is enabled we need to load u-boot-dtb.img. Change the
settings so that SPL does the right thing.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Simon Glass [Sun, 18 Oct 2015 01:41:19 +0000 (19:41 -0600)]
dm: spl: Support device tree when BSS is in a different section
At present in SPL we place the device tree immediately after BSS. This
avoids needing to copy it out of the way before BSS can be used. However on
some boards BSS is not placed with the image - e.g. it can be in RAM if
available.
Add an option to tell U-Boot that the device tree should be placed at the
end of the image binary (_image_binary_end) instead of at the end of BSS.
Note: A common reason to place BSS in RAM is to support the FAT filesystem.
We should update the code so that it does not use so much BSS.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Simon Glass [Sun, 18 Oct 2015 01:41:18 +0000 (19:41 -0600)]
dm: spl: Generate u-boot-spl-dtb.bin only when enabled
At present this file is generated even when device tree is not enabled in
SPL. Avoid this, since this file serves no purpose in that case.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Simon Glass [Sun, 18 Oct 2015 01:41:17 +0000 (19:41 -0600)]
dm: serial: Deal with stdout-path with an alias
Sometimes stdout-path contains a UART alias along with speed, etc. For
example:
stdout-path = "serial0:115200n8";
Add support for decoding this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Simon Glass [Sun, 18 Oct 2015 01:41:16 +0000 (19:41 -0600)]
fdtgrep: Simplify the alias generation code
We don't need to allocate a new region list when we run out of space.
The outer function can take care of this for us.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Simon Glass [Sun, 18 Oct 2015 01:41:15 +0000 (19:41 -0600)]
fdt: Correct handling of alias regions
At present the last four bytes of the alias region are dropped in
the case where the last alias is included. This results in a corrupted
device tree. Fix this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Simon Glass [Sun, 18 Oct 2015 01:41:14 +0000 (19:41 -0600)]
fdt: Add a function to look up a /chosen property
It is sometimes useful to find a property in the chosen node. Add a function
for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 30 Oct 2015 14:39:18 +0000 (15:39 +0100)]
ARM: zynqmp: Add DTS for ep108 board
Add DTS for ep108 board.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Series-to: u-boot
Siva Durga Prasad Paladugu [Wed, 28 Oct 2015 05:49:08 +0000 (11:19 +0530)]
zynq-common: Define CONFIG_SYS_I2C_ZYNQ based on board config
Enable CONFIG_SYS_I2C_ZYNQ only if it has either I2C0 or I2C1
enabled in a board config.This fixes the issue of i2c error
during board init if board specific doesnt have either I2C0
or I2C1.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Daniel Gorsulowski [Mon, 2 Nov 2015 06:59:49 +0000 (07:59 +0100)]
arm: at91: reworked meesc board support
Signed-off-by: Daniel Gorsulowski <daniel.gorsulowski@esd.eu>
Wenyou Yang [Mon, 2 Nov 2015 02:57:09 +0000 (10:57 +0800)]
mmc: atmel: Add atmel sdhci support
The SDHCI is introduced by sama5d2, named as Secure Digital Multimedia
Card Controller(SDMMC). It supports the embedded MultiMedia Card (e.MMC)
Specification V4.41, the SD Memory Card Specification V3.0, and the SDIO
V3.0 specification. It is compliant with the SD Host Controller Standard
V3.0 specification.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Wenyou Yang [Fri, 30 Oct 2015 01:47:02 +0000 (09:47 +0800)]
arm: at91: clock: Add the generated clock support
Some peripherals may need a second clock source that may be different
from the system clock. This second clock is the generated clock (GCK)
and is managed by the PMC via PMC_PCR.
For simplicity, the clock source of the GCK is fixed to PLLA_CLK.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Wenyou Yang [Tue, 22 Sep 2015 06:59:25 +0000 (14:59 +0800)]
mmc: sdhci: Fix the SD clock stop sequence
According to the SDHC specification, stopping the SD Clock is by setting
the SD Clock Enable bit in the Clock Control register at 0, instead of
setting all bits at 0.
Before stopping the SD clock, we need to make sure all SD transactions
to complete, so add checking the CMD and DAT bits in the Presen State
register, before stopping the SD clock.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Wenyou Yang [Tue, 8 Sep 2015 06:38:26 +0000 (14:38 +0800)]
arm: at91: Change the Chip ID registers' addresses
Provide the specific addresses for the Chip ID and Chip ID Extension
registers, instead of the offset, which make it use on other chips.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Shengzhou Liu [Mon, 26 Oct 2015 05:51:58 +0000 (13:51 +0800)]
mpc85xx/t2081: enable parsing DDR ratio for T2081 rev1.1
T2081 rev 1.1 changes MEM_PLL_RAT in RCW which requires new parsing
for PLL ratio.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Codrin Ciubotariu [Mon, 12 Oct 2015 13:33:13 +0000 (16:33 +0300)]
T104xD4RDB: Fix PHY address for PHY connected to FM1@DTSEC3
On T1040D4RDB board, u-boot fails to connect port FM1@DTSEC3 to
the Ethernet PHY because the wrong PHY address is used. Also,
T1040D4RDB supports SGMII on one port only.
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Yangbo Lu [Thu, 17 Sep 2015 02:27:48 +0000 (10:27 +0800)]
mmc: fsl_esdhc: enable EVDD automatic control for SD/MMC Legacy Adapter Card
When detecting SDHC Adapter Card Type 2(SD/MMC Legacy Adapter Card),
enable EVDD automatic control via SDHC_VS. This could support SD card
IO voltage switching for UHS-1 speed mode.
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Yangbo Lu [Thu, 17 Sep 2015 02:27:38 +0000 (10:27 +0800)]
powerpc/t1040qds: enable peripheral clock for eSDHC
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Yangbo Lu [Thu, 17 Sep 2015 02:27:27 +0000 (10:27 +0800)]
powerpc/t1040qds: enable adapter card type identification support
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Yangbo Lu [Thu, 17 Sep 2015 02:27:12 +0000 (10:27 +0800)]
mmc: fsl_esdhc: enable dat[4:7] for eMMC4.5 Adapter Card
If adapter card type identification is supported for platform, we would
enable dat[4:7] for eMMC4.5 Adapter Card.
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Shaohui Xie [Fri, 11 Sep 2015 11:02:13 +0000 (19:02 +0800)]
Powerpc: eSDHC: expand a fix to T4160
commit
b8e5b07225 "Powerpc: eSDHC: Fix mmc read write err in uboot of
T4240QDS board", T4160 also needs this fix.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Zhao Qiang [Fri, 28 Aug 2015 02:31:50 +0000 (10:31 +0800)]
t1040d4rdb: assign muxed pins to qe-tdm when set hwconfig qe-tdm
qe-tdm is muxed with diu, if hwconfig setted as qe-tdm,
assign muxed pins to qe-tdm, then delete diu node from
device tree.
Signed-off-by: Zhao Qiang <qiang.zhao@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Josh Wu [Tue, 27 Oct 2015 05:31:33 +0000 (13:31 +0800)]
ARM: at91: sama5: change the environment address to 0x6000
As sama5 board has 32k sram size, so the at91bootstrap and spl for sama5
boards is bigger than 16k (0x4000). That will overlap the U-Boot
environment. So I move environment to 0x6000. And reduce its size as
well.
Following shows the size of the spl binaries (v2015.04 vs v2015.07):
% ls v2015.04/*spi*spl.bin -l | awk '{print $5,$(NF)}'
15540 v2015.04/at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin
15704 v2015.04/at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin
16064 v2015.04/sama5d3xek_spiflash_defconfig_u-boot-spl.bin
16304 v2015.04/sama5d4ek_spiflash_defconfig_u-boot-spl.bin
16304 v2015.04/sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin
% ls v2015.07/*spi*spl.bin -l | awk '{print $5,$(NF)}'
16136 v2015.07/at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin
16300 v2015.07/at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin
16664 v2015.07/sama5d3xek_spiflash_defconfig_u-boot-spl.bin
16904 v2015.07/sama5d4ek_spiflash_defconfig_u-boot-spl.bin
16904 v2015.07/sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin
The gcc version is: gcc 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1)
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Bo Shen <voice.shen@gmail.com>
Marek Vasut [Fri, 23 Oct 2015 20:55:40 +0000 (22:55 +0200)]
lcd: atmel: Add 32bpp support for HLCDC
Add 32bpp framebuffer support for the Atmel HLCDC driver. This is
needed for output bpp higher than 16bpp.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Marek Vasut [Fri, 23 Oct 2015 18:46:31 +0000 (20:46 +0200)]
mmc: atmel: Zap global 'initialized' variable
Global variables are bad. Get rid of this particular one, so we can
correctly instantiate multiple atmel mci interfaces, without having
them interfere with one another.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Marek Vasut [Fri, 23 Oct 2015 18:46:30 +0000 (20:46 +0200)]
mmc: atmel: Implement proper private data
Instead of passing just the register area as a private data, introduce
a proper struct atmel_mci_priv structure instead. This will become useful
in the subsequent patch, where we eliminate the global variable from this
driver.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
[fix free()]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Marek Vasut [Fri, 23 Oct 2015 18:46:29 +0000 (20:46 +0200)]
mmc: atmel: Fix clock configuration
After silencing the prints which were generated when reconfiguring the
clock of the SD/MMC bus, surprisingly, the driver stopped working such
that every attempt to use the SD/MMC bus caused the CPU to get totally
stuck hard. It turns out that the prints generated a short delay, which
was necessary for the CPU to reconfigure the clock without getting stuck.
Thus, this patch adds a short delay after the clock configuration instead.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Marek Vasut [Fri, 23 Oct 2015 18:46:28 +0000 (20:46 +0200)]
mmc: atmel: Silence debug output
This driver generates clearly debugging prints when changing clock
speed, so silence those. Furthermore, the driver generates further
prints in case a command fails to complete. The later case woud be
useful, but for eMMC, command 8 can fail and it's not an error but
a part of the specification. Thus, make this debug() as well.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
[fix checkpatch warnings]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Josh Wu [Fri, 23 Oct 2015 09:23:57 +0000 (17:23 +0800)]
at91: simplify spl board_init_f function
crt0.S do both memset the bss section and call board_init_r for us, so
remove them from board_init_f().
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Simon Glass [Fri, 30 Oct 2015 21:46:17 +0000 (15:46 -0600)]
x86: Select the ns16550 debug UART for minnowmax, chromebook_link
At present the debug UART is not selected which causes a build error.
Correct this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tom Rini [Fri, 30 Oct 2015 16:56:58 +0000 (12:56 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Alison Wang [Fri, 30 Oct 2015 14:45:38 +0000 (22:45 +0800)]
ls102xa: Adjust some macros for SD boot on LS1021A QDS board
As more features are added for SD boot on LS1021A QDS board,
the size of U-Boot is larger. CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS
needs to be adjusted to a suitable value.
Starting address of the malloc pool used in SPL needs to be
adjusted too, or it will occupy the address u-boot loads.
Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Yao Yuan [Wed, 23 Sep 2015 07:48:26 +0000 (15:48 +0800)]
configs: ls1021atwr: Enable ID EEPROM for SD boot
I2C1 can work on ls102xa rev2.0 SD boot, so add
ID EEPROM for SD boot.
Signed-off-by: Yuan Yao <yao.yuan@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
tang yuantian [Thu, 24 Sep 2015 07:52:02 +0000 (15:52 +0800)]
arm: ls1021atwr: optimize the deep sleep latency
It will take more than 1s when wake up from deep sleep. Most of the
time is spent on outputing information. This patch reduced the deep
sleep latency by:
1. avoid outputing system informaton
2. remove flush cache after DDR restore
3. skip reloading second stage uboot binary when SD boot
Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Aneesh Bansal [Mon, 12 Oct 2015 16:35:50 +0000 (22:05 +0530)]
SECURE_BOOT: Correct reading of ITS bit
The ITS bit was being read incorrectly beacause of operator
precedence. The same ahs been corrected.
Signed-off-by: Lawish Deshmukh <lawish.deshmukh@freescale.com>
Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Joakim Tjernlund [Wed, 14 Oct 2015 14:32:00 +0000 (16:32 +0200)]
drivers/ddr/fsl_ddr: Make SR_IE configurable
SR_IE(Self-refresh interrupt enable) is needed for
Hardware Based Self-Refresh. Make it configurable and let
board code handle the rest.
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Reviewed-by: York Sun <yorksun@freescale.com>
Tom Rini [Fri, 30 Oct 2015 11:53:56 +0000 (07:53 -0400)]
README.scrapyard: Populate recent ppc4xx removals
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 29 Oct 2015 20:30:33 +0000 (16:30 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net
Bin Meng [Thu, 8 Oct 2015 04:45:44 +0000 (21:45 -0700)]
net: eth: Check return value in various places
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>
Bin Meng [Thu, 8 Oct 2015 04:45:43 +0000 (21:45 -0700)]
dm: test: Add a new test case against dm eth codes for NULL pointer access
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>
Bin Meng [Thu, 8 Oct 2015 04:45:42 +0000 (21:45 -0700)]
net: eth: Clear MAC address in eth_pre_remove()
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>
Bin Meng [Thu, 8 Oct 2015 04:32:40 +0000 (21:32 -0700)]
dm: core: Remove unnecessary codes in uclass_pre_remove_device()
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>
Bin Meng [Thu, 8 Oct 2015 04:32:39 +0000 (21:32 -0700)]
net: pch_gbe: Add driver remove support
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>
Bin Meng [Thu, 8 Oct 2015 04:32:38 +0000 (21:32 -0700)]
net: designware: Add driver remove support
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>
Bin Meng [Thu, 8 Oct 2015 04:32:37 +0000 (21:32 -0700)]
net: mdio: Add mdio_free() and mdio_unregister() API
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>
Bin Meng [Thu, 8 Oct 2015 04:19:31 +0000 (21:19 -0700)]
net: phy: Test previous phydev->dev against new mac dev
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>
Bin Meng [Thu, 8 Oct 2015 04:19:30 +0000 (21:19 -0700)]
net: phy: Change to print all phys that are not found
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>
Bin Meng [Thu, 8 Oct 2015 04:19:29 +0000 (21:19 -0700)]
net: phy: Don't create phy device when there is no phy
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>
Sylvain Rochet [Wed, 7 Oct 2015 20:54:22 +0000 (22:54 +0200)]
net: phy: micrel: disable NAND-tree for KSZ8051
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>
Stephen Warren [Fri, 2 Oct 2015 23:44:34 +0000 (17:44 -0600)]
net: rtl8169: Build warning fixes for 64-bit
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>
Jacob Stiffler [Wed, 30 Sep 2015 14:12:05 +0000 (10:12 -0400)]
net: Increase the size of the net_boot_file_name buffer
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>
Sylvain Lemieux [Wed, 9 Sep 2015 20:29:51 +0000 (16:29 -0400)]
net: phy: micrel: add support for KSZ8021RNL & KSZ8031RNL
This patch adds support for Micrel KSZ8021RNL & KSZ8031RNL.
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Stefan Brüns [Tue, 8 Sep 2015 03:12:00 +0000 (05:12 +0200)]
smsc95xx: Use zero length packets when RX fifo is empty
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>
Stefan Brüns [Thu, 3 Sep 2015 22:31:49 +0000 (00:31 +0200)]
net: parse DHCP options from overloaded file/sname fields
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>
Stefan Brüns [Thu, 3 Sep 2015 22:31:48 +0000 (00:31 +0200)]
net: Do not overwrite options found in overloaded 'file' field
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>
tang yuantian [Fri, 16 Oct 2015 08:06:05 +0000 (16:06 +0800)]
arm: ls1021a: Add sata support on qds and twr board
Freescale ARM-based Layerscape LS102xA contain a SATA controller
which comply with the serial ATA 3.0 specification and the
AHCI 1.3 specification.
This patch adds SATA feature on ls1021aqds and ls1021atwr boards.
Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Alison Wang [Mon, 26 Oct 2015 06:08:28 +0000 (14:08 +0800)]
arm: ls102xa: Set fdt_high and initrd_high to the value of 0xffffffff
As 3G/1G user/kernel memory split is used on LS1021A, the Linux kernel
fails to access the device tree blob on boot. The reason is that u-boot
relocates the device tree blob into high memory when booting the kernel
and the kernel is unable to access the blob.
To avoid this issue, fdt_high is set to the value of 0xffffffff. The
device tree blob will not get relocated and is still in low memory to
make it accessible to the kernel.
For the same reason, initrd_high is set to the value of 0xffffffff too.
Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Hou Zhiqiang [Mon, 26 Oct 2015 11:47:57 +0000 (19:47 +0800)]
armv8/ls1043a: Enable secondary cores
After the secondary cores enter U-Boot, use CONFIG_ARMV8_MULTIENTRY to
make secondary cores excute in spin loop.
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Gong Qianyu [Mon, 26 Oct 2015 11:47:56 +0000 (19:47 +0800)]
armv8/ls1043ardb: Add sd boot support
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Yangbo Lu [Mon, 26 Oct 2015 11:47:55 +0000 (19:47 +0800)]
armv8/ls1043ardb: esdhc: Add esdhc support for ls1043ardb
This patch adds esdhc support for ls1043ardb.
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Shaohui Xie [Mon, 26 Oct 2015 11:47:54 +0000 (19:47 +0800)]
armv8/ls1043a: Add Fman support
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Gong Qianyu [Mon, 26 Oct 2015 11:47:53 +0000 (19:47 +0800)]
armv8/ls1043ardb: Add nand boot support
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Mingkai Hu [Mon, 26 Oct 2015 11:47:52 +0000 (19:47 +0800)]
armv8/ls1043ardb: Add LS1043ARDB board support
LS1043ARDB Specification:
-------------------------
Memory subsystem:
* 2GByte DDR4 SDRAM (32bit bus)
* 128 Mbyte NOR flash single-chip memory
* 512 Mbyte NAND flash
* 16 Mbyte high-speed SPI flash
* SD connector to interface with the SD memory card
Ethernet:
* XFI 10G port
* QSGMII with 4x 1G ports
* Two RGMII ports
PCIe:
* PCIe2 (Lanes C) to mini-PCIe slot
* PCIe3 (Lanes D) to PCIe slot
USB 3.0: two super speed USB 3.0 type A ports
UART: supports two UARTs up to 115200 bps for console
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Mingkai Hu [Mon, 26 Oct 2015 11:47:51 +0000 (19:47 +0800)]
armv8/fsl_lsch2: Add fsl_lsch2 SoC
Freescale LayerScape with Chassis Generation 2 is a set of SoCs with
ARMv8 cores and 2rd generation of Chassis.
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Mingkai Hu [Mon, 26 Oct 2015 11:47:50 +0000 (19:47 +0800)]
armv8/fsl_lsch3: Change arch to fsl-layerscape
There are two LS series processors are built on ARMv8 Layersacpe
architecture currently, LS2085A and LS1043A. They are based on
ARMv8 core although use different chassis, so create fsl-layerscape
to refactor the common code for the LS series processors which also
paves the way for adding LS1043A platform.
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Shaohui Xie [Mon, 26 Oct 2015 11:47:49 +0000 (19:47 +0800)]
net/fm: fix MDIO controller base on FMAN2
MDIO controller base on FMAN2 was defined as CONFIG_SYS_FSL_FM2_ADDR
plus offset, but CONFIG_SYS_FSL_FM2_ADDR only defined when there are two
FMANs, so we should only define MDIO controller base on FMAN2 when there
is FMAN2.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Shaohui Xie [Mon, 26 Oct 2015 11:47:48 +0000 (19:47 +0800)]
net/fm: Add QSGMII PCS init
QSGMII PCS needed to be programmed same as SGMII PCS, and there are
four ports in QSGMII PCS, port 0, 1, 2, 3, all the four ports shared
port 0's MDIO controller, so when programming port 0, we continue to
program other three ports.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Shaohui Xie [Mon, 26 Oct 2015 11:47:47 +0000 (19:47 +0800)]
net: Move some header files to include/
The fsl_dtsec.h & fsl_tgec.h & fsl_fman.h can be shared on both ARM
and PPC, move it out of ppc to include/, and change the path in
drivers accordingly.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Shaohui Xie [Mon, 26 Oct 2015 11:47:46 +0000 (19:47 +0800)]
net: fm: bug fix when CONFIG_PHYLIB not defined
codes related to phylib operations should be wrapped by CONFIG_PHYLIB.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Hou Zhiqiang [Mon, 26 Oct 2015 11:47:45 +0000 (19:47 +0800)]
net/fm: Make the return value logic consistent with convention
In convention, the '0' is a normal return value indicating there isn't
an error. While some functions of FMan IM driver treat '0' as an error
return value.
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Hou Zhiqiang [Mon, 26 Oct 2015 11:47:44 +0000 (19:47 +0800)]
net/fm: Add support for 64-bit platforms
The FMan IM driver is developed for 32-bit platfroms and isn't
friendly to 64-bit platforms, so do the minimal refactor:
1. Refine the MURAM management and access.
2. Correct the initialization and operations for QDs and BDs.
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Hou Zhiqiang [Mon, 26 Oct 2015 11:47:43 +0000 (19:47 +0800)]
net/fm: Fix the endian issue to support both endianness platforms
The Frame Manager(FMan) is a big-endian peripheral, so the
registers, internal MURAM and BDs, which are allocated in main
memory and used to communication between core and FMan, should
be accessed in big-endian. The big-endian platforms can access
them directly as the code implemented so far, while for the
little-endian platforms it need to swap the byte-order.
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Mingkai Hu [Mon, 26 Oct 2015 11:47:41 +0000 (19:47 +0800)]
armv7/ls1021a: move ns_access to common file
Config Security Level Register is different between different SoCs,
so put the CSL register definition into the arch specific directory.
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Gong Qianyu [Mon, 26 Oct 2015 11:47:42 +0000 (19:47 +0800)]
common/board_f.c: change the macro name and remove it for PPC platforms
For most PPC platforms, they will call the first get_clocks() in
init_sequence_f[] as they define CONFIG_PPC. CONFIG_SYS_FSL_CLK is
then defined to call the second get_clocks(), which should be
redundant for PPC.
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
horia.geanta@freescale.com [Thu, 15 Oct 2015 11:21:31 +0000 (14:21 +0300)]
arm: ls102xa: enable snooping for CAAM transactions
Enable snooping for CAAM read & write transactions by
programming the SCFG snoop configuration register:
SCFG_SNPCNFGCR[SECRDSNP]
SCFG_SNPCNFGCR[SECWRSNP]
Signed-off-by: Horia Geantă <horia.geanta@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Prabhakar Kushwaha [Wed, 7 Oct 2015 11:00:12 +0000 (16:30 +0530)]
armv8: ls2085a: Add support of random MAC address
Add support of setting RANDOM MAC address if env variable not available.
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Prabhakar Kushwaha [Wed, 7 Oct 2015 10:59:58 +0000 (16:29 +0530)]
driver: net: ldpaa_eth: Set MAC address during interface open
Currently ldpaa ethernet driver rely on DPL file to statically configure
mac address for the DPNIs. It is not a correct approach.
Add support setting MAC address from env variable or Random MAC address.
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Shaohui Xie [Thu, 24 Sep 2015 10:20:32 +0000 (18:20 +0800)]
armv8: ls2085ardb: enable CONFIG_PHY_AQUANTIA
To support on board Aquantia's PHY AQR405.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Aneesh Bansal [Thu, 29 Oct 2015 17:28:03 +0000 (22:58 +0530)]
crypto/fsl: SEC driver cleanup for 64 bit and endianness
The SEC driver code has been cleaned up to work for 64 bit
physical addresses and systems where endianess of SEC block
is different from the Core.
Changes:
1. Descriptor created on Core is modified as per SEC block
endianness before the job is submitted.
2. The read/write of physical addresses to Job Rings will
be depend on endianness of SEC block as 32 bit low and
high part of the 64 bit address will vary.
3. The 32 bit low and high part of the 64 bit address in
descriptor will vary depending on endianness of SEC.
Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Aneesh Bansal [Thu, 17 Sep 2015 10:46:35 +0000 (16:16 +0530)]
Data types defined for 64 bit physical address
Data types and I/O functions have been defined for
64 bit physical addresses in arm.
Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Aneesh Bansal [Thu, 17 Sep 2015 10:46:34 +0000 (16:16 +0530)]
Pointers in ESBC header made 32 bit
For the Chain of Trust, the esbc_validate command supports
32 bit fields for location of the image. In the header structure
definition, these were declared as pointers which made them
64 bit on a 64 bit core.
Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Alison Wang [Wed, 28 Oct 2015 02:40:23 +0000 (10:40 +0800)]
ls102xa: fdt: Disable IFC in SD boot for QSPI
As QSPI/DSPI and IFC are pin multiplexed, IFC is disabled
in SD boot for QSPI. This patch will add fdt support for
this rule.
Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Tom Rini [Wed, 28 Oct 2015 20:56:43 +0000 (16:56 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi
Josh Wu [Tue, 1 Sep 2015 10:22:55 +0000 (18:22 +0800)]
net: change the env name to use const
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>
Gong Qianyu [Mon, 31 Aug 2015 03:34:43 +0000 (11:34 +0800)]
net/eth: fix a bug in on_ethaddr()
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>
Stefan Brüns [Sun, 30 Aug 2015 15:59:45 +0000 (17:59 +0200)]
smsc95xx: Fetch whole burst with 1 URB, avoid framing errors
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>
Stefan Brüns [Sun, 30 Aug 2015 15:47:17 +0000 (17:47 +0200)]
net: cancel timeout handler after DHCPACK
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>
Stefan Brüns [Sun, 30 Aug 2015 15:46:54 +0000 (17:46 +0200)]
net/arp: account for ARP delay, avoid duplicate packets on timeout
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>
Stefan Brüns [Sun, 30 Aug 2015 15:46:43 +0000 (17:46 +0200)]
net/arp: Do not run net_start_again() on timeout
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>
Stefan Brüns [Fri, 28 Aug 2015 08:15:54 +0000 (10:15 +0200)]
net: Fix parsing of Bootp/DHCP option 0 (Pad)
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>
Stefan Brüns [Thu, 27 Aug 2015 21:57:18 +0000 (23:57 +0200)]
net: send RFC1542 compliant value for bootp requests
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>
Stefan Brüns [Thu, 27 Aug 2015 21:53:26 +0000 (23:53 +0200)]
net: reject Bootp/DHCP packets with bad OP value
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>