oweals/u-boot.git
9 years agolib, fdt: Adding fdtdec_get_uint function
Chin Liang See [Sat, 17 Oct 2015 13:30:32 +0000 (08:30 -0500)]
lib, fdt: Adding fdtdec_get_uint function

Adding fdtdec_get_uint function which is the
unsigned version for fdtdec_get_int

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vikas Manocha <vikas.manocha@st.com>
Cc: Jagannadh Teki <jteki@openedev.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Heiko Schocher <hs@denx.de>
9 years agoarm: socfpga: reset: correct dma, qspi, and sdmmc reset bit defines
Dinh Nguyen [Mon, 2 Nov 2015 23:11:21 +0000 (17:11 -0600)]
arm: socfpga: reset: correct dma, qspi, and sdmmc reset bit defines

The DMA, QSPI, and SD/MMC reset bits are located in the permodrst register,
not the mpumodrst. So the bank for these reset bits should be 1, not 0.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
9 years agompc85xx/t2081: enable parsing DDR ratio for T2081 rev1.1
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>
9 years agoT104xD4RDB: Fix PHY address for PHY connected to FM1@DTSEC3
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>
9 years agommc: fsl_esdhc: enable EVDD automatic control for SD/MMC Legacy Adapter Card
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>
9 years agopowerpc/t1040qds: enable peripheral clock for eSDHC
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>
9 years agopowerpc/t1040qds: enable adapter card type identification support
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>
9 years agommc: fsl_esdhc: enable dat[4:7] for eMMC4.5 Adapter Card
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>
9 years agoPowerpc: eSDHC: expand a fix to T4160
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>
9 years agot1040d4rdb: assign muxed pins to qe-tdm when set hwconfig qe-tdm
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>
9 years agoARM: at91: sama5: change the environment address to 0x6000
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>
9 years agolcd: atmel: Add 32bpp support for HLCDC
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>
9 years agommc: atmel: Zap global 'initialized' variable
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>
9 years agommc: atmel: Implement proper private data
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>
9 years agommc: atmel: Fix clock configuration
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>
9 years agommc: atmel: Silence debug output
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>
9 years agoat91: simplify spl board_init_f function
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>
9 years agox86: Select the ns16550 debug UART for minnowmax, chromebook_link
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>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
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

9 years agols102xa: Adjust some macros for SD boot on LS1021A QDS board
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>
9 years agoconfigs: ls1021atwr: Enable ID EEPROM for SD boot
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>
9 years agoarm: ls1021atwr: optimize the deep sleep latency
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>
9 years agoSECURE_BOOT: Correct reading of ITS bit
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>
9 years agodrivers/ddr/fsl_ddr: Make SR_IE configurable
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>
9 years agoREADME.scrapyard: Populate recent ppc4xx removals
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>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Thu, 29 Oct 2015 20:30:33 +0000 (16:30 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net

9 years agonet: eth: Check return value in various places
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>
9 years agodm: test: Add a new test case against dm eth codes for NULL pointer access
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>
9 years agonet: eth: Clear MAC address in eth_pre_remove()
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>
9 years agodm: core: Remove unnecessary codes in uclass_pre_remove_device()
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>
9 years agonet: pch_gbe: Add driver remove support
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>
9 years agonet: designware: Add driver remove support
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>
9 years agonet: mdio: Add mdio_free() and mdio_unregister() API
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>
9 years agonet: phy: Test previous phydev->dev against new mac dev
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>
9 years agonet: phy: Change to print all phys that are not found
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>
9 years agonet: phy: Don't create phy device when there is no phy
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>
9 years agonet: phy: micrel: disable NAND-tree for KSZ8051
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>
9 years agonet: rtl8169: Build warning fixes for 64-bit
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>
9 years agonet: Increase the size of the net_boot_file_name buffer
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>
9 years agonet: phy: micrel: add support for KSZ8021RNL & KSZ8031RNL
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>
9 years agosmsc95xx: Use zero length packets when RX fifo is empty
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>
9 years agonet: parse DHCP options from overloaded file/sname fields
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>
9 years agonet: Do not overwrite options found in overloaded 'file' field
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>
9 years agoarm: ls1021a: Add sata support on qds and twr board
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>
9 years agoarm: ls102xa: Set fdt_high and initrd_high to the value of 0xffffffff
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>
9 years agoarmv8/ls1043a: Enable secondary cores
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>
9 years agoarmv8/ls1043ardb: Add sd boot support
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>
9 years agoarmv8/ls1043ardb: esdhc: Add esdhc support for ls1043ardb
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>
9 years agoarmv8/ls1043a: Add Fman support
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>
9 years agoarmv8/ls1043ardb: Add nand boot support
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>
9 years agoarmv8/ls1043ardb: Add LS1043ARDB board support
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>
9 years agoarmv8/fsl_lsch2: Add fsl_lsch2 SoC
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>
9 years agoarmv8/fsl_lsch3: Change arch to fsl-layerscape
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>
9 years agonet/fm: fix MDIO controller base on FMAN2
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>
9 years agonet/fm: Add QSGMII PCS init
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>
9 years agonet: Move some header files to include/
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>
9 years agonet: fm: bug fix when CONFIG_PHYLIB not defined
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>
9 years agonet/fm: Make the return value logic consistent with convention
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>
9 years agonet/fm: Add support for 64-bit platforms
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>
9 years agonet/fm: Fix the endian issue to support both endianness platforms
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>
9 years agoarmv7/ls1021a: move ns_access to common file
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>
9 years agocommon/board_f.c: change the macro name and remove it for PPC platforms
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>
9 years agoarm: ls102xa: enable snooping for CAAM transactions
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>
9 years agoarmv8: ls2085a: Add support of random MAC address
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>
9 years agodriver: net: ldpaa_eth: Set MAC address during interface open
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>
9 years agoarmv8: ls2085ardb: enable CONFIG_PHY_AQUANTIA
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>
9 years agocrypto/fsl: SEC driver cleanup for 64 bit and endianness
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>
9 years agoData types defined for 64 bit physical address
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>
9 years agoPointers in ESBC header made 32 bit
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>
9 years agols102xa: fdt: Disable IFC in SD boot for QSPI
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>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Wed, 28 Oct 2015 20:56:43 +0000 (16:56 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

9 years agonet: change the env name to use const
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>
9 years agonet/eth: fix a bug in on_ethaddr()
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>
9 years agosmsc95xx: Fetch whole burst with 1 URB, avoid framing errors
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>
9 years agonet: cancel timeout handler after DHCPACK
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>
9 years agonet/arp: account for ARP delay, avoid duplicate packets on timeout
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>
9 years agonet/arp: Do not run net_start_again() on timeout
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>
9 years agonet: Fix parsing of Bootp/DHCP option 0 (Pad)
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>
9 years agonet: send RFC1542 compliant value for bootp requests
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>
9 years agonet: reject Bootp/DHCP packets with bad OP value
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>
9 years agonet: protect status led access in bootp
Thomas Chou [Tue, 25 Aug 2015 12:54:24 +0000 (20:54 +0800)]
net: protect status led access in bootp

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>
9 years agonet: bootp fix vci string on SPL-Boot
Hannes Petermaier [Tue, 25 Aug 2015 10:17:59 +0000 (12:17 +0200)]
net: bootp fix vci string on SPL-Boot

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>
9 years agonet: TFTP: variables cleanup and addition
Albert ARIBAUD \(3ADEV\) [Sun, 11 Oct 2015 22:02:57 +0000 (00:02 +0200)]
net: TFTP: variables cleanup and addition

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.

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Wed, 28 Oct 2015 11:22:51 +0000 (07:22 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

9 years agoi2c: Instantiate I2C controllers when selected
Michal Simek [Tue, 27 Oct 2015 15:02:36 +0000 (16:02 +0100)]
i2c: Instantiate I2C controllers when selected

Do not enable both I2C controllers by default. Enable them only when
they are selected.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agospi: altera_spi: Minor cleanup
Jagan Teki [Tue, 27 Oct 2015 17:41:11 +0000 (23:11 +0530)]
spi: altera_spi: Minor cleanup

- 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>
9 years agospi: altera_spi: Use BIT macro
Jagan Teki [Tue, 27 Oct 2015 17:39:56 +0000 (23:09 +0530)]
spi: altera_spi: Use BIT macro

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>
9 years agoarch/powerpc/cpu/ppc4xx/Kconfig: Finish removing boards
Tom Rini [Wed, 28 Oct 2015 00:28:39 +0000 (20:28 -0400)]
arch/powerpc/cpu/ppc4xx/Kconfig: Finish removing boards

My patches to drop various ppc4xx boards were not build tested and
omitted the Kconfig parts.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoMerge git://www.denx.de/git/u-boot-ppc4xx
Tom Rini [Tue, 27 Oct 2015 23:09:26 +0000 (19:09 -0400)]
Merge git://www.denx.de/git/u-boot-ppc4xx

9 years agoMerge git://www.denx.de/git/u-boot-cfi-flash
Tom Rini [Tue, 27 Oct 2015 23:09:15 +0000 (19:09 -0400)]
Merge git://www.denx.de/git/u-boot-cfi-flash

9 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Tue, 27 Oct 2015 23:08:19 +0000 (19:08 -0400)]
Merge git://git.denx.de/u-boot-dm

9 years agoimage.c: Fix non-Android booting with ramdisk and/or device tree
Tom Rini [Tue, 27 Oct 2015 23:04:40 +0000 (19:04 -0400)]
image.c: Fix non-Android booting with ramdisk and/or device tree

In 1fec3c5 I added a check that if we had an Android image we default to
trying the kernel address for a ramdisk.  However when we don't have an
Android image buf is NULL and we oops here.  Ensure that we have 'buf'
to check first.

Reported-by: elipe Balbi <balbi@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agospi: xilinx_spi: Use GENMASK
Jagan Teki [Thu, 22 Oct 2015 19:33:44 +0000 (01:03 +0530)]
spi: xilinx_spi: Use GENMASK

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>
9 years agospi: tegra: Use GENMASK
Jagan Teki [Thu, 22 Oct 2015 19:33:10 +0000 (01:03 +0530)]
spi: tegra: Use GENMASK

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>
9 years agospi: omap3_spi: Use GENMASK
Jagan Teki [Thu, 22 Oct 2015 19:32:49 +0000 (01:02 +0530)]
spi: omap3_spi: Use GENMASK

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>
9 years agospi: fsl_qspi: Use GENMASK
Jagan Teki [Thu, 22 Oct 2015 19:32:04 +0000 (01:02 +0530)]
spi: fsl_qspi: Use GENMASK

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>
9 years agospi: designware_spi: Use GENMASK
Jagan Teki [Thu, 22 Oct 2015 19:31:36 +0000 (01:01 +0530)]
spi: designware_spi: Use GENMASK

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>
9 years agospi: atmel_spi: Use GENMASK
Jagan Teki [Thu, 22 Oct 2015 19:29:00 +0000 (00:59 +0530)]
spi: atmel_spi: Use GENMASK

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>
9 years agospi: xilinx_spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:09:31 +0000 (01:39 +0530)]
spi: xilinx_spi: Use BIT macro

Replace numerical bit shift with BIT macro
in xilinx_spi

:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31

Cc: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agospi: ti_qspi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:09:20 +0000 (01:39 +0530)]
spi: ti_qspi: Use BIT macro

Replace numerical bit shift with BIT macro
in ti_qspi

:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31

Reviewed-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>