Commit Graph

42024 Commits

Author SHA1 Message Date
Phil Edworthy 998640b478 net: phy: Add support for Marvell M88E1512
This device also works with the 88E1518 code, so we just adjust
the UID mask accordingly.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07 10:54:33 -06:00
Phil Edworthy 83cfbeb0df net: phy: Fix mask so that we can identify Marvell 88E1518
The mask for the 88E1510 meant that the 88E1518 code would never be
used.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07 10:54:33 -06:00
Phil Edworthy 8abdeadc5c net: phy: ti: Fix dp83867 RGMII_TXID interface path
There is code that is specifically for RGMII_TXID interface, but this
will never get used because the code checks that the RGMII interface
is RGMII_ID to RGMII_RXID; RGMII_TXID is after this.

To fix this and avoid similar problems in the future, use the
phy_interface_is_rgmii helper function.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07 10:54:33 -06:00
oliver@schinagl.nl c25f01a63a tools: Add tool to add crc8 to a mac address
This patch adds a little tool that takes a generic MAC address and
generates a CRC byte for it. The output is the full MAC address without
any separators, ready written into an EEPROM.

Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07 10:54:33 -06:00
oliver@schinagl.nl 1d3c539239 tools: Allow crc8 to be used
This patch enables crc8 to be used from within the tools directory using
u-boot/crc.h.

Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2017-02-07 10:54:32 -06:00
oliver@schinagl.nl 26d40b0a17 net: core: cosmetic: A MAC address is not limited to SROM
Currently, we print that the MAC from the SROM does not match. It can be
many forms of ROM, so lets drop the S.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07 10:54:32 -06:00
oliver@schinagl.nl 2c07c32994 net: cosmetic: Define ethernet name length
There are various places where the ethernet device name is defined to
several different sizes. Lets add a define and start using it.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07 10:54:32 -06:00
oliver@schinagl.nl 9f455bcb34 net: cosmetic: Make the MAC address string less magical
In u-boot printf has been extended with the %pM formatter to allow
printing of MAC addresses. However buffers that want to store a MAC
address cannot safely get the size. Add a define for this case so the
string of a MAC address can be reliably obtained.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07 10:54:32 -06:00
oliver@schinagl.nl a40db6d511 net: cosmetic: Do not use magic values for ARP_HLEN
Commit 674bb24982 ("net: cosmetic: Replace magic numbers in arp.c with
constants") introduced a nice define to replace the magic value 6 for
the ethernet hardware address. Replace more hardcoded instances of 6
which really reference the ARP_HLEN (iow the MAC/Hardware/Ethernet
address).

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07 10:54:32 -06:00
Wenyou Yang 6d2c1d26ee net: macb: Remove redundant #ifdef CONFIG_DM_ETH
Remove the redundant #ifdef CONFIG_DM_ETH/#endif.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07 10:54:31 -06:00
Wenyou Yang 577aa3b358 net: macb: Add the clock support
Due to introducing the at91 clock driver, add the clock support.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07 10:54:31 -06:00
Wenyou Yang ebcb40a5a0 net: Kconfig: Add CONFIG_MACB option
Add CONFIG_MACB option in KConfig to be used to select the Cadence
MACB Ethernet driver.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
2017-02-07 10:54:31 -06:00
Andy Shevchenko 446d4e048e x86: make LOAD_FROM_32_BIT visible for platforms
This option is useful not only for development, but for the platforms
where U-Boot is run from custom ROM bootloader. For example, Intel
Edison is that board.

Make this option visible that platforms can select it if needed.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:36:50 +08:00
Bin Meng bda40d5634 x86: qemu: Add a config for 64-bit U-Boot
Add a new board config which uses 64-bit U-Boot. Supported features
are the same as the other 64-bit board (Google Chromebook Link).
It is a start for us to test 64-bit U-Boot easily without the need
to access a real hardware.

Note CONFIG_SPL_ENV_SUPPORT is required for QEMU 64-bit as without
this the SPL build fails at the end. This is just a workaround as
CONFIG_SPL_ENV_SUPPORT is not needed at all.

common/built-in.o:(.data.env_htab+0xc): undefined reference to 'env_flags_validate'
lib/built-in.o: In function `hsearch_r':
lib/hashtable.c:380: undefined reference to 'env_callback_init'
lib/hashtable.c:382: undefined reference to 'env_flags_init'
make[1]: *** [spl/u-boot-spl] Error 1

Except those SPL options required by 64-bit, compared to 32-bit
config, the following options are different:

- CONFIG_SYS_MALLOC_F_LEN has to be increased to 0x1000 for SPL.
- CONFIG_DEBUG_UART has to be included due to the weird issue.
  See TODO comments in arch/x86/cpu/x86_64/cpu.c:arch_setup_gd().
  Once this issue gets fixed, debug uart can be optional.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:34:10 +08:00
Bin Meng 73d2de2b59 x86: qemu: Add build options for SPL
If SPL is used we want to use the generic SPL framework and boot
from SPI via a board-specific means. Add these options to the
board config file.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:34:07 +08:00
Bin Meng 8149d114a9 x86: qemu: Add a text base for 64-bit U-Boot
Set up the 64-bit U-Boot text base if building for that target.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:34:05 +08:00
Bin Meng 9d1adf0484 tools: binman: Handle optional microcode case in SPL image
On platforms which do not require microcode in SPL, handle such
case like U-Boot proper.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:27:20 +08:00
Bin Meng cdfc0a055d tools: binman: Call correct init for Entry_u_boot_spl_with_ucode_ptr
u_boot_spl_with_ucode_ptr is derived from u_boot_with_ucode_ptr,
hence it should call its parent's init.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:27:17 +08:00
Bin Meng 399de922ff x86: qemu: Mark ucode as optional for SPL in u-boot.dtsi
QEMU does not need ucode and this is indicated in u-boot.dtsi
for U-Boot proper. Now add the same for SPL.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:27:13 +08:00
Bin Meng 2cffd90f14 x86: qemu: Set up device tree for SPL
Add the correct pre-relocation tag so that the required device tree
nodes are present in the SPL device tree.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:27:11 +08:00
Bin Meng 63767071d9 x86: qemu: Fix compiler warnings for 64-bit
This fixes compiler warnings for QEMU in 64-bit.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:27:08 +08:00
Bin Meng e760feb19f x86: qemu: Hide arch_cpu_init() and print_cpuinfo() for U-Boot proper
arch_cpu_init() and print_cpuinfo() should be only available in SPL
build.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:23:42 +08:00
Bin Meng d8f25c2a5a x86: Compile irq.c for 64-bit
There is no reason not to compile irq.c for 64-bit.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:23:39 +08:00
Bin Meng 8f60ea0039 x86: spl: Add weak arch_cpu_init_dm()
arch_cpu_init_dm() might not be implemented by every platform.
Implement a weak version for SPL.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:23:36 +08:00
Bin Meng 020a5d4f63 x86: Wrap print_ch() with config option
print_ch() should not be used if DEBUG_UART is off.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:23:07 +08:00
Bin Meng 45ffa122f2 x86: qemu: Add missing DECLARE_GLOBAL_DATA_PTR in e820.c
DECLARE_GLOBAL_DATA_PTR is missing which causes 64-bit build error.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-07 13:22:01 +08:00
Simon Glass fda4eb48e6 x86: link: Add a config for 64-bit U-Boot
Add a new board config which uses 64-bit U-Boot. This is not fully
functional but is it a start. Missing features:

- SDRAM sizing
- Booting linux
- EFI support
- SCSI device init
(and others)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:16:27 +08:00
Simon Glass 3a03703afc x86: Update compile/link flags to support 64-bit U-Boot
Update config.mk settings to support both 32-bit and 64-bit U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:14:54 +08:00
Simon Glass c17c422854 x86: link: Add build options for SPL
If SPL is used we want to use the generic SPL framework and boot from SPI
via a board-specific means. Add these options to the board config file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:11:04 +08:00
Simon Glass 6935dc1b7d x86: link: Set up device tree for SPL
Add the correct pre-relocation tag so that the required device tree nodes
are present in the SPL device tree.

On x86 it doesn't make a lot of sense to have a separate SPL device tree.
Since everything is in the same ROM we might as well just use the main
device tree in both SPL and U-Boot proper. But we haven't implemented that,
so this is a good first step.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:10:59 +08:00
Simon Glass 164f0414da x86: link: Add SPL declarations to the binman image
When building for 64-bit we need to put an SPL binary into the image. Update
the binman image description to reflect this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:10:56 +08:00
Simon Glass 19f8b32cea x86: link: Add a text base for 64-bit U-Boot
Set up the 64-bit U-Boot text base if building for that target.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:10:53 +08:00
Simon Glass c780069f1e x86: Add a dummy setjmp implementation for x86_64
We don't have the code for this yet. Add a dummy version for now, so that
EFI builds correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:10:50 +08:00
Simon Glass 4d3ac6c326 x86: Move setjmp to the i386 directory
This code is only used in 32-bit mode. Move it so that it does not get
built with 64-bit U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:07:36 +08:00
Simon Glass 8cfc966c77 x86: Move call64 to the i386 directory
This code is only used in 32-bit mode. Move it so that it does not get
built with 64-bit U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:07:33 +08:00
Simon Glass 337705833c x86: Change irq_already_routed to a local variable
This avoids using BSS before SDRAM is set up in SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:07:30 +08:00
Simon Glass a0c75f9080 x86: Move turbo_state to global_data
To avoid using BSS in SPL before SDRAM is set up, move this field to
global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:07:26 +08:00
Simon Glass 1bff83637f x86: Move pirq_routing_table to global_data
To avoid using BSS in SPL before SDRAM is set up, move this field to
global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-07 13:07:23 +08:00
Simon Glass fa5fcb3bc6 x86: Support jumping from SPL to U-Boot
Add a rough function to handle jumping from 32-bit SPL to 64-bit U-Boot.
This still needs work to clean it up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass c2bf0dfaa3 x86: Drop interrupt support in 64-bit mode
This is not currently supported, so drop the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass ca5114f9af x86: Don't try to boot Linux from SPL
Booting into linux from 64-bit U-Boot is not yet supported. Avoid bringing
in the bootm code until it is implemented.

Of course 32-bit U-Boot still supports booting into both 32- and 64-bit
kernels.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass e1b610b084 x86: Don't build 32-bit efi files on x86_64
These cannot be built in this mode, so drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass fb355619b2 x86: Don't build cpu files which are not supported on 64-bit
Some files cannot be built with 64-bit and mostly don't make sense in that
context. Disable them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass 23b89d4d6e x86: Don't build call64 and setjmp on 64-bit
These are currently not supported. Calling 64-bit code from 64-bit U-Boot is
much simpler, so this code is not needed. setjmp() is not yet implemented for
64-bit.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass 05cbd985c0 x86: Don't try to run the VGA BIOS in 64-bit mode
This is not supported, so disable it for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass 1b4086307e x86: ivybridge: Provide a dummy SDRAM init for 64-bit
We don't support SDRAM init in 64-bit mode since it is essentially
impossible to get into that mode before SDRAM set up. Provide dummy functions
for now. At some point we will need to pass the SDRAM parameters through from
SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass 45cc9e4cc5 x86: ivybridge: Skip SATA init in SPL
This doesn't work at present. Disable it for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass db357236e3 x86: Fix up type sizes for 64-bit
Adjust types as needed to support 64-bit compilation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass 4b57414a62 x86: Drop flag_is_changable() on x86_64
This doesn't build at present and is not used in a 64-bit build. Disable it
for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass 9097805067 x86: Fix up byteorder.h for x86_64
Remove the very old x86 code and add support for 64-bit.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00