]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
11 years agozynq: Add new Zynq OCM platform
Siva Durga Prasad Paladugu [Fri, 14 Mar 2014 11:05:41 +0000 (16:35 +0530)] 
zynq: Add new Zynq OCM platform

Added SD/MMC read support for u-boot running from OCM.
Added option to build the same with config zynq_ocm.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Added config to support loadfs FPGA command
Siva Durga Prasad Paladugu [Fri, 14 Mar 2014 11:05:40 +0000 (16:35 +0530)] 
zynq: Added config to support loadfs FPGA command

Added config CONFIG_FPGA_LOADFS to support loadfs
FPGA command.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agofs: zynq: Added FAT support for zynq u-boot on OCM
Siva Durga Prasad Paladugu [Fri, 14 Mar 2014 11:05:39 +0000 (16:35 +0530)] 
fs: zynq: Added FAT support for zynq u-boot on OCM

Modified the buffers and its sizes inorder to support
SD/MMC fat read  capability for u-bbot running from OCM

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agofpga: Guard the LOADMK functionality with config
Siva Durga Prasad Paladugu [Fri, 14 Mar 2014 11:05:38 +0000 (16:35 +0530)] 
fpga: Guard the LOADMK functionality with config

Guard the LOADMK functionality with config to provide
an option to enable or disable it.
This will require to enable this option for all configs
in mainline.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agofpga: zynq: Added support to load bit stream from SD/MMC
Siva Durga Prasad Paladugu [Fri, 14 Mar 2014 11:05:37 +0000 (16:35 +0530)] 
fpga: zynq: Added support to load bit stream from SD/MMC

Added support to load a bitstream image in chunks by reading it in
chunks from SD/MMC.
Command format:
loadfs [dev] [address] [image size] [blocksize] <interface>
       [<dev[:part]>] <filename>
Example: fpga loadfs 0 1000000 3dbafc 4000 mmc 0 fpga.bin

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agofpga: zynq: Use helper function zynq_validate_bitstream
Siva Durga Prasad Paladugu [Thu, 13 Mar 2014 06:27:34 +0000 (11:57 +0530)] 
fpga: zynq: Use helper function zynq_validate_bitstream

Use helper function zynq_validate_bitstream so that the
code can be reused easily for different cases of dma transfer.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agofat: Define MAX_CLUSTSIZE only if not defined in config
Siva Durga Prasad Paladugu [Thu, 13 Mar 2014 06:27:36 +0000 (11:57 +0530)] 
fat: Define MAX_CLUSTSIZE only if not defined in config

Define MAX_CLUSTSIZE only if not defined in board specific
config file as this size can be decreased to save memory
in some memory constrained cases.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agofpga: zynq: Use zynq_dma_transfer helper function in RSA code
Siva Durga Prasad Paladugu [Wed, 12 Mar 2014 11:39:27 +0000 (17:09 +0530)] 
fpga: zynq: Use zynq_dma_transfer helper function in RSA code

Use zynq_dma_transfer helper function while decrypting encrypted
image.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agofpga: zynq: Use helper functions for zynq dma
Siva Durga Prasad Paladugu [Wed, 12 Mar 2014 11:39:26 +0000 (17:09 +0530)] 
fpga: zynq: Use helper functions for zynq dma

Use zynq_dma_xfer_init, zynq_align_dma_buffer,
zynq_dma_transfer helper function performing dma
transfers so that the code can be reused easily for
different cases of dma transfer.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Enable EXT4 configs
Siva Durga Prasad Paladugu [Wed, 12 Mar 2014 09:22:56 +0000 (14:52 +0530)] 
zynq: Enable EXT4 configs

Enabled the EXT4 configs.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Conflicts:
include/configs/zynq-common.h

11 years agozynq: Move USB/SD/MMC common FAT configs
Siva Durga Prasad Paladugu [Wed, 12 Mar 2014 09:22:56 +0000 (14:52 +0530)] 
zynq: Move USB/SD/MMC common FAT configs

Moved the USB/SD/MMC common FAT configs separately
to avoid redefinition warnings.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agospi: zynq_qspi: Dont clear the previous config register
Siva Durga Prasad Paladugu [Tue, 4 Mar 2014 10:20:39 +0000 (15:50 +0530)] 
spi: zynq_qspi: Dont clear the previous config register

Dont clear the previous config register as the iMPACT tool
expects the u-boot to keep settings of the config register
for flashing.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agosf: params: Added support for Spansion S25FL512S_512K
Siva Durga Prasad Paladugu [Tue, 4 Mar 2014 10:20:38 +0000 (15:50 +0530)] 
sf: params: Added support for Spansion S25FL512S_512K

Added support for Spansion chip "S25FL512S_512K".

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agofpga: zynqpl: Correct the variable names in do_zynq_decrypt_image
Siva Durga Prasad Paladugu [Tue, 4 Mar 2014 09:47:21 +0000 (15:17 +0530)] 
fpga: zynqpl: Correct the variable names in do_zynq_decrypt_image

Assign the variables as per its name while parsing the zynq_aes
command.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: rsa: Correct the total partition header size calculation
Siva Durga Prasad Paladugu [Tue, 4 Mar 2014 09:47:20 +0000 (15:17 +0530)] 
zynq: rsa: Correct the total partition header size calculation

Correct the partition header size calculation while copying the
partition header information.
This fixes the issue of corrupting the bss section because of
the wrong size calculation during copy.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agonet: emaclite: Use predefined macros instead of hardcoded value
Michal Simek [Tue, 25 Feb 2014 09:26:30 +0000 (10:26 +0100)] 
net: emaclite: Use predefined macros instead of hardcoded value

MII is used by this driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agonet: zynq: Use predefined macros instead of hardcoded value
Michal Simek [Tue, 25 Feb 2014 09:25:38 +0000 (10:25 +0100)] 
net: zynq: Use predefined macros instead of hardcoded value

MII is used by this driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agosf: Set QUAD enable of upper flash in Dual Stacked
Siva Durga Prasad Paladugu [Mon, 24 Feb 2014 06:06:55 +0000 (11:36 +0530)] 
sf: Set QUAD enable of upper flash in Dual Stacked

Sets the QUAD enable bit for upper flash incase of
dual stacked mode.
This fixes the issue of where the quad enable bit
of the upperflash was not set and hence not able
to access the upperflash using quad commands in
Dual stacked mode.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoARM: zynq: Use the same logic to protect fpga vars
Michal Simek [Tue, 4 Mar 2014 11:41:05 +0000 (12:41 +0100)] 
ARM: zynq: Use the same logic to protect fpga vars

This should be the part of patch:
"ARM: zynq: Do not call fpga init when FPGA is disabled in SPL"
(sha1: c223eaa214e723d4fe8b83ca86d00f6c6b4f0d7b)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Fix the build error when SPL is not built.
Jason Wu [Mon, 24 Feb 2014 03:52:53 +0000 (13:52 +1000)] 
zynq: Fix the build error when SPL is not built.

Don't generated Boot.bin unless CONFIG_SPL is defined

Signed-off-by: Jason Wu <j.wu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoARM: zynq: Do not call fpga init when FPGA is disabled in SPL
Michal Simek [Thu, 20 Feb 2014 08:48:08 +0000 (09:48 +0100)] 
ARM: zynq: Do not call fpga init when FPGA is disabled in SPL

Fix logic around fpga initialization in SPL.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agospl_mmc.c: Display correct message when bitstream fails to load
Mike Looijmans [Thu, 20 Feb 2014 06:39:07 +0000 (07:39 +0100)] 
spl_mmc.c: Display correct message when bitstream fails to load

When fpga.bin is missing it displayed this confusing message:

  reading fpga.bin
  spl: error reading image system.dtb, err - -1

Fix this in code by reporting CONFIG_SPL_FPGA_LOAD_ARGS_NAME.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Added USB host support for zynq boards
Siva Durga Prasad Paladugu [Thu, 20 Feb 2014 04:58:27 +0000 (10:28 +0530)] 
zynq: Added USB host support for zynq boards

Added configs to support USB host for zynq boards.
Also added a command usbboot to boot from usb.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: ehci: Added USB host driver support
Siva Durga Prasad Paladugu [Thu, 20 Feb 2014 04:58:26 +0000 (10:28 +0530)] 
zynq: ehci: Added USB host driver support

Added USB host driver for zynq.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: usb: Runtime detection of usb connected through slcr
Siva Durga Prasad Paladugu [Thu, 20 Feb 2014 04:58:25 +0000 (10:28 +0530)] 
zynq: usb: Runtime detection of usb connected through slcr

This patch adds support to check the connected
usb at runtime based on nand MIO configurations.
User needs to correctly configure the MIO's based
on the usb connected on the board.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Enable the FAT write capability
Siva Durga Prasad Paladugu [Wed, 12 Feb 2014 16:15:51 +0000 (21:45 +0530)] 
zynq: Enable the FAT write capability

Enable the FAT write capability for SD/MMC write
functionality.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: zynq: correct the argument to lldiv
Siva Durga Prasad Paladugu [Wed, 12 Feb 2014 16:08:35 +0000 (21:38 +0530)] 
arm: zynq: correct the argument to lldiv

Typecast the argument with unsigned long long
for proper calculation of lldiv

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agospi: zynq_qspi: Fill the spi slave structure correctly.
Siva Durga Prasad Paladugu [Tue, 4 Feb 2014 09:51:50 +0000 (15:21 +0530)] 
spi: zynq_qspi: Fill the spi slave structure correctly.

Fill the spi slave structure with proper read, write commands
supported and with dual mode value.

Problem was introduced by:
Merge tag 'v2014.01' into xilinx/master-next
(sha1: 60513f2031793692e60e3b2fc1930243bb6bb991)

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agosf: Fix the total flash size calculation.
Siva Durga Prasad Paladugu [Tue, 4 Feb 2014 09:51:49 +0000 (15:21 +0530)] 
sf: Fix the total flash size calculation.

No need to double the size in flash size calculation
as it was already done as a part of sector size
calculation.

Problem was introduced by:
Merge tag 'v2014.01' into xilinx/master-next
(sha1: 60513f2031793692e60e3b2fc1930243bb6bb991)

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agofpga: zynqpl: Add support for zc7015 device
Michal Simek [Thu, 26 Sep 2013 14:39:03 +0000 (16:39 +0200)] 
fpga: zynqpl: Add support for zc7015 device

Just extend tables with this new device.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Enable tftp put command
Michal Simek [Mon, 20 Jan 2014 13:40:26 +0000 (14:40 +0100)] 
zynq: Enable tftp put command

For saving content of memory via tftp to file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Use full tftpboot command instead of shortcut tftp
Michal Simek [Fri, 31 Jan 2014 08:38:38 +0000 (09:38 +0100)] 
zynq: Use full tftpboot command instead of shortcut tftp

The reason is enabling tftpput command where
tftp shorcut stops to work for tftpboot.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Do not use argparse module in boot.bin generation
Michal Simek [Thu, 30 Jan 2014 10:06:37 +0000 (11:06 +0100)] 
zynq: Do not use argparse module in boot.bin generation

Not all PCs have argparse installed. Use getopt way.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Fix elf header generation
Michal Simek [Wed, 29 Jan 2014 14:53:46 +0000 (15:53 +0100)] 
zynq: Fix elf header generation

This patch is here because of:
"arm: keep all sections in ELF file"
(sha1: 47ed5dd031d7d2c587e6afd386e79ccec1a1b7f7)

Our tools expected to have elf with only LOAD header.
Without this fix also PHDR, INTERP and DYNAMIC headers
are available in ELF.

Problem was introduced by:
Merge tag 'v2014.01' into xilinx/master-next
(sha1: 60513f2031793692e60e3b2fc1930243bb6bb991)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Enable BOOTP_MAY_FAILED
Michal Simek [Wed, 29 Jan 2014 13:08:32 +0000 (14:08 +0100)] 
zynq: Enable BOOTP_MAY_FAILED

Do no loop over and over again when DHCP server is not
responding correctly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Add -mfpu=neon to PLATFORM_RELFLAGS
Mike Looijmans [Tue, 28 Jan 2014 06:26:18 +0000 (07:26 +0100)] 
zynq: Add -mfpu=neon to PLATFORM_RELFLAGS

Fixes the following compiler error when using a GNU toolchain:
lowlevel_init.S:19: Error: selected processor does not support ARM mode `fmrx r1,FPEXC'
lowlevel_init.S:21: Error: selected processor does not support ARM mode `fmxr FPEXC,r1'

See also
http://forums.xilinx.com/t5/Embedded-Linux/Current-U-boot-master-u-boot-xlnx-fails-to-build-on-GNU/td-p/407205

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agomicroblaze: Add SPL support
Michal Simek [Tue, 21 Jan 2014 06:30:37 +0000 (07:30 +0100)] 
microblaze: Add SPL support

Add support for U-BOOT SPL. NOR and RAM mode are supported.
There are 3 images in NOR flash. u-boot.img, dtb and kernel.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoi2c: zynq: Add support for the second i2c controller
Michael Burr [Tue, 15 Oct 2013 20:23:14 +0000 (15:23 -0500)] 
i2c: zynq: Add support for the second i2c controller

Initialize the second i2c controller.

Signed-off-by: Michael Burr <michael.burr@logicpd.com>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoi2c: zynq: Support for 0-length register address
Michael Burr [Tue, 15 Oct 2013 20:23:12 +0000 (15:23 -0500)] 
i2c: zynq: Support for 0-length register address

Fixed bug with alen == 0 in 'i2c_write', 'i2c_read'
Further minor corrections:
- Write 'address' register before 'data' register.
- Write 'transfer_size' register before 'address' register.

Signed-off-by: Michael Burr <michael.burr@logicpd.com>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Generate boot.bin automatically
Michal Simek [Mon, 20 Jan 2014 15:06:35 +0000 (16:06 +0100)] 
zynq: Generate boot.bin automatically

Do not spend any time on boot.bin generation.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Add fpga support to u-boot SPL
Michal Simek [Fri, 17 Jan 2014 08:56:07 +0000 (09:56 +0100)] 
zynq: Add fpga support to u-boot SPL

Call board_init to ensure that fpga is properly detected.
Enable bit and bin formats.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Enable booting operating system from SPL
Michal Simek [Mon, 20 Jan 2014 13:43:19 +0000 (14:43 +0100)] 
zynq: Enable booting operating system from SPL

Enable this option for getting fast boot time.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Enable SPL command support
Michal Simek [Mon, 20 Jan 2014 13:39:57 +0000 (14:39 +0100)] 
zynq: Enable SPL command support

This command is used by full u-boot.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Add support for U-BOOT SPL
Michal Simek [Tue, 14 Jan 2014 13:21:52 +0000 (14:21 +0100)] 
zynq: Add support for U-BOOT SPL

This is the first implementation of u-boot spl
which can be used instead of fsbl.

SPL is using ps7_init.c/h files which are generated
from design tools. xil_io.h generation is in Makefile
just because of dependencies in ps7_init.c.
It is easier to create empty xil_io.h instead of
manually changing ps7_init.c.

For compiling u-boot SPL copy ps7_init.c/h to
board/xilinx/zynq folder and rebuild u-boot.

Own linker script and change in fat.c are there
just because of inefficient u-boot fat implementation
where ddr is used for storing some fat buffers.

MMC and QSPI support is added.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoserial: uartlite: Reset RX/TX in init
Michal Simek [Tue, 21 Jan 2014 06:29:47 +0000 (07:29 +0100)] 
serial: uartlite: Reset RX/TX in init

Just to be sure that there is no pending data.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agofpga: zynq: Fix conding style violation
Michal Simek [Wed, 22 Jan 2014 08:20:14 +0000 (09:20 +0100)] 
fpga: zynq: Fix conding style violation

Trivial fix.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agomicroblaze: Enable buffer write for NOR flashes
Michal Simek [Tue, 21 Jan 2014 06:26:58 +0000 (07:26 +0100)] 
microblaze: Enable buffer write for NOR flashes

It speeds up writing a lot.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agomicroblaze: Report priviledged or stack protection exception
Michal Simek [Mon, 20 Jan 2014 20:17:07 +0000 (21:17 +0100)] 
microblaze: Report priviledged or stack protection exception

Just list one more exception.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agomicroblaze: Show u-boot banner
Michal Simek [Mon, 20 Jan 2014 20:05:47 +0000 (21:05 +0100)] 
microblaze: Show u-boot banner

It is nice to see u-boot version.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Extend kernel image size to 20MB
Michal Simek [Mon, 20 Jan 2014 10:29:06 +0000 (11:29 +0100)] 
zynq: Extend kernel image size to 20MB

Extend max kernel image size. Gunzip is checking
this value. If kernel is larger, message below is shown.

Uncompressing Kernel Image ... Error: inflate() returned -5
GUNZIP: uncompress, out-of-mem or overwrite error -
must RESET board to recover

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Update CLK in bdinfo
Michal Simek [Mon, 20 Jan 2014 10:05:37 +0000 (11:05 +0100)] 
zynq: Update CLK in bdinfo

ARM has specific clk entries which should be also setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoMerge tag 'v2014.01' into xilinx/master-next
Michal Simek [Tue, 21 Jan 2014 12:30:43 +0000 (13:30 +0100)] 
Merge tag 'v2014.01' into xilinx/master-next

- Fix Makefiles new style
- Fix qspi driver because of subsystem changes in mainline
- Fix zynq configuration
- Enable new CONFIG_RSA
- Fix board boot selection

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoPrepare v2014.01 v2014.01
Tom Rini [Mon, 20 Jan 2014 22:52:59 +0000 (17:52 -0500)] 
Prepare v2014.01

Signed-off-by: Tom Rini <trini@ti.com>
11 years agofdt_support.c: Correct linux,initrd-start/end setting
Tom Rini [Mon, 20 Jan 2014 22:45:33 +0000 (17:45 -0500)] 
fdt_support.c: Correct linux,initrd-start/end setting

The change to add 64bit initrd support broke 32bit initrd support as it
always set 64bits worth of data into the properties, even on 32bit
systems.  The fix is to use addr_cell_len (which already says how much
data is in 'tmp') to set the property, rather than always setting 8.
Thanks to Stephen Warren for pointing out the fix here.

Reported-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoARM: bcm2835: fix mailbox timeout
Stephen Warren [Tue, 14 Jan 2014 02:50:12 +0000 (19:50 -0700)] 
ARM: bcm2835: fix mailbox timeout

My original intention was to have a 100ms timeout. However, the timer
operations used return values in ms not us, so we ended up with a 100s
timeout instead. Fixing this exposes that some operations need longer
to operate than 100ms, so bump the timeout up to a whole second.

Reported-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agoARM: rpi_b: power on SDHCI and USB HW modules
Stephen Warren [Tue, 14 Jan 2014 02:50:11 +0000 (19:50 -0700)] 
ARM: rpi_b: power on SDHCI and USB HW modules

Send RPC commands to the VideoCore to turn on the SDHCI and USB modules.
For SDHCI this isn't needed in practice, since the firmware already
turned on the power in order to load U-Boot. However, it's best to be
explicit. For USB, this is necessary, since the module isn't powered
otherwise. This will allow the kernel USB driver to work.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agospl: common: Properly ignore spl/Makefile in .gitignore
Dan Murphy [Thu, 16 Jan 2014 17:23:28 +0000 (11:23 -0600)] 
spl: common: Properly ignore spl/Makefile in .gitignore

The spl directory is ignored by git as these objects are created
during spl creation.  The only file not created is the Makefile.

This file can be modified and checked in via git.

Due to the order of rule precedence having the whole directory
ignored first then indicating not to ignore the Makefile is not correct
the message to force adding the Makefile is still shown.

So reorder the .gitignore for the Makefile and indicate that the Makefile
does not need to be ignored first and then indicate everything else in spl
should be ignored after wards.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
11 years ago.gitignore: ignore u-boot.elf and tools/relocate-rela
Masahiro Yamada [Tue, 14 Jan 2014 01:39:34 +0000 (10:39 +0900)] 
.gitignore: ignore u-boot.elf and tools/relocate-rela

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
11 years agoyaffs2: Remove block number check from summary verification
Charles Manning [Mon, 20 Jan 2014 02:51:59 +0000 (15:51 +1300)] 
yaffs2: Remove block number check from summary verification

The summary already has other verification. This one is not needed.

The check caused summaries to be ignored if they were not on the
numbered block. This caused problems when a summary was embedded in an
image and the image is written to a flash with bad blocks.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
11 years agoext4fs: fix "invalid extent block" error
Ionut Nicu [Mon, 13 Jan 2014 11:00:08 +0000 (12:00 +0100)] 
ext4fs: fix "invalid extent block" error

For files where we actually have extent indexes following
an extent header (ext_block->eh_depth != 0), the do/while
loop from ext4fs_get_extent_block() does not select the
proper extent index structure.

For example, if we have:

ext_block->eh_depth = 1
ext_block->eh_entries = 1
fileblock = 0
index[0].ei_block = 0

the do/while loop will exit with i set to 0 and the
ext4fs_get_extent_block() function will return 0, even if
there was a valid extent index structure following the
header.

Signed-off-by: Ionut Nicu <ioan.nicu.ext@nsn.com>
Signed-off-by: Mathias Rulf <mathias.rulf@nsn.com>
11 years agoext4fs: use EXT2_BLOCK_SIZE instead of fs->blksz
Ionut Nicu [Mon, 13 Jan 2014 10:59:24 +0000 (11:59 +0100)] 
ext4fs: use EXT2_BLOCK_SIZE instead of fs->blksz

Using fs->blksz in ext4fs_get_extent_block() is not
correct since fs->blksz is not initialized on the
read path. Use EXT2_BLOCK_SIZE() instead which will
produce the desired output.

Signed-off-by: Ionut Nicu <ioan.nicu.ext@nsn.com>
Signed-off-by: Mathias Rulf <mathias.rulf@nsn.com>
11 years agoboard:universal: fix i2c adapter
Piotr Wilczek [Tue, 14 Jan 2014 07:15:07 +0000 (08:15 +0100)] 
board:universal: fix i2c adapter

Universal uses only one adapter I2C_0.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
11 years agofs/ext4: fix calling put_ext4 with truncated offset
Ma Haijun [Wed, 8 Jan 2014 00:15:33 +0000 (08:15 +0800)] 
fs/ext4: fix calling put_ext4 with truncated offset

Curently, we are using 32 bit multiplication to calculate the offset,
so the result will always be 32 bit.
This can silently cause file system corruption when performing a write
operation on partition larger than 4 GiB.

This patch address the issue by simply promoting the terms to 64 bit,
and let compilers decide how to do the multiplication efficiently.

Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
11 years agofs/ext4: fix partition size get truncated in calculation
Ma Haijun [Tue, 7 Jan 2014 22:49:43 +0000 (06:49 +0800)] 
fs/ext4: fix partition size get truncated in calculation

It may cause file system corruption when do a write operation.
This issue only affects boards that use 32 bit lbaint_t.

Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Mon, 20 Jan 2014 12:51:22 +0000 (07:51 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-i2c

11 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Mon, 20 Jan 2014 12:33:42 +0000 (07:33 -0500)] 
Merge branch 'master' of git://www.denx.de/git/u-boot-imx

11 years agoomap3_beagle: use omap3-beagle.dtb for the C4 revision
Robert Nelson [Fri, 17 Jan 2014 15:51:28 +0000 (09:51 -0600)] 
omap3_beagle: use omap3-beagle.dtb for the C4 revision

findftd is currently setting fdtfile to undefined for the beagle c4, select omap3-beagle.dtb instead

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
11 years agonand, gpmc: fix reading after switching ecc
Jeroen Hofstee [Wed, 15 Jan 2014 16:58:54 +0000 (17:58 +0100)] 
nand, gpmc: fix reading after switching ecc

The omap_gpmc allows switching ecc at runtime. Since
the NAND_SUBPAGE_READ flag is only set, it is kept when
switching to hw ecc, which is not correct. This leads to
calling chip->ecc.read_subpage which is not a valid
pointer. Therefore clear the flag when switching ecc so
reading in hw mode works again.

Cc: Scott Wood <scottwood@freescale.com>
Cc: Pekon Gupta <pekon@ti.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
11 years agocosmetic: uImage.FIT: fix documents
Masahiro Yamada [Thu, 16 Jan 2014 02:05:23 +0000 (11:05 +0900)] 
cosmetic: uImage.FIT: fix documents

- Fix the path to source_file_format.txt
  - Fix a minor typo
  - Fix the type for FIT blob: it must be "flat_dt"

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
11 years agovexpress/armv8: Fix incorrect ethernet controller
Bhupesh Sharma [Thu, 16 Jan 2014 15:47:40 +0000 (09:47 -0600)] 
vexpress/armv8: Fix incorrect ethernet controller

This patch enables ethernet support in ARMv8 foundation model. The ARMv8
foundation model supports a SMSC91C111 integrated MAC and PHY module
which is present at base address 0x01A000000.

The previous implementation had enabled SMSC9115 ethernet controller
which is not present on the ARMv8 foundation model.

Tested on ARMv8 foundation model v1 and v2 by running ping/tftp
between the foundation model and the host PC via a bridged network.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
11 years agoARM: trats2: dfu: Enable default Poll Timeout for Trats2 board
Łukasz Majewski [Tue, 14 Jan 2014 07:02:25 +0000 (08:02 +0100)] 
ARM: trats2: dfu: Enable default Poll Timeout for Trats2 board

Provide default Poll Timeout value for Trats2 board.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoconfig: Update envs for trats and trats2 - Disable L2 cache
Łukasz Majewski [Tue, 14 Jan 2014 07:02:26 +0000 (08:02 +0100)] 
config: Update envs for trats and trats2 - Disable L2 cache

Disable L2 caches for Trats and Trats2 devices.

It turns out that for data downloading with thordown command L2 cache
disablement brings a significant speed improvement.

rootfs - 400 MiB:
- L2 cache enabled: 2.69 MiB/s
- L2 cache disabled:  5.56 MiB/s

Such improvement is possible due to reduction of the need to invalidate
redundant data, which resides in L2 cache.

Since the sent USB request size at once is 512B (L1 - 32 KiB in total) -
one can be quite confident that it is already available in L1 and L2 can
be disabled.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agomx6: Revert "mx6: soc: Disable VDDPU regulator"
Fabio Estevam [Thu, 16 Jan 2014 12:57:29 +0000 (10:57 -0200)] 
mx6: Revert "mx6: soc: Disable VDDPU regulator"

Commit 022298278 (mx6: soc: Disable VDDPU regulator) is causing kernel hang
for people using FSL kernel 3.0.35 and 3.10, so revert it for now.

Reported-by: Otavio Salvador <otavio@ossystems.com.br>
Reported-by: Pierre Aubert <p.aubert@staubli.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoconfig: Update envs for trats and trats2 - new entries for new partitions
Łukasz Majewski [Tue, 14 Jan 2014 07:02:24 +0000 (08:02 +0100)] 
config: Update envs for trats and trats2 - new entries for new partitions

This patch adds extra dfu_alt_info entries to support storing the whole BOOT
, DATA and UMS partitions.
This allows upgrade of uImage and device tree blob (dtb) files at once.

Now it is also possible to store ext4 rootfs prepared with well established
linux tools (like mkfs.ext4).

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Thu, 16 Jan 2014 18:50:16 +0000 (13:50 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-arm

11 years agozynq: Use board_eth_init if CMD_NET is not enabled
Michal Simek [Thu, 16 Jan 2014 08:19:02 +0000 (09:19 +0100)] 
zynq: Use board_eth_init if CMD_NET is not enabled

board_eth_init can be also called in cases where CMD_NET
is not enabled.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: zynq: Move bootmode to headers
Michal Simek [Thu, 16 Jan 2014 08:18:21 +0000 (09:18 +0100)] 
arm: zynq: Move bootmode to headers

These numbers can be reused.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: koelsch: Add support QSPI device and enable boot from SPI flash
Nobuhiro Iwamatsu [Wed, 8 Jan 2014 01:32:24 +0000 (10:32 +0900)] 
arm: koelsch: Add support QSPI device and enable boot from SPI flash

This supports SH-QSPI device on koelsch board, and enable booting from
SPI flash.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
11 years agoarm: lager: Add support QSPI device and enable boot from SPI flash
Nobuhiro Iwamatsu [Wed, 8 Jan 2014 01:32:22 +0000 (10:32 +0900)] 
arm: lager: Add support QSPI device and enable boot from SPI flash

This supports SH-QSPI device on lager board, and enable booting from
SPI flash.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
11 years agospi: sh_qspi: Add header file that defines the address of registers
Nobuhiro Iwamatsu [Wed, 8 Jan 2014 01:16:25 +0000 (10:16 +0900)] 
spi: sh_qspi: Add header file that defines the address of registers

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
11 years agoarm: rmobile: Add SH QSPI base register address
Nobuhiro Iwamatsu [Wed, 8 Jan 2014 01:14:26 +0000 (10:14 +0900)] 
arm: rmobile: Add SH QSPI base register address

This adds base register address of SH QSPI.
Currently, SH QSPI is used only from R8A7790 and R8A7791.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
11 years agoarm: lager: Disable TMU0 before OS boot
Nobuhiro Iwamatsu [Fri, 11 Oct 2013 06:00:37 +0000 (15:00 +0900)] 
arm: lager: Disable TMU0 before OS boot

On U-boot uses TMU0 as timer, but TMU0 does not use on linux kernel
and other.
This disables TMU0 at the request of from kernel user.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
11 years agoarm: koelsch: Disable TMU0 before OS boot
Nobuhiro Iwamatsu [Fri, 11 Oct 2013 05:49:04 +0000 (14:49 +0900)] 
arm: koelsch: Disable TMU0 before OS boot

On U-boot uses TMU0 as timer, but TMU0 does not use on linux kernel
and other.
This disables TMU0 at the request of from kernel user.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
11 years agoMerge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Wed, 15 Jan 2014 14:18:04 +0000 (15:18 +0100)] 
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'

11 years agomx6: Add initial support for the Hummingboard solo
Fabio Estevam [Fri, 3 Jan 2014 17:55:58 +0000 (15:55 -0200)] 
mx6: Add initial support for the Hummingboard solo

SolidRun has designed the Hummingboard board based on mx6q/dl/solo.

Add the initial support for the mx6 solo variant.

More information about this hardware can be found at:
http://imx.solid-run.com/wiki/index.php?title=Carrier-One_Hardware

(Carrier-One was the previous name of Hummingboard).

Based on the work from Jon Nettleton <jon.nettleton@gmail.com>.

Signed-off-by: Jon Nettleton <jon.nettleton@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx6: clock: Pass the frequency as argument of enable_fec_anatop_clock()
Fabio Estevam [Fri, 3 Jan 2014 17:55:57 +0000 (15:55 -0200)] 
mx6: clock: Pass the frequency as argument of enable_fec_anatop_clock()

Provide an argument to enable_fec_anatop_clock() to specify the clock frequency
that will be generated.

No changes are made to mx6slevk, which uses the default 50MHz fec clock.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Tue, 14 Jan 2014 19:48:42 +0000 (14:48 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-arm

11 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Tue, 14 Jan 2014 19:39:53 +0000 (14:39 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-net

11 years agonet: phy: atheros: Fix the masks for AR8031/8035
Fabio Estevam [Fri, 3 Jan 2014 17:55:59 +0000 (15:55 -0200)] 
net: phy: atheros: Fix the masks for AR8031/8035

Use the same masks as used in the kernel:
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/net/phy/at803x.c?id=refs/tags/v3.12.6

With such changes Ethernet is functional on hummingboard solo.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Marek Vasut <marex@denx.de>
Patch: 306640

11 years agommc: dwmmc: mode change to 0644
Minkyu Kang [Tue, 14 Jan 2014 09:00:51 +0000 (18:00 +0900)] 
mmc: dwmmc: mode change to 0644

Don't know why but, file permission was changed

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agocommon, env: optimize boottime
Heiko Schocher [Thu, 19 Dec 2013 12:45:04 +0000 (13:45 +0100)] 
common, env: optimize boottime

when creating the hashtable, for each environmentvariable
getenv(ENV_CALLBACK_VAR) and getenv(ENV_FLAGS_VAR) is called,
which costs at this point a lot of time. So call this two
getenv() calls only once.

Boottime on the ids8313 board without this patch:

2013-12-19 13:38:22,894:  NAND:  128 MiB
2013-12-19 13:38:27,659:  In:    serial
(~4.8 sec)

Bootime with this patch on the ids8313 board:

2013-12-19 13:40:25,332:  NAND:  128 MiB
2013-12-19 13:40:25,546:  In:    serial
(~0.2 sec)

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoboard: nios2: Add CONFIG_CFI_FLASH_MTD guard to flash.h header include
Ezequiel Garcia [Fri, 20 Dec 2013 21:34:53 +0000 (18:34 -0300)] 
board: nios2: Add CONFIG_CFI_FLASH_MTD guard to flash.h header include

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11 years agobootm: Reinstate special case for standalone images
Simon Glass [Thu, 26 Dec 2013 23:26:24 +0000 (16:26 -0700)] 
bootm: Reinstate special case for standalone images

For standalone images, bootm had a special case where the OS boot function
was NULL but did actually exist. It was just called manually.

This was removed by commit 35fc84fa which checks for the non-existence of
this function before the special case is examined.

There is no obvious reason why standalone is handled with a special case.
Adjust the code so that standalone has a normal OS boot function. We still
need a special case for when the function returns, but at least we can
avoid the main problem.

This is intended to fix the reported:

    ERROR: booting os 'U-Boot' (17) is not supported

but needs testing.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agofuelgauge: max17042: fix i2c read issue which causes infinity loop.
Przemyslaw Marczak [Mon, 30 Dec 2013 10:24:32 +0000 (11:24 +0100)] 
fuelgauge: max17042: fix i2c read issue which causes infinity loop.

Issues:
- reading i2c data by passing u16 pointer causes errors in read data.
- max17042 status register fields have not only Power On Reset meaning
  so using proper mask is required.

Changes:
- read i2c data to type u32 instead of u16 - avoids buffer overflow
- compare FG status register using mask not just one bit value
- add checking return value to functions fg read/write
- add model lock and model check count
- add debug msg

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
11 years agocommon/image.c: move VxWorks header string out of CONFIG_CMD_ELF
miao.yan@windriver.com [Fri, 27 Dec 2013 08:01:50 +0000 (16:01 +0800)] 
common/image.c: move VxWorks header string out of CONFIG_CMD_ELF

Otherwise, when booting VxWorks kernel, the incorrect message will
be seen:

    ARM Unknown OS Kernel Image (uncompressed)

Signed-off-by: Miao Yan <miao.yan@windriver.com>
11 years agocommand.c: Fix auto-completion for the full commands list case
Andrew Gabbasov [Fri, 27 Dec 2013 16:05:14 +0000 (10:05 -0600)] 
command.c: Fix auto-completion for the full commands list case

Compiling of full list of commands does not advance the counter,
so it always results in an empty list.
This seems to be (inadvertently?) introduced by commit
6c7c946cadfafdea80eb930e3181085b907a0362.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
11 years agolzma: fix buffer bound check error
Antonios Vamporakis [Tue, 31 Dec 2013 01:57:01 +0000 (02:57 +0100)] 
lzma: fix buffer bound check error

Variable uncompressedSize references the space available, while outSizeFull is
the actual expected uncompressed size. Using the wrong value causes LzmaDecode
to return SZ_ERROR_INPUT_EOF. Problem was introduced in commit afca294. While
at it add additional debug message.

Signed-off-by: Antonios Vamporakis <ant@area128.com>
CC: Kees Cook <keescook@chromium.org>
CC: Simon Glass <sjg@chromium.org>
CC: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
CC: Luka Perkov <luka@openwrt.org>
11 years agospi: zynq_qspi: Fix slave max speed configuration
Ivan Sergeev [Mon, 6 Jan 2014 22:16:42 +0000 (14:16 -0800)] 
spi: zynq_qspi: Fix slave max speed configuration

spi_setup_slave() was ignoring the slave max speed defined by
CONFIG_SF_DEFAULT_SPEED or provided at the command line by the user, and always
configuring the QSPI slave max speed to the QSPI master speed. This fix chooses
the QSPI slave max speed to be the minimum of the provided one (default
configuration or user supplied) and the QSPI master speed.

Signed-off-by: Ivan Sergeev <vsergeev@kumunetworks.com>
Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: use canonical sub mnemonic
Andreas Bießmann [Wed, 27 Nov 2013 15:09:29 +0000 (16:09 +0100)] 
arm: use canonical sub mnemonic

Building some arm boards with older binutils may produce errors like this:

---8<---
crt0.S: Assembler messages:
crt0.S:70: Error: register expected, not '#(184)' -- `sub sp,#(184)'
--->8---

Use canonical version of the subtract mnemonic to avoid those issues.

Reported-by: Alexey Smishlayev <alexey@xtech2.lv>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
11 years agoMerge 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Tue, 14 Jan 2014 10:50:54 +0000 (11:50 +0100)] 
Merge 'u-boot-imx/master' into 'u-boot-arm/master'