Commit Graph

45923 Commits

Author SHA1 Message Date
Adam Ford
bf1ddfc026 arm: dts: omap3: Re-sync DTS files with Linux 4.13-RC5
The DTS files had some spacing issues and they needed fixing. This
pull re-sync's the OMAP3xx related DTS files with Linux 4.13-RC5.

To keep the DTS and DTSI files clean and in sync with Linux, new
u-boot.dtsi files are added.

Signed-off-by: Adam Ford <aford173@gmail.com>

V3: The resync broke card detect on MMC1 on Logic PD's Torpedo,
    so we add the cd-invert to the Torpedo's -u-boot.dtsi file.

V2: Add the u-boot.dtsi files for OMAP3, OMAP36xx, and Torpedo
    Remove the need for the second patch in the series
2017-09-13 09:24:26 -04:00
Adam Ford
74cd48e132 omap3: omap3_logic: Finish enabling fastboot on MUSB
Either the USB and Fastboot were never finished, or somehow it got
lost.  This puts enough hooks back into omap3logic to enable
fastboot and hopefully prepare it for Kconfig conversion.

Signed-off-by: Adam Ford <aford173@gmail.com>
2017-09-13 09:24:25 -04:00
Wenyou Yang
3e9f8f2f51 ARM: dts: ethernut5: Fix the build warning
Fix the building warning as below:
---8<----
Warning (reg_format): "reg" property in /i2c-gpio-0/pcf8563@50 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value for /i2c-gpio-0/pcf8563@50
Warning (avoid_default_addr_size): Relying on default #size-cells value for /i2c-gpio-0/pcf8563@50
--->8----

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-13 09:24:25 -04:00
Keng Soon Cheah
cac73f20ac serial: nulldev: Add nulldev serial driver
Some device the serial console's initialization cannot run early during
the boot process. Hence, nulldev serial device is helpful on that
situation.

For example, if the serial module was implemented in FPGA. Serial
initialization is prohibited to run until the FPGA was programmed.

This commit is to adding nulldev serial driver. This will allows the
default console to be specified as a nulldev.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Keng Soon Cheah <keng.soon.cheah@ni.com>
Cc: Chen Yee Chew <chen.yee.chew@ni.com>
2017-09-13 09:24:24 -04:00
Anatolij Gustschin
2d2531be86 spl: add newline in debug output
With debug enabled, SPL output following these debug prints is on the
same line and it is hard to read. Fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-09-13 08:27:01 -04:00
Vishal Mahaveer
ba39608147 ARM: DRA72x: Add support for detection of DRA71x SR 2.1
DRA71x processors are reduced pin and software compatible
derivative of DRA72 processors. Add support for detection
of SR2.1 version of DRA71x family of processors.

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-09-12 18:02:29 -04:00
Adam Ford
f926837504 davinci: da850-evm: switch to using TI_COMMON_CMD_OPTIONS
Like the OMAP-L138 LCDK before it, let's move the da850-evm and
the variations to TI_COMMON_CMD_OPTIONS to cut back one some of the
defconfig entries.

Signed-off-by: Adam Ford <aford173@gmail.com>
2017-09-12 18:02:25 -04:00
Masahiro Yamada
6c06f8dc4a linux/io.h: import generic ioread* / iowrite* accessors from Linux
Some drivers in Linux (ex. drivers/mtd/nand/denali.c) use
ioread*/iowrite* accessors.  Import them to make drivers more
synced.  I copied code from include/asm-generic/io.h of Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-09-12 18:02:23 -04:00
Masahiro Yamada
b27af39935 dma: import linux/dma-direction.h to consolidate enum dma_data_direction
Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete
duplicated definitions of enum dma_data_direction.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-09-12 18:02:23 -04:00
Adam Ford
29487ef4d5 omap3: am3517_evm: Enable TI_COMMON_CMD_OPTION
Enable TI_COMMON_CMD_OPTIONS and remove similar options
from the defconfig. Updated with savedefconfig.

Signed-off-by: Adam Ford <aford173@gmail.com>
Tested-by: Derald D. Woods <woods.technical@gmail.com>
2017-09-12 18:02:21 -04:00
Adam Ford
261ec8f6a6 ARM: OMAP3: am3517_evm: Move header to ti_omap3_common.h
Much of the AM3517 functions are copies of the standard definitions
used in ti_omap3_common.h.  Moving to include a common file
reduces the amount of duplicative code and clutter.  A few
AM3517 specific functions (like EMIF4) are explictly defined
and a few items are undefined or redefined, but overall the number
of lines of code shink.

Signed-off-by: Adam Ford <aford173@gmail.com>
Tested-by: Derald D. Woods <woods.technical@gmail.com>
2017-09-12 18:01:31 -04:00
Andy Yan
347e30e172 armv8: mmu: add space around operator
Add space around operator "+", make it
match the coding style.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2017-09-12 18:00:09 -04:00
Andy Yan
4f84cb980f armv8: mmu: remove unused macro definition
Macro VA_BITS and PTE_BLOCK_BITS are not used
in the code, so remove them.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2017-09-12 18:00:08 -04:00
Tomas Melin
bac9170fb2 cosmetic: bootcount: correct comment for used scratch register
Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
2017-09-12 17:58:54 -04:00
Wenyou Yang
de6567522e misc: i2c_eeprom: Add compatible for AT24MAC402
Add the new compatible "atmel,24mac402" to accommodate AT24MAC402.
The AT24MAC402 is a 2K Serial EEPROM and the 2-Kbit memory array
is internally organized as 16 pages of 16 bytes of EEPROM each.
The 48-bit EUI address in the AT24MAC402 are located in the extended
memory block.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2017-09-12 17:58:54 -04:00
Wenyou Yang
7264066707 misc: i2c_eeprom: Add compatible for 24AA02E48
Add the new compatible "microchip,24aa02e48" to accommodate 24AA02E48,
the 24AA02E48 is a 2K I2C Serial EEPROM with pre-programmed globally
unique, 48-bit node address, and 8-byte page size.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2017-09-12 17:58:53 -04:00
Andrew F. Davis
82f1205601 configs: k2g_evm: Remove PMMC loading environment commands
The PMMC firmware should be bundled with the FIT image for HS devices,
remove the steps that load and install this firmware outside of FIT.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2017-09-12 17:58:03 -04:00
Andrew F. Davis
58fac52d2f ARM: k2g: Add FIT image handler for PMMC firmware
The PMMC firmware should be bundled into a FIT image on HS
devices to allow authentication/decryption, add a handler to
process this PMMC firmware.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2017-09-12 17:58:02 -04:00
Andrew F. Davis
6442c9643e image: Add TI PMMC image type
Add a new image type representing TI Power Management
Micro-Controller (PMMC) Firmware image type.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2017-09-12 17:58:02 -04:00
Rob Clark
7e3e205607 examples: add fallback memcpy
Solves build issue:

  Building current source for 134 boards (12 threads, 1 job per thread)
         arm:  +   lsxhl
  +examples/api/vsprintf.o: In function `string16':
  +lib/vsprintf.c:278: undefined reference to `memcpy'
  +examples/api/uuid.o: In function `uuid_bin_to_str':
  +lib/uuid.c:197: undefined reference to `memcpy'
  +lib/uuid.c:199: undefined reference to `memcpy'
  +make[3]: *** [examples/api/demo] Error 1
  +make[2]: *** [examples/api] Error 2
  +make[1]: *** [examples] Error 2
  +make: *** [sub-make] Error 2
    133    0    1 /134    sheevaplug

Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-09-12 17:58:01 -04:00
Rob Clark
22ada0c8e6 vsprintf.c: add GUID printing
This works (roughly) the same way as linux's, but we currently always
print lower-case (ie. we just keep %pUB and %pUL for compat with linux),
mostly just because that is what uuid_bin_to_str() supports.

  %pUb:   01020304-0506-0708-090a-0b0c0d0e0f10
  %pUl:   04030201-0605-0807-090a-0b0c0d0e0f10

It will be used by a later efi_loader paths for efi variables and for
device-path-to-text protocol, and also quite useful for debug prints
of protocol GUIDs.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-12 17:58:00 -04:00
Rob Clark
274325c509 vsprintf.c: add UTF-16 string (%ls) support
This is convenient for efi_loader which deals a lot with UTF-16.  Only
enabled with CC_SHORT_WCHAR, leaving room to add a UTF-32 version when
CC_SHORT_WCHAR is not enabled.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-12 17:57:59 -04:00
Rob Clark
78178bb0c9 lib: add some utf16 handling helpers
We'll eventually want these in a few places in efi_loader, and also
vsprintf.

Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-09-12 17:57:59 -04:00
Rob Clark
4a85663ec7 kbuild: Enable -fshort-wchar
EFI_LOADER really wants UTF-16 strings (ie. %ls and L"string" are 16bit
chars instead of 32bit chars).  But rather than enabling -fshort-wchar
conditionally if EFI_LOADER is enabled, it was deemed preferrable to
globally switch.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-09-12 17:57:57 -04:00
Tom Rini
8a33cb8b6b Merge git://git.denx.de/u-boot-fsl-qoriq 2017-09-12 12:02:50 -04:00
Tom Rini
fa6365b7c7 Travis-CI: Update PATH
We now can no longer re-use the provided path and need to give the
full PATH we want used now.

Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-12 11:00:53 -04:00
Tom Rini
de2ad2c40d Merge git://git.denx.de/u-boot-dm 2017-09-12 09:32:51 -04:00
Patrice Chotard
ee87a097b0 dm: test: replace dm_scan_dt() by of dm_extended_scan_fdt() in dm_do_test
This allows to scan the DT including all "clocks" node's sub-nodes
in which fixed-clock are defined.
All fixed-clock should be defined inside a clocks node which collect all
external oscillators. Until now, all clocks sub-nodes can't be binded except
if the "simple-bus" compatible string is added which is a hack.

Update test.dts by moving clk_fixed node inside clocks.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-11 21:43:58 -06:00
Patrice Chotard
e81c98649b dm: core: add clocks node scan
Currently, all fixed-clock declared in "clocks" node in device tree
can be binded by clk_fixed_rate.c driver only if each of them have
the "simple-bus" compatible string.
This constraint has been invoked here [1].

This patch offers a solution to avoid adding "simple-bus" compatible
string to nodes that are not busses.

[1] https://patchwork.ozlabs.org/patch/558837/

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-11 21:43:58 -06:00
Chris Packham
e11aa602ab patman: add support for omitting bouncing addresses
Add support for reading a list of bouncing addresses from a in-tree file
(doc/bounces) and from the ~/.patman config file. These addresses are
stripped from the Cc list.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com <mailto:philipp.tomsich@theobroma-systems.com>>
2017-09-11 21:43:58 -06:00
Simon Glass
c79d18c4b4 moveconfig: Use fd.write() instead of print >>
Adjust this code so that it can work with Python 2 and 3.

Fixes: d73fcb1 (moveconfig: Support building a simple config database)
Reported-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-09-11 21:43:58 -06:00
Simon Glass
3991f42ed2 dm: core: Add ofnode_for_each_subnode()
Add a convenience macro to iterate over subnodes of a node. Make use of
this where appropriate in the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-09-11 21:43:58 -06:00
Simon Glass
8639f69a61 genconfig.py: Print defconfig next to warnings
At present we sometimes see warnings of the form:

/tmp/tmpMA89kB:36: warning: overriding the value of CMD_SPL.
	Old value: "y", new value: "y".

This is not very useful as it does not show whch defconfig file it relates
to. Update the tool to show this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-09-11 21:43:58 -06:00
Simon Glass
ee3e520dad dm: core: Show driver name with 'dm tree'
It is often useful to see which driver was actually selected for each
device. Add a new 'Driver' column to provide this information. Sample
output:

 Class       Probed   Driver     Name
----------------------------------------
 root        [ + ]    root_drive root_driver
 keyboard    [ + ]    i8042_kbd  |-- keyboard
 serial      [ + ]    ns16550_se |-- serial
 rtc         [   ]    rtc_mc1468 |-- rtc
 timer       [ + ]    tsc_timer  |-- tsc-timer
 syscon      [ + ]    ich6_pinct |-- pch_pinctrl
 pci         [ + ]    pci_x86    |-- pci
 northbridge [ + ]    bd82x6x_no |   |-- northbridge@0,0
 video       [ + ]    bd82x6x_vi |   |-- gma@2,0
 vidconsole0 [ + ]    vidconsole |   |   `-- gma@2,0.vidconsole0
...

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2017-09-11 21:43:58 -06:00
Simon Glass
a0f9acb08b dm: core: Drop use of strlcpy()
We can use printf() to limit the string width. Adjust the code to do this
instead of using strlcpy() which is a bit clumbsy.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2017-09-11 21:43:58 -06:00
Bin Meng
226b50bbd8 sandbox: Convert SANDBOX_BITS_PER_LONG to Kconfig
Convert SANDBOX_BITS_PER_LONG to Kconfig and assign it a correct
number depending on which host we are going to build and run.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-11 21:43:58 -06:00
Bin Meng
98cff66027 sandbox: Introduce Kconfig option for 32/64 bit host
It seems most of the time we are building and running sandbox on 64-bit host.
But we do support 32-bit host as well. Introduce Kconfig option for this.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-11 21:43:58 -06:00
Jean-Jacques Hiblot
5fe7702ecc blk: dm: make blk_create_device() take a number of block instead of a size
There is an overflow problem when taking the size instead of the number
of blocks in blk_create_device(). This results in a wrong device size: the
device apparent size is its real size  modulo 4GB.
Using the number of blocks instead of the device size fixes the problem and
is more coherent with the internals of the block layer.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-11 21:43:58 -06:00
Wenyou Yang
d81a1de96e misc: Kconfig: Add SPL_I2C_EEPROM option
This option is an SPL-variant of the I2C_EEPROM option to enable
the driver for generic I2C-attached EEPROMs for SPL.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-11 22:44:30 -04:00
Wenyou Yang
fafa440342 board: sama5d4_xplained: Set mac address from eeprom
Add the code to set the ethernet mac address from eeprom by using
the common code from the common folder.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-11 16:23:08 -04:00
Wenyou Yang
34e2819d31 board: sama5d2_xplained: Replace code to set mac address
Replace the code to set the ethernet mac address with the code from
the common folder.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-11 16:23:07 -04:00
Wenyou Yang
d9b23e26f0 board: atmel: Create board/$(VENDOR)/common folder
Create board/$(VENDOR)/common folder to accommodate the common code
shared by other atmel boards, now put the code to set ethernet mac
address from eeprom, which uses the i2c eeprom driver.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-11 16:23:06 -04:00
Lokesh Vutla
08318317af env: ti: boot: Select dtb name for X15 revC
Select dtb name for am57xx BeagleBoard-X15 revC

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-11 16:23:05 -04:00
Lokesh Vutla
8b2551a4db board: ti: am57xx: Add dt support for BeagleBoard-X15 revC
Add support for selecting proper dtb for
am57xx BeagleBoard X15 revC u-boot from FIT

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-11 16:23:04 -04:00
Steve Kipisz
209742fa88 board: ti: am571x: Add 666MHz support for AM571x IDK
AM571x supports DDR running at 666MHz. Right now it is
clocked at 532MHz which is lower than what is supported.
In order to have maximum performance on AM571-IDK,
switch DDR to 666MHz.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-11 16:22:31 -04:00
Lokesh Vutla
fede942980 board: ti: dra76: Add dt support
Add support for selecting proper dtb for
dra76x u-boot from FIT.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-11 16:22:30 -04:00
Lokesh Vutla
b63b995b16 arm: dts: Add u-boot specific compatibles
Separate out u-boot specific compatibles from dts files.
This will help in syncing dts files in future.
Also these will get deleted eventually once respective drivers
are capable of handling Linux dts files.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-11 16:19:49 -04:00
Lokesh Vutla
4ddaa6ce28 arm: dts: dra7: sync DT with latest Linux
Sync all dra7* specific dts files with the upstream
kernel including changes queued for 4.14

https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git/log/?h=omap-for-v4.14/dt-v3

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-11 16:19:48 -04:00
Lokesh Vutla
911d76c417 env: ti: boot: Select dtb name for dra76
Select dtb name for dra76-evm.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-09-11 16:19:44 -04:00
Lokesh Vutla
cd43b51600 board: ti: dra76-evm: Add support for powering on mmc ldo
ldo4 is used to poweron mmc on dra76-evm. Enable it.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-09-11 16:19:43 -04:00