Commit Graph

24315 Commits

Author SHA1 Message Date
Valentin Longchamp
2846c43e2d kmp204x: add workaround for A-004849
This should prevent the problems that the CCF can deadlock with certain
traffic patterns.

This also fixes the workaround for A-006559 that was not correctly
implemented before.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:55 -07:00
Valentin Longchamp
e20c822d0e kmp204x: update the RCW
Fix the IRQ/GPIO settings: all the muxed GPIO/external IRQs that are
used as internal interrupts are defined as GPIOs to avoid confusion
between the internal/external interrupts.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:55 -07:00
Valentin Longchamp
af47faf650 kmp204x: complete the reset sequence and PRST configuration
This adds the reset support for the following devices that was until
then not implemented:
- BFTIC4
- QSFPs

This also fixes the configuration of the prst behaviour for the other
resets: Only the u-boot and kernel relevant subsystems are taken out of
reset (pcie, ZL30158, and front eth phy).

Most of the prst config move to misc_init_f(), except for the PCIe
related ones that are in pci_init_board and the bftic and ZL30158 ones
that should be done as soon as possible.

Only the behavior of the Hooper reset is changed according to the
documentation as the application is not able to not configure the switch
when it is not reset.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:55 -07:00
Valentin Longchamp
848b31ab0f kmp204x: update the CONFIG_PRAM and CONFIG_KM_RESERVED_PRAM defines
This prevents u-boot from accessing into the reserved memory areas that
we have for /var and the logbooks.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:55 -07:00
Valentin Longchamp
18794944c6 kmp204x: selftest/factory test pin support
This patch defines the post_hotkeys_pressed() function that is used for:
- triggering POST memory regions test
- starting the test application through the checktestboot command in
  a script by setting the active bank to testbank

The post_hotkeys_pressed return the state of the SELFTEST pin.

The patch moves from the complete POST-memory test that is too long in
its SLOW version for our production HW test procedure to the much shorter
POST-memory-regions test.

Finally, the unused #defines for the not so relevant mtest command are
removed.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:55 -07:00
Stefan Bigler
4921a149e1 kmp204x: handle dip-switch for factory settings
Add readout of dip-switch to revert to factory settings.
If one or more dip-switch are set, launch bank 0 that contains the
bootloader to do the required action.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:54 -07:00
Stefan Bigler
a53e65d053 kmp204x: Add support for the unit LEDs
The unit LEDs are managed by the QRIO CPLD. This patch adds support for
accessing these LEDs in the QRIO.

The LEDs then are set to a correct boot state:
- UNIT-LED is red
- BOOT-LED is on.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:54 -07:00
Shengzhou Liu
5122dfae5d powerpc/85xx: add T4080 SoC support
The T4080 SoC is a low-power version of the T4160.
T4080 combines 4 dual-threaded Power Architecture e6500
cores with single cluster and two memory complexes.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
2014-05-13 08:26:54 -07:00
Shengzhou Liu
c665c473b6 powerpc/t208x: enable errata A006261, A006593, A006379
Enable errata A006261, A006593, A006379 for T208x.
Additionally enable CONFIG_CMD_ERRATA for T2080RDB.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
2014-05-13 08:26:54 -07:00
Shaohui Xie
3a7ed5aa23 powerpc/fman/memac: use default MDIO_HOLD value
Current driver uses a Maximum value for MDIO_HOLD when doing 10G MDIO
access, this is due to an errata A-006260 on T4 rev1.0 which is fixed
on rev2.0, so remove the maximum value to use the default value for rev2.0.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
2014-05-13 08:26:54 -07:00
Aneesh Bansal
e47c2a6851 powerpc/mpc85xx: SECURE BOOT- Add secure boot target for T2080RDB
Secure Boot Target is added for T2080RDB

Changes:
For Secure boot, CPC is configured as SRAM and used as house
keeping area which needs to be disabled.
So CONFIG_SYS_CPC_REINIT_F is defined for CONFIG_T2080RDB.

Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
2014-05-13 08:26:54 -07:00
Aneesh Bansal
4067815998 powerpc/mpc85xx: SECURE BOOT- secure boot target for t1040rdb
T1040RDB.h file is removed and a unified file T104xRDB.h is created.
Hence macro CONFIG_T1040 is renamed to CONFIG_T104x.

Signed-off-by: Gaurav Kumar Rana <gaurav.rana@freescale.com>
Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
2014-05-13 08:24:32 -07:00
Chunhe Lan
0b2e13d9cc powerpc/85xx: Add T4240RDB board support
T4240RDB board Specification
----------------------------
Memory subsystem:
   6GB DDR3
   128MB NOR flash
   2GB NAND flash

Ethernet:
   Eight 1G SGMII ports
   Four 10Gbps SFP+ ports

PCIe:
   Two PCIe slots

USB:
   Two USB2.0 Type A ports

SDHC:
   One SD-card port

SATA:
   One SATA port

UART:
   Dual RJ45 ports

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
[York Sun: fix CONFIG_SYS_QE_FMAN_FW_ADDR in T4240RDB.h]
2014-05-13 08:24:32 -07:00
Shaveta Leekha
652e29b4a0 board/b4qds: VID support
The fuse status register provides the values from on-chip
voltage ID efuses programmed at the factory.
These values define the voltage requirements for
the chip. u-boot reads FUSESR and translates the values
into the appropriate commands to set the voltage output
value of an external voltage regulator.

B4860QDS has a PowerOne ZM7300 programmable digital Power
Manager which is programmed as per the value read from
the fuses.

Reference for this code is taken from t4qds VID implementation.

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
2014-05-13 08:20:31 -07:00
Shaveta Leekha
4150f24290 board/freescale/common: ZM7300 driver
Adds Support for PowerOne ZM7300 voltage regulator.
This device is available on some Freescale Boards like B4860QDS
and has to be programmed to adjust the voltage on the board.

The device is accessible via I2C interface.

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
2014-05-13 08:20:31 -07:00
Tom Rini
27b4e4b991 Merge branch 'fpga' of git://www.denx.de/git/u-boot-microblaze 2014-05-13 07:34:08 -04:00
Tom Rini
e7d4a88e69 Merge branch 'master' of git://git.denx.de/u-boot-video 2014-05-13 07:31:00 -04:00
Siva Durga Prasad Paladugu
3108185985 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>
2014-05-13 09:14:05 +02:00
Siva Durga Prasad Paladugu
a0735a34f8 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>
2014-05-13 09:14:04 +02:00
Michal Simek
42a74a08eb fpga: zynq: Remove sparse warnings
Warnings:
drivers/fpga/zynqpl.c:150:32: warning: Using plain integer as NULL pointer
drivers/fpga/zynqpl.c:152:16: warning: Using plain integer as NULL pointer

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13 09:14:04 +02:00
Michal Simek
14cfc4f373 fpga: xilinx: Simplify load/dump/info function handling
Connect FPGA version with appropriate operations
to remove huge switch-cases for every FPGA family.
Tested on Zynq. Spartan2/Spartan3/Virtex2 just compile test.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13 09:13:59 +02:00
Michal Simek
2df9d5c431 fpga: xilinx: Fix the rest of CamelCases
No functional changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13 09:13:49 +02:00
Michal Simek
f8c1be9816 fpga: xilinx: Avoid CamelCase for in Xilinx_desc
No functional changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13 09:12:53 +02:00
Michal Simek
d9071ce0a8 fpga: virtex2: Avoid CamelCase
No functional changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13 09:12:53 +02:00
Michal Simek
2a6e3869f2 fpga: spartan3: Avoid CamelCase
No functional changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13 09:12:52 +02:00
Michal Simek
b625b9aef3 fpga: spartan2: Avoid CamelCase
No functional changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13 09:12:52 +02:00
Akshay Saraswat
9b97b727dc S5P: Exynos: Config: Enable GPIO CMD config
Enabling configs for GPIO CMD, EXYNOS4 family and replacing
exynos_gpio_get with new linear GPIO pin number required
because of the new function asking only 2 arguments (pin
and value) instead of 3 (bank, pin and value).

Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-05-13 15:20:38 +09:00
Akshay Saraswat
f6ae1ca058 S5P: Exynos: Add GPIO pin numbering and rename definitions
This patch includes following changes :
* Adds gpio pin numbering support for EXYNOS SOCs.
  To have consistent 0..n-1 GPIO numbering the banks are divided
  into different parts where ever they have holes in them.

* Rename GPIO definitions from GPIO_... to S5P_GPIO_...
  These changes were done to enable cmd_gpio for EXYNOS and
  cmd_gpio has GPIO_INPUT same as s5p_gpio driver and hence
  getting a error during compilation.

* Adds support for name to gpio conversion in s5p_gpio to enable
  gpio command EXYNOS SoCs. Function has been added to asm/gpio.h
  to decode the input gpio name to gpio number.
  Example: SMDK5420 # gpio set gpa00

Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-05-13 15:20:38 +09:00
Mateusz Zalega
bfbc47cc9f ARM: Samsung: s5p_goni: maintainer update
Because I'm leaving Samsung Electronics, I won't have access to their
developer hardware anymore. Przemyslaw Marczak will take over my
responsibilities.

Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-05-13 14:23:44 +09:00
Akshay Saraswat
e6fe968b82 Exynos5: config: Enable FIT
Adding two configs:
* CONFIG_FIT - Enable FIT image support.
* CONFIG_FIT_BEST_MATCH - Enable fetching correct DTB from
			  FIT image by comparing compatibles.

Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-05-13 09:00:22 +09:00
Michal Simek
69c0d323e3 kbuild: Fix trailing whitespaces
Trivial fix.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-12 16:31:51 -04:00
Ian Campbell
15e82e5309 net/designware: call phy_connect_dev() to properly setup phylib device
This sets up the linkage from the phydev back to the ethernet device. This
symptom of not doing this which I noticed was:
    <NULL> Waiting for PHY auto negotiation to complete....
rather than:
    dwmac.1c50000 Waiting for PHY auto negotiation to complete....

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
2014-05-12 16:31:51 -04:00
Fabio Estevam
1b37fa832a boards.cfg: Keep entries sorted
Run "tools/reformat.py -i -d '-' -s 8 <boards.cfg >boards0.cfg && mv boards0
in order to keep the entries sorted.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-05-12 16:31:51 -04:00
Wu, Josh
dd6d7967df fs/fat: correct FAT16/12 file finding in root dir
When write a file into FAT file system, it will search a match file in
root dir. So the find_directory_entry() will get the first cluster of
root dir content and search the directory item one by one. If the file
is not found, we will call get_fatent_value() to get next cluster of root
dir via lookup the FAT table and continue the search.

The issue is in FAT16/12 system, we cannot get root dir's next clust
from FAT table. The FAT table only be use to find the clust of data
aera in FAT16/12.

In FAT16/12 if the clust is in root dir, the clust number is a negative
number or 0, 1. Since root dir is located in front of the data area.
Data area start clust #2. So the root dir clust number should < 2.

This patch will check above situation before call get_fatenv_value().
If curclust is < 2, include minus number, we just increase one on the
curclust since root dir is in continous cluster.

The patch also add a sanity check for entry in get_fatenv_value().

Signed-off-by: Josh Wu <josh.wu@atmel.com>
2014-05-12 16:31:51 -04:00
Wu, Josh
2e98f70882 fs: fat_write: fix the incorrect last cluster checking
In fat_write.c, the last clust condition check is incorrect:

  if ((curclust >= 0xffffff8) || (curclust >= 0xfff8)) {
  	... ...
  }

For example, in FAT32 if curclust is 0x11000. It is a valid clust.
But on above condition check, it will be think as a last clust.

So the correct last clust check should be:
  in fat32, curclust >= 0xffffff8
  in fat16, curclust >= 0xfff8
  in fat12, curclust >= 0xff8

This patch correct the last clust check.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
2014-05-12 16:31:50 -04:00
Wu, Josh
06118973ed fs/fat: add fat12 cluster check
Signed-off-by: Josh Wu <josh.wu@atmel.com>
2014-05-12 16:31:50 -04:00
Łukasz Majewski
8b454eeeea fs:ext4:write:fix: Reinitialize global variables after updating a file
This bug shows up when file stored on the ext4 file system is updated.

The ext4fs_delete_file() is responsible for deleting file's (e.g. uImage)
data.
However some global data (especially ext4fs_indir2_block), which is used
during file deletion are left unchanged.

The ext4fs_indir2_block pointer stores reference to old ext4 double
indirect allocated blocks. When it is unchanged, after file deletion,
ext4fs_write_file() uses the same pointer (since it is already initialized
- i.e. not NULL) to return number of blocks to write. This trunks larger
file when previous one was smaller.

Lets consider following scenario:

1. Flash target with ext4 formatted boot.img (which has uImage [*] on itself)
2. Developer wants to upload their custom uImage [**]
	- When new uImage [**] is smaller than the [*] - everything works
	correctly - we are able to store the whole smaller file with corrupted
	ext4fs_indir2_block pointer
	- When new uImage [**] is larger than the [*] - theCRC is corrupted,
	since truncation on data stored at eMMC was done.
3. When uImage CRC error appears, then reboot and LTHOR/DFU reflashing causes
	proper setting of ext4fs_indir2_block() and after that uImage[**]
	is successfully stored (correct uImage [*] metadata is stored at an
	eMMC on the first flashing).

Due to above the bug was very difficult to reproduce.
This patch sets default values for all ext4fs_indir* pointers/variables.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2014-05-12 16:31:50 -04:00
Łukasz Majewski
35dd055b94 fs:ext4:cleanup: Remove superfluous code
Code responsible for handling situation when ext4 has block size of 1024B
can be ordered to take less space.

This patch does that for ext4 common and write files.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2014-05-12 16:31:50 -04:00
Steve Rae
ae95fad5af disk: part_efi: add support for the Backup GPT
Check the Backup GPT table if the Primary GPT table is invalid.
Renamed "Secondary GPT" to "Backup GPT" as per:
  UEFI Specification (Version 2.3.1, Errata A)

Signed-off-by: Steve Rae <srae@broadcom.com>
2014-05-12 15:20:05 -04:00
York Sun
fa39ffe5d6 common/board_f: Fix size variable
DRAM size should use 64-bit variable when the size could be more than 4GB.
Caught and verified on P4080DS with 4GB DDR.

Signed-off-by: York Sun <yorksun@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-05-12 15:20:05 -04:00
York Sun
2a1680e30e common/board_f: Initialized global data for generic board
Some platforms (tested on mpc85xx, mpc86xx) use global data before calling
function baord_inti_f(). The data should not be cleared later. Any arch
which uses global data in generic board board_init_f() should define
CONFIG_SYS_GENERIC_GLOBAL_DATA.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Scott Wood <scottwood@freescale.com>
CC: Simon Glass <sjg@chromium.org>
CC: Albert ARIBAUD <albert.u.boot@aribaud.net>
Acked-by: Simon Glass <sjg@chromium.org>
2014-05-12 15:20:05 -04:00
Ralph Siemsen
7e18a1b958 Trivial fix to .gitignore for spl/Makefile
Trivial fix to .gitignore for spl/Makefile

According to the gitignore man page:

"An optional prefix "!" which negates the pattern; any matching file
excluded by a previous pattern will become included again."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So the directory exclude "/spl/*" must come before the exception
for spl/Makefile otherwise it has no effect.

Signed-off-by: Ralph Siemsen <ralphs@netwinder.org>
Tested-by: Masahiro Yamada <yamada.m@jp.panasonic.com> [on git v1.7.9.5 / v1.8.3.2]
2014-05-12 15:20:05 -04:00
Tom Rini
717ccc1d7f cmd_bootm.c: Only say XIP image when load is image_start
We say we have an XIP (in this case, image loaded at desired execution
address) when the image header has been offset in the load.  It's
possible that in some cases executing the header is non-fatal but that's
not true in many other cases.

Signed-off-by: Tom Rini <trini@ti.com>
2014-05-12 15:20:05 -04:00
Marek Vasut
cd834a053b tools: env: Add aes.c placeholder
Add missing aes.c placeholder which includes lib/aes.c . Without this
one, tools/env/ will fail to build.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Alexey Brodkin <abrodkin@synopsys.com>
Tested-by: Heiko Schocher <hs@denx.de>
2014-05-12 15:20:05 -04:00
Masahiro Yamada
e7afb73b50 nand_spl: remove unused linker scripts u-boot-nand.lds
Commit 345b77ba removed some nand_spl boards but
it missed to delete linker scripts.

These linker scripts are not used now.

And one more fix:
amcc/acadia does not support nand_spl anymore, so remove
  #if !defined(CONFIG_NAND_U_BOOT) ... #endif

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2014-05-12 15:20:05 -04:00
Masahiro Yamada
488c47a141 config: remove platform CONFIG_SYS_HZ definition part 4
Some new boards define CONFIG_SYS_HZ again! Remove.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
2014-05-12 15:20:05 -04:00
Masahiro Yamada
6f2ed0e9fa cosmetic: delete misleading comment /* CONFIG_BOARDDIR */
CONFIG_BOARDDIR is not referenced in these linker scripts.
The comment /* CONFIG_BOARDDIR */ is misleading.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-05-12 15:20:05 -04:00
Kristian Otnes
5c50a92bbe hush shell: Avoid string write overflow when entering max cmd length
console_buffer array is defined to be CONFIG_SYS_CBSIZE + 1 long,
whereas the_command array only CONFIG_SYS_CBSIZE long. Subsequent
use of strcpy(the_command, console_buffer) will write final \0
terminating byte outside the_command array when entering a command
of max length.

Signed-off-by: Kristian Otnes <kotnes <at> cisco <dot> com>
2014-05-12 15:20:05 -04:00
Masahiro Yamada
bf69d66423 kbuild: allow null board for spl build
Commit 33a02da0 supported "<none>" for the board field of boards.cfg.
But it missed to modify spl/Makefile.

This commit provides the flexibility so we can use "<none>" board
in SPL too.
2014-05-12 15:20:05 -04:00
Manish Badarkhe
bafd67d3d0 tps6586x: staticize funtions
Make funtions static which are locally used in file.

Signed-off-by: Manish Badarkhe <badarkhe.manish@gmail.com>
2014-05-12 15:19:46 -04:00