Commit Graph

13042 Commits

Author SHA1 Message Date
Vagrant Cascadian 1c5e6b6fbb arm: imx: Switch mx6cuboxi to use config_distro_bootcmd.h.
This allows for more flexible and standardized boot across multiple
platforms.

Remove redundant legacy boot environment.

Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
2015-11-12 17:23:37 +01:00
Vagrant Cascadian acc6bb5693 arm: imx: Switch Wandboard to use config_distro_bootcmd.h.
This allows for more flexible and standardized boot across multiple
platforms.

Remove redundant legacy boot environment.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
2015-11-12 17:22:58 +01:00
Tzu-Jung Lee 73f1b80c77 mx7dsabresd: enable DFU support
On the target board:

  => dfu 0 mmc 0

On the host PC:

  $ dfu-util -l

    Found DFU: [0525:a4a5] devnum=0, cfg=1, intf=0, alt=0, name="image"
    Found DFU: [0525:a4a5] devnum=0, cfg=1, intf=0, alt=1, name="u-boot"
    Found DFU: [0525:a4a5] devnum=0, cfg=1, intf=0, alt=2, name="bootimg"
    Found DFU: [0525:a4a5] devnum=0, cfg=1, intf=0, alt=3, name="rootfs"

  Update with a full SD image

  $ dfu-util -a image -D core-image-minimal-imx7dsabresd.sdcard

  Update u-boot only

  $ dfu-util -a u-boot -D u-boot.imx

Signed-off-by: Tzu-Jung Lee <roylee17@currantlabs.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-11-12 17:14:48 +01:00
Stefano Babic 5f5620ab26 Merge git://git.denx.de/u-boot 2015-11-12 17:13:26 +01:00
Thomas Chou 479accb605 nios2: rename board nios2-generic to 3c120_devboard
Rename board nios2-generic to 3c120_devboard. Since nios2 is
converted to driver model and device tree control of u-boot,
the nios2-generic board directory is removed. We can rename
the board back to a real board name. Now the boards maintained
in u-boot mainline are the same as Linux kernel, namely 3c120
and 10m50.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
2015-11-12 08:26:59 +08:00
Thomas Chou 5c0f9822e7 nios2: add 10m50 devboard support
Add 10m50 devboard support. It is based on the Golden Hardware
Reference Design (GHRD), available at,

http://rocketboards.org/foswiki/view/Documentation/
AlteraMAX1010M50RevCDevelopmentKitLinuxSetup

Though we supported only one nios2-generic board in the past. Now,
with the removal of the nios2-generic board dir, adding new nios2
boards to u-boot is easier than before. It should be helpful to
add those boards supported in Linux mainline. There are only two
such nios2 boards, the 3c120 devboard and 10m50 devboard. The
nios2-generic is actually 3c120, and should restore the name. The
10m50 is this one.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
2015-11-12 08:26:59 +08:00
Thomas Chou de99a17c9a net: zap altera_tse_initialize prototypes
Zap the altera_tse_initialize() prototypes, since it is converted
to driver model.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
2015-11-12 08:26:59 +08:00
Thomas Chou c3c44954ed nios2: nios2-generic: do not allocate rx buf in net.c
Do not allocate rx buf in net.c, because altera_tse allocates
its own rx buf in driver. This can save 6KB memory.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2015-11-12 08:26:58 +08:00
Thomas Chou af54c18d4c nios2: use cfi flash driver model
Use cfi flash driver model.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2015-11-12 08:26:58 +08:00
Thomas Chou d85879938d dm: implement a MTD uclass
Implement a Memory Technology Device (MTD) uclass. It should
include most flash drivers in the future. Though no uclass ops
are defined yet, the MTD ops could be used.

The NAND flash driver is based on MTD. The CFI flash and SPI
flash support MTD, too. It should make sense to convert them
to MTD uclass.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2015-11-12 08:26:58 +08:00
Tom Rini cad0499071 Merge branch 'master' of git://git.denx.de/u-boot-arm 2015-11-10 13:38:08 -05:00
Stephen Warren 5e68ff3949 ARM: tegra: enable CONFIG_SYS_NONCACHED_MEMORY everywhere
Now that we have solved the problems that prevented this feature from
being enabled, enable it everywhere.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2015-11-10 18:04:30 +01:00
Albert ARIBAUD 3562936373 Revive OpenRD targets
Revert commit 7a2c1b13 which dropped OpenRD boards.
Assume maintainership of OpenRD.
Remove OpenRD from scrapyard.
Switch OpenRD to generic board.
Switch to Thumb build.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2015-11-10 15:04:21 +01:00
Albert ARIBAUD 44b0e47ac0 tricorder: switch to CONFIG_SYS_THUMB_BUILD
The tricorder and tricorder_flash boards have grown too big.
Reduce their size by building them with CONFIG_SYS_THUMB_BUILD.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2015-11-10 15:03:59 +01:00
Albert ARIBAUD bf104ffa25 stm32f429-discovery: add CONFIG_SYS_THUMB_BUILD
This target is ARMv7-M therefore can only build for Thumb,
but it did not #define CONFIG_SYS_THUMB_BUILD, so the U-Boot
code did not know it had to build for Thumb(2), not ARM.

This patch is binary-invariant: builds of stm32f429-discovery
with and without this patch were compared and found to differ
only by their U-Boot version strings.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2015-11-10 15:03:34 +01:00
Måns Rullgård 44d0677a90 Replace "extern inline" with "static inline"
A number of headers define functions as "extern inline" which is
causing problems with gcc5.  The reason is that starting with
version 5.1, gcc defaults to the standard C99 semantics for the
inline keyword.

Under the traditional GNU inline semantics, an "extern inline"
function would never create an external definition, the same
as inline *without* extern in C99.  In C99, and "extern inline"
definition is simply an external definition with an inline hint.
In short, the meanings of inline with and without extern are
swapped between GNU and C99.

The upshot is that all these definitions in header files create
an external definition wherever those headers are included,
resulting in multiple definition errors at link time.

Changing all these functions to "static inline" fixes the problem
since this works as desired in all gcc versions.  Although the
semantics are slightly different (a static inline definition may
result in an actual function being emitted), it works as intended
in practice.

This patch also removes extern prototype declarations for the
changed functions where they existed.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2015-11-09 18:19:40 -05:00
Tom Rini 4ca0c3c993 Merge branch 'master' of git://git.denx.de/u-boot-nios 2015-11-06 09:21:33 -05:00
Thomas Chou 540bb5422c nios2: trim CONFIG_SYS_MEMTEST_END
Trim CONFIG_SYS_MEMTEST_END location.

CONFIG_SYS_MONITOR_LEN
  Reserving 256k for U-Boot at: d7fc0000
CONFIG_ENV_SIZE
CONFIG_SYS_MALLOC_LEN
  Reserving 256k for malloc() at: d7f80000
0x10000 for the rest
  Reserving 68 Bytes for Board Info at: d7f7ffbc
  Reserving 208 Bytes for Global Data at: d7f7feec
  Reserving 12000 Bytes for FDT at: d7f7d00c
  Stack

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2015-11-06 12:56:46 +08:00
Thomas Chou 2925e2b9ee nios2: trim CONFIG_SYS_MALLOC_LEN
Trim CONFIG_SYS_MALLOC_LEN size, because CONFIG_ENV_SIZE
is included to total memory allocation in common.h,

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Chin Liang See <clsee@altera.com>
2015-11-06 12:56:46 +08:00
Thomas Chou 65af9f6971 nios2: remove CONFIG_SYS_INIT_SP macro
Remove CONFIG_SYS_INIT_SP macro, as the initial stack is set to
below the u-boot code.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
2015-11-06 09:14:12 +08:00
Thomas Chou 92ae05cfc7 nios2: remove CONFIG_SYS_MALLOC_BASE macro
Remove CONFIG_SYS_MALLOC_BASE macro, as it is not used by
the generic board.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Chin Liang See <clsee@altera.com>
2015-11-06 09:14:12 +08:00
Thomas Chou e07eee3957 nios2: clean up macros that do not need a value in board header
Clean up macros that do not need a value as suggested by
Marek.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
2015-11-06 09:14:11 +08:00
Thomas Chou 744b57b8a6 nios2: use dram bank in board info
Use dram bank in board info, so that it displays correct
memory values in bdinfo command.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
2015-11-06 09:14:11 +08:00
Fabio Estevam c3c016cf75 sf: Add SPI NOR protection mechanism
Many SPI flashes have protection bits (BP2, BP1 and BP0) in the
status register that can protect selected regions of the SPI NOR.

Take these bits into account when performing erase operations,
making sure that the protected areas are skipped.

Tested on a mx6qsabresd:

=> sf probe
SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB
=> sf protect lock  0x3f0000 0x10000
=> sf erase 0x3f0000 0x10000
offset 0x3f0000 is protected and cannot be erased
SF: 65536 bytes @ 0x3f0000 Erased: ERROR
=> sf protect unlock  0x3f0000 0x10000
=> sf erase 0x3f0000 0x10000
SF: 65536 bytes @ 0x3f0000 Erased: OK

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
[re-worked to fit the lock common to dm and non-dm]
Signed-off-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
2015-11-05 16:47:06 -05:00
Fabio Estevam f8fdb81f6c compat: Remove is_power_of_2() definition
Use the is_power_of_2() definition from log2.h to align with the
kernel implementation.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
2015-11-05 16:46:59 -05:00
Fabio Estevam de4d2e9e7c bitops: Add fls_long and __ffs64
Add fls_long and __ffs64 support to align with the kernel bitops
implementation.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-11-05 10:52:34 -05:00
Fabio Estevam 77c8554e4d include: Add generic bitops headers
Use the generic bitops header files from the kernel.

Imported from kernel 4.2.3.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-11-05 10:51:57 -05:00
Fabio Estevam f598e7a99e include: Add log2 header from the kernel
Use the log2 header files from the kernel.

Imported from kernel 4.2.3.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
2015-11-05 10:51:53 -05:00
Tom Rini ed02c532be Merge branch 'master' of git://git.denx.de/u-boot-video 2015-11-05 07:47:21 -05:00
Tom Rini 60b25259a5 Merge git://git.denx.de/u-boot-samsung 2015-11-05 07:46:45 -05:00
Tom Rini 1674942ad7 Merge git://git.denx.de/u-boot-usb 2015-11-05 07:46:37 -05:00
Tom Rini 28824407f3 Merge git://git.denx.de/u-boot-socfpga 2015-11-05 07:46:28 -05:00
Bin Meng 4b6d09449f video: Drop DEV_EXT_VIDEO flag
DEV_EXT_VIDEO does not have any actual meaning, hence drop it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-05 08:24:42 +01:00
Bin Meng 1caf934a05 video: Drop DEV_FLAGS_SYSTEM flag
DEV_FLAGS_SYSTEM does not have any actual meaning, hence drop it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-05 08:22:21 +01:00
Przemyslaw Marczak 58cb44cf66 sandbox: adc: Add missing header file
Commit: sandbox: add ADC driver

adds the driver without its main header file.
It causes build brake for sandbox_defonfig.

This commit adds a missing header:
- include/sandbox-adc.h

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2015-11-05 12:58:04 +09:00
Chin Liang See bfa3e55b44 lib, fdt: Adding fdtdec_get_uint function
Adding fdtdec_get_uint function which is the
unsigned version for fdtdec_get_int

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vikas Manocha <vikas.manocha@st.com>
Cc: Jagannadh Teki <jteki@openedev.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Heiko Schocher <hs@denx.de>
2015-11-05 02:34:14 +01:00
Tom Rini 8168ee38c2 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2015-11-04 18:30:51 -05:00
Andy Fleming 87e29878ca mpc85xx: Add support for the Varisys Cyrus board
This board runs a P5020 or P5040 chip, and utilizes
an EEPROM with similar formatting to the Freescale P5020DS.

Large amounts of this code were developed by
Adrian Cox <adrian at humboldt dot co dot uk>

Signed-off-by: Andy Fleming <afleming@gmail.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-11-04 15:19:34 -08:00
Simon Glass 42800ffa79 arm: zynq: Move serial driver to driver model
Update this driver to use driver model and change all users.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-04 14:49:53 +01:00
Simon Glass fa43f69e03 arm: zynq: Use separate device tree instead of embedded
Production boards should not use CONFIG_OF_EMBED. Fix this for the Zybo
boards.

The image to use now becomes u-boot-dtb.bin.

For example, the .bif file should contain a line like:

  [load = 0x04000000,startup=0x04000000]/path/to/u-boot-dtb.bin

instead of:

  [load = 0x04000000,startup=0x04000000]/path/to/u-boot.bin

When device tree is enabled we need to load u-boot-dtb.img. Change the
settings so that SPL does the right thing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-04 14:49:52 +01:00
Simon Glass 1017296247 dm: spl: Support device tree when BSS is in a different section
At present in SPL we place the device tree immediately after BSS. This
avoids needing to copy it out of the way before BSS can be used. However on
some boards BSS is not placed with the image - e.g. it can be in RAM if
available.

Add an option to tell U-Boot that the device tree should be placed at the
end of the image binary (_image_binary_end) instead of at the end of BSS.

Note: A common reason to place BSS in RAM is to support the FAT filesystem.
We should update the code so that it does not use so much BSS.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-04 14:49:52 +01:00
Simon Glass 3bc37a50e0 fdt: Add a function to look up a /chosen property
It is sometimes useful to find a property in the chosen node. Add a function
for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-04 14:49:51 +01:00
Siva Durga Prasad Paladugu 1c3f2c7270 zynq-common: Define CONFIG_SYS_I2C_ZYNQ based on board config
Enable CONFIG_SYS_I2C_ZYNQ only if it has either I2C0 or I2C1
enabled in a board config.This fixes the issue of i2c error
during board init if board specific doesnt have either I2C0
or I2C1.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-04 14:49:51 +01:00
Vignesh R 5486d067a8 ARM: dra7xx_evm: Add DFU support for qspi flash
This adds support to update firmware on qspi flash using DFU.

On device:
=> setenv dfu_alt_info ${dfu_alt_info_qspi}
=> dfu 0 sf 0:0

On host:
$ sudo dfu-util -l
$ sudo dfu-util -D MLO -a MLO
$ sudo dfu-util -D u-boot.img -a u-boot.img

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-11-03 17:29:33 +01:00
Daniel Gorsulowski 83bf005710 arm: at91: reworked meesc board support
Signed-off-by: Daniel Gorsulowski <daniel.gorsulowski@esd.eu>
2015-11-03 14:21:32 +01:00
Codrin Ciubotariu 94af6842df T104xD4RDB: Fix PHY address for PHY connected to FM1@DTSEC3
On T1040D4RDB board, u-boot fails to connect port FM1@DTSEC3 to
the Ethernet PHY because the wrong PHY address is used. Also,
T1040D4RDB supports SGMII on one port only.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-11-02 08:51:10 -08:00
Yangbo Lu 12486f3841 powerpc/t1040qds: enable peripheral clock for eSDHC
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-11-02 08:50:15 -08:00
Yangbo Lu fa1e035e5c powerpc/t1040qds: enable adapter card type identification support
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-11-02 08:50:03 -08:00
Przemyslaw Marczak c48cb7ebfb sandbox: add ADC unit tests
This commit adds unit tests for ADC uclass's methods using sandbox ADC.

Testing proper ADC binding:
- dm_test_adc_bind()                    - device binding
- dm_test_adc_wrong_channel_selection() - checking wrong channel selection

Testing ADC supply operations:
- dm_test_adc_supply():
  - Vdd/Vss values validating
  - Vdd regulator updated value validating
  - Vdd regulator's auto enable state validating

Testing ADC operations results:
- dm_test_adc_single_channel_conversion() - single channel start/data
- dm_test_adc_single_channel_shot()       - single channel shot
- dm_test_adc_multi_channel_conversion()  - multi channel start/data
- dm_test_adc_multi_channel_shot()        - multi channel single shot

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2015-11-02 10:38:00 +09:00
Przemyslaw Marczak 1611c8cbcf exynos5-dt-types: add board detection for Odroid XU3/XU3L/XU4.
This commit adds additional file with implementation of board
detection code for Odroid-XU3/XU4.

The detection depends on compatible found in fdt:
- "samsung,exynos5" - uses Exynos5 generic code
- "samsung,odroidxu3" - try detect XU3 revision

There are few revisions of Odroid XU3/XU4, each can be detected
by checking the value of channel 9 of built-in ADC:
 Rev   ADC  Board
 0.1     0  XU3 0.1
 0.2   372  XU3 0.2 | XU3L - no DISPLAYPORT
 0.3  1280  XU4 0.1

The detection code depends on the ADC+10% value.

Implementation of functions:
- set_board_type()     - read ADC and set type
- get_board_rev()      - returns board revision: 1..3
- get_board_type()     - returns board type string

Additional functions with return values of bool:
- board_is_generic()   - true if found compatible "samsung,exynos5"
                         but not "samsung,odroidxu3"
- board_is_odroidxu3() - true if found compatible "samsung,odroidxu3"
                         and one of XU3 revision.
- board_is_odroidxu4() - true if found compatible "samsung,odroidxu3"
                         and XU4 revision.

After I2C controller init, the get_board_type() can check
if the XU3 board is a "Lite" variant, by probing chip
0x40 on I2C0 (INA231 - exists only on non-lite).
This is useful for setting fdt file name at misc_init_r().

Enabled configs:
- CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
- CONFIG_ODROID_REV_AIN
- CONFIG_REVISION_TAG
- CONFIG_BOARD_TYPES

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2015-11-02 10:38:00 +09:00