]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
9 years agoimx: hab: add mx7 secure boot support
Adrian Alonso [Mon, 12 Oct 2015 18:48:15 +0000 (13:48 -0500)]
imx: hab: add mx7 secure boot support

Add mx7 secure boot support, add helper macro IS_HAB_ENABLED_BIT
to get the corresponding bit mask per SoC (mx7 or mx6) to identify
if securue boot feature is enabled/disabled.

On authenticate_image only check for mmu enabled on mx6 SoC to
force pu_irom_mmu_enabled so ROM code can perform mmu cache flush
mx7 SoC ROM code does not have this issue as ROM enables cache support
based on fuse settings.

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
9 years agoimx: hab: use read_fuse for secure boot settings
Adrian Alonso [Mon, 12 Oct 2015 18:48:14 +0000 (13:48 -0500)]
imx: hab: use read_fuse for secure boot settings

Use read_fuse api fuction call to read secure boot fuse
settings (enabled/disabled).

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
9 years agoarm: imx: add secure boot fuse details for imx7 SoC
Adrian Alonso [Mon, 12 Oct 2015 18:48:13 +0000 (13:48 -0500)]
arm: imx: add secure boot fuse details for imx7 SoC

Add secure boot fuse details (location) bank = 1, word = 3;
for imx7 SoC platforms.

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
9 years agoarm: imx: add secure boot fuse details for imx6 SoC
Adrian Alonso [Mon, 12 Oct 2015 18:48:12 +0000 (13:48 -0500)]
arm: imx: add secure boot fuse details for imx6 SoC

Add secure boot fuse details (location) bank = 0, word = 6;
for imx6 SoC platforms.

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
9 years agoimx: hab: add secure boot fuse details
Adrian Alonso [Mon, 12 Oct 2015 18:48:11 +0000 (13:48 -0500)]
imx: hab: add secure boot fuse details

Add secure boot fuse helper struct to abstract the way
to find out secure boot settings per SoC iMX family

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
9 years agoimx: hab: rework unified rom section for mx7
Adrian Alonso [Mon, 12 Oct 2015 18:48:10 +0000 (13:48 -0500)]
imx: hab: rework unified rom section for mx7

Rework unified section macro select via Kconfig option
instead of macro definition in mx7_common header file.

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
9 years agoimx: hab: use unified rom section for mx6sx and mx6ul
Adrian Alonso [Mon, 12 Oct 2015 18:48:09 +0000 (13:48 -0500)]
imx: hab: use unified rom section for mx6sx and mx6ul

Add CONFIG_ROM_UNIFIED_SECTIONS for mx6sx and mx6ul target
platforms to resolve corresponding HAB_RVT_BASE base address,
the RVT table contains pointers to the HAB API functions in
ROM code.

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
9 years agoimx: hab: rework secure boot support for imx6
Adrian Alonso [Mon, 12 Oct 2015 18:48:08 +0000 (13:48 -0500)]
imx: hab: rework secure boot support for imx6

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>
9 years agoimx: cpu: move common chip revision id's
Adrian Alonso [Mon, 12 Oct 2015 18:48:07 +0000 (13:48 -0500)]
imx: cpu: move common chip revision id's

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>
9 years agoimx: mx6sabresd: add i.MX6DQP Sabresd support
Peng Fan [Thu, 15 Oct 2015 10:05:59 +0000 (18:05 +0800)]
imx: mx6sabresd: add i.MX6DQP Sabresd support

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>
9 years agoimx: mx6sabresd discard PHYS_SDRAM_SIZE
Peng Fan [Thu, 15 Oct 2015 10:05:58 +0000 (18:05 +0800)]
imx: mx6sabresd discard PHYS_SDRAM_SIZE

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>
9 years agoimx35, flea3: add FIT image support
Heiko Schocher [Fri, 9 Oct 2015 04:24:59 +0000 (06:24 +0200)]
imx35, flea3: add FIT image support

add FIT image support for the flea3 board.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agots4800: add CONFIG_OF_LIBFDT
Damien Riegel [Tue, 6 Oct 2015 21:33:28 +0000 (17:33 -0400)]
ts4800: add CONFIG_OF_LIBFDT

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>
9 years agoarm, imx6, aristainetos2: set gpr register after reset
Heiko Schocher [Fri, 25 Sep 2015 10:31:49 +0000 (12:31 +0200)]
arm, imx6, aristainetos2: set gpr register after reset

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>
9 years agoarm, imx: add some gpr register defines
Heiko Schocher [Fri, 25 Sep 2015 10:31:48 +0000 (12:31 +0200)]
arm, imx: add some gpr register defines

add some missing gpr register defines.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agodriver: misc: add MXC_OCOTP Kconfig entry
Peng Fan [Thu, 27 Aug 2015 06:49:05 +0000 (14:49 +0800)]
driver: misc: add MXC_OCOTP Kconfig entry

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>
9 years agoimx-common: timer: clean up code
Peng Fan [Wed, 26 Aug 2015 07:40:58 +0000 (15:40 +0800)]
imx-common: timer: clean up code

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>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot
Stefano Babic [Fri, 30 Oct 2015 13:52:51 +0000 (14:52 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot

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

Replace numerical bit shift with BIT macro
in tegra*.c

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

Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Warren <twarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agospi: sh_qspi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:08:47 +0000 (01:38 +0530)]
spi: sh_qspi: Use BIT macro

Replace numerical bit shift with BIT macro
in sh_qspi

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

Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agospi: omap3_spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:08:32 +0000 (01:38 +0530)]
spi: omap3_spi: Use BIT macro

Replace numerical bit shift with BIT macro
in omap3_spi

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

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: mpc8xxx_spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:08:07 +0000 (01:38 +0530)]
spi: mpc8xxx_spi: Use BIT macro

Replace numerical bit shift with BIT macro
in mpc8xxx_spi

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

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agospi: ich: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:07:56 +0000 (01:37 +0530)]
spi: ich: Use BIT macro

Replace numerical bit shift with BIT macro
in ich

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

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agospi: fsl: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:07:18 +0000 (01:37 +0530)]
spi: fsl: Use BIT macro

Replace numerical bit shift with BIT macro
in fsl_*spi.c

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

Cc: York Sun <yorksun@freescale.com>
Cc: Haikun Wang <Haikun.Wang@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agospi: designware_spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:06:23 +0000 (01:36 +0530)]
spi: designware_spi: Use BIT macro

Replace numerical bit shift with BIT macro
in designware_spi

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

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: cadence_qspi_apb: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:06:06 +0000 (01:36 +0530)]
spi: cadence_qspi_apb: Use BIT macro

Replace numerical bit shift with BIT macro
in cadence_qspi_apb

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

Cc: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agospi: bfin_spi6xx: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:05:47 +0000 (01:35 +0530)]
spi: bfin_spi6xx: Use BIT macro

Replace numerical bit shift with BIT macro
in bfin_spi6xx

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

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agospi: atmel_spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:05:26 +0000 (01:35 +0530)]
spi: atmel_spi: Use BIT macro

Replace numerical bit shift with BIT macro
in atmel_spi

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

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: zynq_[q]spi: Use GENMASK macro
Jagan Teki [Thu, 22 Oct 2015 15:36:37 +0000 (21:06 +0530)]
spi: zynq_[q]spi: Use GENMASK macro

GENMASK macro used on zynq_spi.c and zynq_qspi.c

GENMASK is used to create a contiguous bitmask([hi:lo]).
Ex: (0x7 << 3) => GENMASK(5, 3)

Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agospi: zynq_[q]spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 15:10:16 +0000 (20:40 +0530)]
spi: zynq_[q]spi: Use BIT macro

Used BIT macro on zynq_spi.c and zynq_qspi.c

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

Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agoocotea: Drop
Tom Rini [Sat, 24 Oct 2015 21:24:07 +0000 (17:24 -0400)]
ocotea: Drop

This board has not compiled for me for quite some time due to size
constraints, remove.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agotaishan: Drop
Tom Rini [Sat, 24 Oct 2015 21:24:06 +0000 (17:24 -0400)]
taishan: Drop

This board has not compiled for me for quite some time due to size
constraints, remove.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoebony: Drop
Tom Rini [Sat, 24 Oct 2015 21:24:05 +0000 (17:24 -0400)]
ebony: Drop

This board has not compiled for me for quite some time due to size
constraints, remove.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agotaihu: Remove
Tom Rini [Sat, 24 Oct 2015 21:24:04 +0000 (17:24 -0400)]
taihu: Remove

This board has not compiled for me for quite some time due to size
constraints, remove.

Cc: John Otken <jotken@softadvances.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agocfi_flash: use specific width types for cword
Ryan Harkin [Fri, 23 Oct 2015 15:50:51 +0000 (16:50 +0100)]
cfi_flash: use specific width types for cword

This patch changes the cword union to use specific length types that are
architecture indepented.

This patch also renames the members of the cword union to represent
their usage, i.e.:

    c  -> w8
    s  -> w16
    l  -> w32
    ll -> w64

Where "w" stands for "width" in bits.

I discovered this problem when enabling CFI flash on vexpress64.
cword.l was an unsigned long int, but it was intended to be 32 bits wide.
Unfortunately, it's 64-bits wide on a 64-bit system, meaning that a
64-bit system fails when attempting to use 32-bit wide CFI flash parts.

Similar problems also existed with the other cword sizes.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoUBI: Fastmap: Fix PEB array type
Heiko Schocher [Thu, 22 Oct 2015 04:19:22 +0000 (06:19 +0200)]
UBI: Fastmap: Fix PEB array type

The PEB array is an array of __be32, so let's fix the
scan_pool() prototype accordingly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agoubi,ubifs: sync with linux v4.2
Heiko Schocher [Thu, 22 Oct 2015 04:19:21 +0000 (06:19 +0200)]
ubi,ubifs: sync with linux v4.2

sync with linux v4.2

commit 64291f7db5bd8150a74ad2036f1037e6a0428df2
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Aug 30 11:34:09 2015 -0700

    Linux 4.2

This update is needed, as it turned out, that fastmap
was in experimental/broken state in kernel v3.15, which
was the last base for U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
9 years agolinux, compat: add missing definitions for ubi
Heiko Schocher [Thu, 22 Oct 2015 04:19:20 +0000 (06:19 +0200)]
linux, compat: add missing definitions for ubi

add missing definitions for the ubi/ubifs sync
with linux 4.2, also change "#define kfree ..."
into a static inline, so prevent ubi compile error:

   CC      drivers/mtd/ubi/fastmap.o
drivers/mtd/ubi/fastmap.c: In function 'scan_pool':
drivers/mtd/ubi/fastmap.c:475:3: error: called object 'free' is not a function

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agospi: zynq_qspi: Minor cleanups
Jagan Teki [Sun, 25 Oct 2015 04:01:54 +0000 (09:31 +0530)]
spi: zynq_qspi: Minor cleanups

- Use __func__ on debug
- Removed unnecessary comment
- Fix function name in debug as zynq_qspi_xfer instead of spi_xfer

Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agosf: Add FSR support to spi_flash_cmd_wait_ready
Jagan Teki [Tue, 29 Sep 2015 11:24:31 +0000 (16:54 +0530)]
sf: Add FSR support to spi_flash_cmd_wait_ready

This patch adds flag status register reading support to
spi_flash_cmd_wait_ready.

Cc: Simon Glass <sjg@chromium.org>
Cc: Marek Vasut <marex@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Hou Zhiqiang <B48286@freescale.com>
Tested-by: Jagan Teki <jteki@openedev.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agosf: Update status reg check in spi_flash_cmd_wait_ready
Jagan Teki [Wed, 2 Sep 2015 06:09:50 +0000 (11:39 +0530)]
sf: Update status reg check in spi_flash_cmd_wait_ready

Current flash wait_ready logic is not modular to add new
register status check, hence updated the status check for
adding few more register checks in future.

Below are the sf speed runs with 'sf update' on whole flash, 16MiB.

=> sf update 0x100 0x0 0x1000000
device 0 whole chip
16777216 bytes written, 0 bytes skipped in 59.564s, speed 289262 B/s

=> sf update 0x100 0x0 0x1000000
device 0 whole chip
16777216 bytes written, 0 bytes skipped in 62.549s, speed 275036 B/s

=> sf update 0x100 0x0 0x1000000
device 0 whole chip
16777216 bytes written, 0 bytes skipped in 61.276s, speed 284359 B/s

Cc: Simon Glass <sjg@chromium.org>
Cc: Marek Vasut <marex@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Tom Rini <trini@konsulko.com>
Tested-by: Jagan Teki <jteki@openedev.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
9 years agosf: Make flash->flags use for generic usage
Jagan Teki [Tue, 29 Sep 2015 05:47:02 +0000 (11:17 +0530)]
sf: Make flash->flags use for generic usage

Use the flash->flags for generic usage, not only for dm-spi-flash,
this will be used for future flag additions.

[Correct the spi flash flags detect logic]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agosf: Optimize BAR write code
Jagan Teki [Wed, 2 Sep 2015 06:09:48 +0000 (11:39 +0530)]
sf: Optimize BAR write code

Optimized spi-flash bar writing code and also removed
unnecessary bank_sel in read_ops.

Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agosf: Add spi_flash_read_bar
Jagan Teki [Wed, 2 Sep 2015 06:09:47 +0000 (11:39 +0530)]
sf: Add spi_flash_read_bar

Add spi_flash_read_bar function for reading bar and
discovering bar commands at probe time.

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agosf: Return bank_sel, if flash->bank_curr == bank_sel
Jagan Teki [Wed, 2 Sep 2015 06:09:46 +0000 (11:39 +0530)]
sf: Return bank_sel, if flash->bank_curr == bank_sel

If computed bank_sel is same as flash->bank_curr which is
computed at probe time, then return the bank_sel instead of zero.

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agospi: zynq_spi: Remove unneeded headers
Jagan Teki [Wed, 2 Sep 2015 06:09:45 +0000 (11:39 +0530)]
spi: zynq_spi: Remove unneeded headers

- Removed unneeded inclusion of header files
- Add "Xilinx" on license text

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agozynq-common: Add SPL SPI offset, size configs
Siva Durga Prasad Paladugu [Mon, 14 Sep 2015 07:29:08 +0000 (12:59 +0530)]
zynq-common: Add SPL SPI offset, size configs

Define CONFIG_SYS_SPI_ARGS_OFFS, CONFIG_SYS_SPI_ARGS_SIZE
and CONFIG_SYS_SPI_KERNEL_OFFS which will be used in SPL
spi mode. These macros defines the device tree offset, size
and the kernel image offset in flash respectively.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agospi: zynq_qspi: Fix to configure CPOL, CPHA mask
Jagan Teki [Mon, 7 Sep 2015 20:09:44 +0000 (01:39 +0530)]
spi: zynq_qspi: Fix to configure CPOL, CPHA mask

priv->mode is initialized when .set_speed triggers
with mode value, so checking mode for configuring
CPOL, CPHA using priv->mode is invalid hence use
mode from .set_speed argument, and at the end
priv->mode will initialized with mode.

This patch also replaces formatting string to use
speed instead of mode in .set_speed ops.

Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agozynq-common: Enable ISSI SPI-NOR flash support
Jagan Teki [Fri, 4 Sep 2015 13:00:34 +0000 (18:30 +0530)]
zynq-common: Enable ISSI SPI-NOR flash support

This patch enabled CONFIG_SPI_FLASH_ISSI for qspi on zynq boards.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
9 years agosf: params: Add IS25LP128 part support
Jagan Teki [Fri, 4 Sep 2015 12:59:12 +0000 (18:29 +0530)]
sf: params: Add IS25LP128 part support

Added support for IS25LP128 flash part.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
9 years agosf: params: Add IS25LP064 part support
Jagan Teki [Fri, 4 Sep 2015 12:57:58 +0000 (18:27 +0530)]
sf: params: Add IS25LP064 part support

Added support for IS25LP064 flash part.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
9 years agosf: params: Add IS25LP032 part support
Jagan Teki [Fri, 4 Sep 2015 12:55:45 +0000 (18:25 +0530)]
sf: params: Add IS25LP032 part support

Added support for IS25LP032 flash part.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>