project/bcm63xx/u-boot.git
8 years agoarm: am33xx: Kconfig: Add secure device definitions
Madan Srinivas [Fri, 20 May 2016 00:10:42 +0000 (19:10 -0500)]
arm: am33xx: Kconfig: Add secure device definitions

Adds a new Kconfig file for AM33xx class devices. We
need a common place to define CONFIG parameters
for these SOCs, especially for adding support
for secure devices.

a) Adds a definition for ISW_ENTRY_ADDR. This is the
address to which the ROM branches when the SOC
ROM hands off execution to the boot loader.
CONFIG_SYS_TEXT_BASE and CONFIG_SPL_TEXT_BASE are set
to this value for AM43xx devices.

b) Adds CONFIG_PUB_ROM_DATA_SIZE which is used to
calculate CONFIG_SPL_MAX_SIZE. This value indicates the
amount of memory needed by the ROM to store data during
the boot process.

Currently, these CONFIG options are used only by AM43xx,
but in future other AM33xx class SOCs will also use them.

Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Daniel Allred <d-allred@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Tested-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodoc: Add info on using secure devices from TI
Daniel Allred [Fri, 20 May 2016 00:10:41 +0000 (19:10 -0500)]
doc: Add info on using secure devices from TI

Adds doc/README.ti-secure file to explain in generic terms
how boot images need to be created for secure devices from
Texas Instruments.

Specific details for creating secure boot images for the
AM43xx, DRA7xx and AM57xx secure devices from Texas
Instruments are also provided in the README file.

Secure devices require a security development package (SECDEV)
package that can be downloaded from:

http://www.ti.com/mysecuresoftware

Login is required and access is granted under appropriate NDA
and export control restrictions.

Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Daniel Allred <d-allred@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoDelete tests of CONFIG_OF_LIBFDT when testing CONFIG_OF_BOARD_SETUP
Robert P. J. Day [Thu, 19 May 2016 19:23:12 +0000 (15:23 -0400)]
Delete tests of CONFIG_OF_LIBFDT when testing CONFIG_OF_BOARD_SETUP

Since CONFIG_OF_BOARD_SETUP depends on CONFIG_OF_LIBFDT:

  config OF_BOARD_SETUP
          bool "Set up board-specific details in device tree before boot"
          depends on OF_LIBFDT
          ...

remove superfluous tests of CONFIG_OF_LIBFDT when testing for
CONFIG_OF_BOARD_SETUP.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
[trini: Typo fix: s/ifdefi/ifdef/]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agotest/py: Support setting up specific timeout
Michal Simek [Thu, 19 May 2016 05:57:41 +0000 (07:57 +0200)]
test/py: Support setting up specific timeout

Large file transfers, flash erasing and more complicated tests
requires more time to finish. Provide a way to setup specific
timeout directly in test.

For example description for 50s test:
timeout = 50000
with u_boot_console.temporary_timeout(timeout):
  u_boot_console.run_command(...)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
8 years agoefi_loader: gop: Don't expose fb address
Alexander Graf [Wed, 18 May 2016 00:04:24 +0000 (02:04 +0200)]
efi_loader: gop: Don't expose fb address

Recently Linux is gaining support for efifb on AArch64 and that support actually
tries to make use of the frame buffer address we expose to it via gop.

While this wouldn't be bad in theory, in practice it means a few bad things

  1) We expose 16bit frame buffers as 32bit today
  2) Linux can't deal with overlapping non-PCI regions between efifb and
     a different frame buffer driver

For now, let's just disable exposure of the frame buffer address. Most OSs that
get booted will have a native driver for the GPU anyway.

Signed-off-by: Alexander Graf <agraf@suse.de>
[trini: Remove line_len entirely]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoefi_loader: Clean up system table on exit
Alexander Graf [Tue, 17 May 2016 22:54:47 +0000 (00:54 +0200)]
efi_loader: Clean up system table on exit

We put the system table into our runtime services data section so that
payloads may still access it after exit_boot_services. However, most fields
in it are quite useless once we're in that state, so let's just patch them
out.

With this patch we don't get spurious warnings when running EFI binaries
anymore.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agotools/env: no global variable sharing between application and library
Andreas Fenkart [Tue, 5 Apr 2016 21:13:42 +0000 (23:13 +0200)]
tools/env: no global variable sharing between application and library

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agoMARVELL: Delete now-superfluous board/Marvell/{common, include} dirs.
Robert P. J. Day [Sun, 15 May 2016 16:12:07 +0000 (12:12 -0400)]
MARVELL: Delete now-superfluous board/Marvell/{common, include} dirs.

With dropping support for some boards and the deletion of some source
files, it appears that both of these directories are now superfluous.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agoDrop HAVE_GENERIC_BOARD and SYS_GENERIC_BOARD options
Simon Glass [Sun, 15 May 2016 00:49:37 +0000 (18:49 -0600)]
Drop HAVE_GENERIC_BOARD and SYS_GENERIC_BOARD options

These are no longer used. The migration is complete. Drop these options.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Angelo Dureghello <angelo@sysam.it>
Acked-by: Andreas Bießmann <andreas@biessmann.org>
8 years agoDrop references to CONFIG_SYS_GENERIC_BOARD in config files
Simon Glass [Sun, 15 May 2016 00:49:36 +0000 (18:49 -0600)]
Drop references to CONFIG_SYS_GENERIC_BOARD in config files

This option is no longer used so need not be enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoDrop use of CONFIG_SYS_GENERIC_BOARD in U-Boot
Simon Glass [Sun, 15 May 2016 00:49:35 +0000 (18:49 -0600)]
Drop use of CONFIG_SYS_GENERIC_BOARD in U-Boot

This option is always enabled and is about to be removed. Drop references
to it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
8 years agopowerpc: Drop unused code related to generic board
Simon Glass [Sun, 15 May 2016 00:49:34 +0000 (18:49 -0600)]
powerpc: Drop unused code related to generic board

Since generic board init is enabled, this is not used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomips: Drop unused code in u-boot.h
Simon Glass [Sun, 15 May 2016 00:49:33 +0000 (18:49 -0600)]
mips: Drop unused code in u-boot.h

Since generic board init is enabled, this is not used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agom68k: Drop unused code in u-boot.h
Simon Glass [Sun, 15 May 2016 00:49:32 +0000 (18:49 -0600)]
m68k: Drop unused code in u-boot.h

Since generic board init is enabled, this is not used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Angelo Dureghello <angelo@sysam.it>
8 years agoavr32: Drop unused code in u-boot.h
Simon Glass [Sun, 15 May 2016 00:49:31 +0000 (18:49 -0600)]
avr32: Drop unused code in u-boot.h

Since generic board init is enabled, this is not used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Andreas Bießmann <andreas@biessmann.org>
8 years agosh: Drop the arch-specific board init
Simon Glass [Sun, 15 May 2016 00:49:30 +0000 (18:49 -0600)]
sh: Drop the arch-specific board init

It is well past the deadline for conversion to generic board init. Remove
the old code.

Please test this and perhaps send a follow-up patch if needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agosh: Fix build errors for generic board
Simon Glass [Sun, 15 May 2016 00:49:29 +0000 (18:49 -0600)]
sh: Fix build errors for generic board

This includes the following fixes:
- Define needed __init_end symbol - see initr_reloc_global_data()
- Drop SH-specific struct bd_info
- Add an empty relocate_code() function

This prevents build errors with generic board, but the code will still need
work. Perhaps this is a better alternative than deleting the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoboard_f: Don't require CONFIG_SYS_MONITOR_BASE
Simon Glass [Sun, 15 May 2016 00:49:28 +0000 (18:49 -0600)]
board_f: Don't require CONFIG_SYS_MONITOR_BASE

Allow this to be unset, such that gd->mon_len is invalid. This seems to be
what the sh architecture does.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoRemove/update old generic-board documentation and warning
Simon Glass [Sun, 15 May 2016 00:49:27 +0000 (18:49 -0600)]
Remove/update old generic-board documentation and warning

Remove the warning from the Makefile, since boards that do not use generic
board will no longer build. Also update documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
8 years agoopenrisc: Drop the arch-specific board init
Simon Glass [Sun, 15 May 2016 00:49:26 +0000 (18:49 -0600)]
openrisc: Drop the arch-specific board init

It is well past the deadline for conversion to generic board init. Remove
the old code.

Stefan, can you test this please and perhaps send a follow-up patch if needed?

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agousb: dwc3: Makefile: Don't build gadget code if USB_GADGET is disabled
Roger Quadros [Fri, 13 May 2016 12:17:52 +0000 (15:17 +0300)]
usb: dwc3: Makefile: Don't build gadget code if USB_GADGET is disabled

It is pointless to build gadget driver if USB_GADGET is disabled.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agonet: Optionally use pxe client arch from variable
Alexander Graf [Thu, 12 May 2016 13:51:45 +0000 (15:51 +0200)]
net: Optionally use pxe client arch from variable

The client architecture that we pass to a dhcp server depends on the target
payload that we want to execute. An EFI binary has a different client arch
than a legacy binary or a u-boot binary.

So let's parameterize the pxe client arch field to allow an override via
the distro script, so that our efi boot path can tell the dhcp server that
it's actually an efi firmware.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: Select bounce buffers for known-bad boards
Alexander Graf [Wed, 11 May 2016 16:25:49 +0000 (18:25 +0200)]
efi_loader: Select bounce buffers for known-bad boards

We know for certain that we have 32bit DMA hardware, but 64bit addresses
on LS2085A and ZynqMP, so let's enable EFI bounce buffers for all defconfigs
on these SoCs.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: Add bounce buffer support
Alexander Graf [Wed, 11 May 2016 16:25:48 +0000 (18:25 +0200)]
efi_loader: Add bounce buffer support

Some hardware that is supported by U-Boot can not handle DMA above 32bits.
For these systems, we need to come up with a way to expose the disk interface
in a safe way.

This patch implements EFI specific bounce buffers. For non-EFI cases, this
apparently was no issue so far, since we can just define our environment
variables conveniently.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agocosmetic: debug: Replace #ifdef DEBUG with debug() macro
Lukasz Majewski [Sun, 8 May 2016 06:52:21 +0000 (08:52 +0200)]
cosmetic: debug: Replace #ifdef DEBUG with debug() macro

Replace #ifdef DEBUG with dedicated debug() macro.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
8 years agoarm: meson: implement calls to secure monitor
Beniamino Galvani [Sun, 8 May 2016 06:30:17 +0000 (08:30 +0200)]
arm: meson: implement calls to secure monitor

Implement calls to secure monitor to read the MAC address from e-fuse.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
8 years agoarm: add initial support for Amlogic Meson and ODROID-C2
Beniamino Galvani [Sun, 8 May 2016 06:30:16 +0000 (08:30 +0200)]
arm: add initial support for Amlogic Meson and ODROID-C2

This adds platform code for the Amlogic Meson GXBaby (S905) SoC and a
board definition for ODROID-C2. This initial submission only supports
UART and Ethernet (through the existing Designware driver). DTS files
are the ones submitted to Linux arm-soc for 4.7 [1].

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

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agonet: designware: fix descriptor layout and warnings on 64-bit archs
Beniamino Galvani [Sun, 8 May 2016 06:30:15 +0000 (08:30 +0200)]
net: designware: fix descriptor layout and warnings on 64-bit archs

All members of the DMA descriptor must be 32-bit, even on 64-bit
architectures: change the type to u32 to ensure this. Also, fix
other warnings.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Use phys_addr_t not unsigned long long to test that we're within
DMA'able memory]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm: implement generic PSCI reset call for armv8
Beniamino Galvani [Sun, 8 May 2016 06:30:14 +0000 (08:30 +0200)]
arm: implement generic PSCI reset call for armv8

Add a psci_system_reset() which calls the SYSTEM_RESET function of
PSCI 0.2 and can be used by boards that support it to implement
reset_cpu().

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodistro: Add efi pxe boot code
Alexander Graf [Fri, 6 May 2016 19:01:07 +0000 (21:01 +0200)]
distro: Add efi pxe boot code

Now that we can expose network functionality to EFI applications,
the logical next step is to load them via pxe to execute them as
well.

This patch adds the necessary bits to the distro script to automatically
load and execute EFI payloads. It identifies the dhcp client as a uEFI
capable PXE client, hoping the server returns a tftp path to a workable
EFI binary that we can then execute.

To enable boards that don't come with a working device tree preloaded,
this patch also adds support to load a device tree from the /dtb directory
on the remote tftp server.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agonet: Move CONFIG_SPL_NET_VCI_STRING into Kconfig
Alexander Graf [Fri, 6 May 2016 19:01:05 +0000 (21:01 +0200)]
net: Move CONFIG_SPL_NET_VCI_STRING into Kconfig

This patch also adds the SPL time VCI string into Kconfig.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agonet: Fix client identifiers for ARM
Alexander Graf [Fri, 6 May 2016 19:01:04 +0000 (21:01 +0200)]
net: Fix client identifiers for ARM

There are client identifiers specifically reserved for ARM U-Boot
according to http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml#processor-architecture.

So let's actually make use of them rather than the bogus 0x100 that
we emitted so far.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
[trini: Drop the Xilinx define to 0x100 as it's not the correct value to
use].
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agonet: Move the VCI and client arch values to Kconfig
Alexander Graf [Fri, 6 May 2016 19:01:03 +0000 (21:01 +0200)]
net: Move the VCI and client arch values to Kconfig

We have a bunch of boards that define their vendor class identifier and
client archs in the board files or in the distro config. Move everything
to the generic Kconfig options.

We're missing the distinction between i386 and x86_64, as I couldn't find
any config variable that would tell us the difference. Is that really important
to people? I guess not, so I left it out.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agobootp: Move vendor class identifier set to function
Alexander Graf [Fri, 6 May 2016 19:01:02 +0000 (21:01 +0200)]
bootp: Move vendor class identifier set to function

Both the dhcp as well as the bootp case add vendor class identifier
parameters into their packets. Let's move that into a separate function
to make overlaying easier.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoefi_loader: Add network access support
Alexander Graf [Fri, 6 May 2016 19:01:01 +0000 (21:01 +0200)]
efi_loader: Add network access support

We can now successfully boot EFI applications from disk, but users
may want to also run them from a PXE setup.

This patch implements rudimentary network support, allowing a payload
to send and receive network packets.

With this patch, I was able to successfully run grub2 with network
access inside of QEMU's -M xlnx-ep108.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agotest/py: fix NameError exception if bdi cmd is not supported
Heiko Schocher [Fri, 6 May 2016 05:33:51 +0000 (07:33 +0200)]
test/py: fix NameError exception if bdi cmd is not supported

test/py raises an error, if a board has not enabled bdi command

>           pytest.skip('bdinfo command not supported')
E           NameError: global name 'pytest' is not defined

import pytest in test/py/u_boot_utils.py fixes this.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
8 years agocmd: replace the cast of the memory access to a fixed bit type in itest
Kunihiko Hayashi [Wed, 4 May 2016 05:20:04 +0000 (14:20 +0900)]
cmd: replace the cast of the memory access to a fixed bit type in itest

This patch fixes a bug that long word(.l) memory access in 'itest'
command reads the 8bytes of the actual memory on 64-bit architecture.
The cast to the memory pointer should use a fixed bit type.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodisk: part_efi: fix check of the max partition size
Patrick Delaunay [Mon, 2 May 2016 12:43:33 +0000 (14:43 +0200)]
disk: part_efi: fix check of the max partition size

the last value acceptable value for offset is last_usable_lba + 1
and not last_usable_lba - 1

issue found with SDCARD partition commands on u-boot 2015.10
but this part of code don't change

1- create GPT partion on all the card
  > gpt write mmc 0 name=test,start=0,size=0
  > part list mmc 0

Partition Map for MMC device 0  --   Partition Type: EFI

Part      Start LBA          End LBA                       Name
            Attributes
            Type GUID
            Partition GUID
  1        0x00000022       0x003a9fde       "test"
            attrs:     0x0000000000000000
            type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
            type:     data
            guid:     b710eb04-45b9-e94a-8d0b-21458d596f54

=> Start = 0x22*512 = 0x4400
=> Size = (0x003a9fde-0x22+1) * 512  = 0x753F7A00

2- try to recreate the same partition with the next command
   (block size:512 bytes = 0x200)

  > gpt write mmc 0 name=test,start=0x4400,size=0x753F7A00
    Writing GPT: Partitions layout exceds disk size

  > gpt write mmc 0 name=test,start=0x4400,size=0x753F7800
    Writing GPT: Partitions layout exceds disk size

  > gpt write mmc 0 name=test,start=0x4400,size=0x753F7600
    Writing GPT: success!

Partition Map for MMC device 0  --   Partition Type: EFI

Part      Start LBA          End LBA                       Name
            Attributes
            Type GUID
            Partition GUID
  1        0x00000022       0x003a9fdc       "test"
            attrs:     0x0000000000000000
            type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
            type:     data
            guid:     36ec30ef-7ca4-cd48-97cd-ea9fb95185d0

the max LBA when the size is indicated (0x003a9fdc) is lower than
when u-boot compute the max allowed value with size=0 (0x003a9fde)

in the code :

     /* partition ending lba */
     if ((i == parts - 1) && (partitions[i].size == 0))
/* extend the last partition to maximuim */
gpt_e[i].ending_lba = gpt_h->last_usable_lba;
     else
gpt_e[i].ending_lba = cpu_to_le64(offset - 1);

so offset = gpt_h->last_usable_lba + 1 is acceptable !
but the test (offset >= last_usable_lba) cause the error

END

Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>disk: part_efi: fix check of the max partition size
the last value acceptable value for offset is (last_usable_lba + 1)
and not (last_usable_lba - 1)

issue found with SDCARD partition commands on u-boot 2015.10
but this part of code don't change

1- I create GPT partion on all the card (start and size undefined)

  > gpt write mmc 0 name=test,start=0,size=0
  > part list mmc 0

Partition Map for MMC device 0  --   Partition Type: EFI

Part      Start LBA          End LBA                       Name
            Attributes
            Type GUID
            Partition GUID
  1        0x00000022       0x003a9fde       "test"
            attrs:     0x0000000000000000
            type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
            type:     data
            guid:     b710eb04-45b9-e94a-8d0b-21458d596f54

=> Start = 0x22*512 = 0x4400
=> Size = (0x003a9fde-0x22+1) * 512  = 0x753F7A00

2- I try to recreate the same partition with the command gpt write
   and with start and size values (block size:512 bytes = 0x200)

  > gpt write mmc 0 name=test,start=0x4400,size=0x753F7A00
    Writing GPT: Partitions layout exceds disk size

  > gpt write mmc 0 name=test,start=0x4400,size=0x753F7800
    Writing GPT: Partitions layout exceds disk size

  > gpt write mmc 0 name=test,start=0x4400,size=0x753F7600
    Writing GPT: success!

  I check the partition created :

  > part list mmc 0

Partition Map for MMC device 0  --   Partition Type: EFI

Part      Start LBA          End LBA                       Name
            Attributes
            Type GUID
            Partition GUID
  1        0x00000022       0x003a9fdc       "test"
            attrs:     0x0000000000000000
            type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
            type:     data
            guid:     36ec30ef-7ca4-cd48-97cd-ea9fb95185d0

=> but the max LBA when the size is indicated (0x003a9fdc) is lower than
   when u-boot compute the max allowed value with size=0 (0x003a9fde)

3- in the code, just after my patch, line 446

     /* partition ending lba */
     if ((i == parts - 1) && (partitions[i].size == 0))
/* extend the last partition to maximuim */
gpt_e[i].ending_lba = gpt_h->last_usable_lba;
     else
gpt_e[i].ending_lba = cpu_to_le64(offset - 1);

  so offset = gpt_h->last_usable_lba + 1 is acceptable !
  (it the value used when size is 0)

  but today the test (offset >= last_usable_lba) cause the error
  my patch only solve this issue

END

Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
8 years agocmd: disk: Fix unused variable warning
Marek Vasut [Sat, 30 Apr 2016 22:35:54 +0000 (00:35 +0200)]
cmd: disk: Fix unused variable warning

If serial support is not compiled into U-Boot, which may be the case
for some SPL builds, the following warning will be generated in disk.c:

cmd/disk.c: In function 'common_diskboot':
cmd/disk.c:16:6: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
  int dev, part;
      ^
The warning is a result of printf() calls being optimized away, and
thus the whole dev variable becomes indeed unused. Mark the variable
as __maybe_unused .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoSPL: FIT: Align loading address for header
Michal Simek [Thu, 28 Apr 2016 08:36:11 +0000 (10:36 +0200)]
SPL: FIT: Align loading address for header

If bl_len is not aligned it can caused a problem because another code
expects that start is aligned.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodm: gpio: pca953x: Support PCA953X with 40 GPIOs
mario.six@gdsys.cc [Mon, 25 Apr 2016 13:25:37 +0000 (15:25 +0200)]
dm: gpio: pca953x: Support PCA953X with 40 GPIOs

A DM driver for PCA953x was recently introduced by Peng Fan, which lacked
support for the 40 GPIO versions.

This patch adds support for these chips.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Peng Fan <van.freenix@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agotools/env: compute size of usable area only once
Andreas Fenkart [Tue, 19 Apr 2016 20:43:42 +0000 (22:43 +0200)]
tools/env: compute size of usable area only once

for double buffering to work, redundant buffers must have equal size

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agotools/env: fw_printenv pass value_only as argument
Andreas Fenkart [Tue, 19 Apr 2016 20:43:41 +0000 (22:43 +0200)]
tools/env: fw_printenv pass value_only as argument

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agotools/env: remove 'extern' from function prototype in fw_env.h
Andreas Fenkart [Tue, 19 Apr 2016 20:43:40 +0000 (22:43 +0200)]
tools/env: remove 'extern' from function prototype in fw_env.h

checkpatch complains about in succeding patch. Prefer to fix all
declarations in a dedicated patch.

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agotools/env: pass key as argument to env_aes_cbc_crypt
Andreas Fenkart [Tue, 19 Apr 2016 20:43:39 +0000 (22:43 +0200)]
tools/env: pass key as argument to env_aes_cbc_crypt

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Thu, 26 May 2016 00:22:48 +0000 (20:22 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

8 years agomips: ath79: ar933x: Avoid warning with gcc5
Wills Wang [Sun, 22 May 2016 03:59:49 +0000 (11:59 +0800)]
mips: ath79: ar933x: Avoid warning with gcc5

GCC 5.3 report a warning: 'upper' and 'lower' may be used
uninitialized in this function [-Wmaybe-uninitialized].
Compiler might need explicit initializer.

Signed-off-by: Wills Wang <wills.wang@live.com>
8 years agomips: ath79: ar933x: Fix ethernet PHY mismatch
Wills Wang [Sun, 22 May 2016 03:59:50 +0000 (11:59 +0800)]
mips: ath79: ar933x: Fix ethernet PHY mismatch

We need reset the Ethernet Switch analog part before operation,
or the build-in Ethernet PHY don't work.

Signed-off-by: Wills Wang <wills.wang@live.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agomips: Drop JZ4740 remnants
Marek Vasut [Wed, 25 May 2016 00:17:07 +0000 (02:17 +0200)]
mips: Drop JZ4740 remnants

Remove the remnants of JZ4740 support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Paul Burton <paul.burton@imgtec.com>
8 years agomips: Allow overriding start.S in SPL
Marek Vasut [Wed, 25 May 2016 00:17:42 +0000 (02:17 +0200)]
mips: Allow overriding start.S in SPL

Certain chips, like the JZ47xx, have extreme size constraints on the
SPL size and require custom start.S . Allow overriding the start.S
the same way ARM MXS does it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Paul Burton <paul.burton@imgtec.com>
8 years agoMIPS: Move CONFIG_SYS_TEXT_BASE to Kconfig
Paul Burton [Tue, 17 May 2016 10:56:39 +0000 (11:56 +0100)]
MIPS: Move CONFIG_SYS_TEXT_BASE to Kconfig

Move CONFIG_SYS_TEXT_BASE to Kconfig, and add default values in board
Kconfig files matching what was present in their config headers. This
will make it cleaner to conditionalise the value for Malta based on 32
vs 64 bit builds.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
8 years agomalta: Use device model & tree for UART
Paul Burton [Tue, 17 May 2016 06:43:28 +0000 (07:43 +0100)]
malta: Use device model & tree for UART

Make use of device model & device tree to probe the UART driver. This is
the initial step in bringing Malta up to date with driver model, and
allows for cleaner handling of the different I/O addresses for different
system controllers by specifying the ISA bus address instead of a
translated memory address.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agomalta: Tidy up UART address selection
Paul Burton [Tue, 17 May 2016 06:43:27 +0000 (07:43 +0100)]
malta: Tidy up UART address selection

The address of the UART differs based upon the system controller because
it's actually within the I/O port region, which is in a different
location for each system controller. Rather than handling this as 2
UARTs with the correct one selected at runtime, use I/O port accessors
for the UART such that access to it gets translated into the I/O port
region automatically.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agodm: ns16550: Don't map_physmem for I/O ports
Paul Burton [Tue, 17 May 2016 06:43:26 +0000 (07:43 +0100)]
dm: ns16550: Don't map_physmem for I/O ports

If the UART is to be accessed using I/O port accessors (inb & outb) then
using map_physmem doesn't make sense, since it operates in a different
memory space. Remove the call to map_physmem when
CONFIG_SYS_NS16550_PORT_MAPPED is defined, allowing I/O port addresses
to not be mangled by the incorrect mapping.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agofdt: Document the rest of struct of_bus
Paul Burton [Tue, 17 May 2016 06:43:25 +0000 (07:43 +0100)]
fdt: Document the rest of struct of_bus

Provide some documentation for the fields of struct of_bus, for
consistency with that provided for the new match field.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agofdt: Support for ISA busses
Paul Burton [Tue, 17 May 2016 06:43:24 +0000 (07:43 +0100)]
fdt: Support for ISA busses

Support ISA busses in much the same way as Linux does. This allows for
ISA bus addresses to be translated, and only if CONFIG_OF_ISA_BUS is
selected in order to avoid including the code in builds which won't need
it.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarm64: fix arm64 Linux boot image header field sizes
Andre Przywara [Wed, 25 May 2016 08:48:14 +0000 (09:48 +0100)]
arm64: fix arm64 Linux boot image header field sizes

The arm64 Linux boot protocol [1] describes the fields in the Image
header as being 64-bit little endian values.
So fix the endianess conversion to use 64-bit sized operations, for
both image_size and text_offset.
Also we use a local variable for the image_size to avoid both writing
to the header and also accessing it after we actually unmapped it.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.txt

8 years agoMerge branch 'master' of http://git.denx.de/u-boot-sunxi
Tom Rini [Wed, 25 May 2016 16:32:56 +0000 (12:32 -0400)]
Merge branch 'master' of git.denx.de/u-boot-sunxi

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Wed, 25 May 2016 16:27:44 +0000 (12:27 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

8 years agosunxi: Olimex A20 boards: Enable LDO3 and LDO4 regulators
Stefan Mavrodiev [Mon, 23 May 2016 06:49:47 +0000 (09:49 +0300)]
sunxi: Olimex A20 boards: Enable LDO3 and LDO4 regulators

Sets LDO3 and LDO4 regulators at 2.8V. In the current config
these are off. This causes kernel to hang during
axp209 initialization.

Signed-off-by: Stefan Mavrodiev <stefan.mavrodiev@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Enable a bunch of commands by default on sunxi
Hans de Goede [Sun, 15 May 2016 11:51:58 +0000 (13:51 +0200)]
sunxi: Enable a bunch of commands by default on sunxi

Recently a set of CONFIG_CMD_FOO defines was moved from being defined
in config_distro_defaults to Kconfig, and added to all sunxi defconfigs
to compensate.

Instead of explictly selecting these in all sunxi defconfigs,
simply always select these for sunxi boards. This makes the defconfigs
simpler and ensures a consistent set of available commands across all
sunxi boards.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agoarm64: Pine64: update FDT files
Andre Przywara [Wed, 4 May 2016 21:15:33 +0000 (22:15 +0100)]
arm64: Pine64: update FDT files

The originally committed .dts files for the Pine64 were from an early
proof-of-concept version and should have never been committed upstream.
Replace them with much more mature versions, which also use a different
naming scheme.
Please note that at this point there is at least one binding which has
not been agreed upon, so this is subject to change.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agoarm64: sunxi: adjust default load addresses
Andre Przywara [Wed, 4 May 2016 21:15:32 +0000 (22:15 +0100)]
arm64: sunxi: adjust default load addresses

As arm64 has slightly different expectations about load addresses, lets
use a different set of default addresses for things like the kernel.
As arm64 kernels don't come with a decompressor right now, reserve some
more space for really big uncompressed kernels.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agoRevert "sunxi: Reserve ATF memory space on A64"
Andre Przywara [Wed, 4 May 2016 21:15:30 +0000 (22:15 +0100)]
Revert "sunxi: Reserve ATF memory space on A64"

The ARM Trusted Firmware (ATF) code now lives in SRAM on the Pine64/A64,
so we can claim the whole of DRAM for OS use.

This reverts commit 3ffe39ed2b66af71c7271d0cef2a248b5bf7dfdb.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Properly announce BOOT_DEVICE_BOARD as "FEL"
Bernhard Nortmann [Sun, 3 Apr 2016 11:58:00 +0000 (13:58 +0200)]
sunxi: Properly announce BOOT_DEVICE_BOARD as "FEL"

This addresses a cosmetic issue when booting a sunxi device
over USB (FEL mode), where the SPL currently would just print
"Trying to boot from ". The patch fixes that to properly read
"Trying to boot from FEL".

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Increase SPL header size to 64 bytes to avoid code corruption
Siarhei Siamashka [Sat, 14 May 2016 01:13:26 +0000 (04:13 +0300)]
sunxi: Increase SPL header size to 64 bytes to avoid code corruption

The current SPL header, created by the 'mksunxiboot' tool, has size
32 bytes. But the code in the boot ROM stores the information about
the boot media at the offset 0x28 before passing control to the SPL.
For example, when booting from the SD card, the magic number written
by the boot ROM is 0. And when booting from the SPI flash, the magic
number is 3. NAND and eMMC probably have their own special magic
numbers too.

Currently the corrupted byte is a part of one of the instructions in
the reset vectors table:

    b     reset
    ldr   pc, _undefined_instruction
    ldr   pc, _software_interrupt      <- Corruption happens here
    ldr   pc, _prefetch_abort
    ldr   pc, _data_abort
    ldr   pc, _not_used
    ldr   pc, _irq
    ldr   pc, _fiq

In practice this does not cause any visible problems, but it's still
better to fix it. As a bonus, the reported boot media type can be
later used in the 'spl_boot_device' function, but this is out of
the scope of this patch.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: power: add AXP809 support
Chen-Yu Tsai [Mon, 2 May 2016 02:28:15 +0000 (10:28 +0800)]
sunxi: power: add AXP809 support

The A80 uses the AXP809 as its primary PMIC.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Implement poweroff support for axp818 pmic
Chen-Yu Tsai [Mon, 2 May 2016 02:28:14 +0000 (10:28 +0800)]
sunxi: Implement poweroff support for axp818 pmic

Adds poweroff support for axp818 pmic.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Enable AXP818 SW for Sinovoip BPI M3
Chen-Yu Tsai [Mon, 2 May 2016 02:28:13 +0000 (10:28 +0800)]
sunxi: Enable AXP818 SW for Sinovoip BPI M3

The SW output of the PMIC supplies the ethernet PHY with power.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: power: axp818: Add support for switch SW
Chen-Yu Tsai [Mon, 2 May 2016 02:28:12 +0000 (10:28 +0800)]
sunxi: power: axp818: Add support for switch SW

The AXP818 has a switchable output, SW. This is commonly used for
controlling power to the LCD backlight.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agopower: axp818: Fix typo for fldo2 Kconfig description
Chen-Yu Tsai [Mon, 2 May 2016 02:28:11 +0000 (10:28 +0800)]
power: axp818: Fix typo for fldo2 Kconfig description

Description said eldo2 instead of fldo2, a copy-paste error.

Fixes: 38491d9c6515 ("power: axp818: Add support for FLDOs")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agopower: axp221: Remove switch case to simplify axp_set_eldo
Chen-Yu Tsai [Mon, 2 May 2016 02:28:10 +0000 (10:28 +0800)]
power: axp221: Remove switch case to simplify axp_set_eldo

The ELDO enable bits and registers are contiguous for axp221. Instead
of a switch case testing against the index, just use the index to shift
the bit or register offset.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Disable VIDEO for SoCs without display support
Chen-Yu Tsai [Mon, 2 May 2016 02:28:09 +0000 (10:28 +0800)]
sunxi: Disable VIDEO for SoCs without display support

The newer chips use a newer display pipeline, which is not supported.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Add default MMC0 card detect pin for A83T, H3 and A64 SoCs
Chen-Yu Tsai [Mon, 2 May 2016 02:28:08 +0000 (10:28 +0800)]
sunxi: Add default MMC0 card detect pin for A83T, H3 and A64 SoCs

A83T, H3, and A64 have a dedicated pin for card detect on the PF
pingroup. This is used in all designs. Set it as the default.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Sort SoC variants by family (sunXi) first, chip name second
Chen-Yu Tsai [Mon, 2 May 2016 02:28:07 +0000 (10:28 +0800)]
sunxi: Sort SoC variants by family (sunXi) first, chip name second

In most other places, we sort SoC descriptions by family (sunXi) first,
then by the chip name (A20).

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: make SoC variant choice mandatory
Chen-Yu Tsai [Mon, 2 May 2016 02:28:06 +0000 (10:28 +0800)]
sunxi: make SoC variant choice mandatory

The user should always select an SoC variant to support. Not choosing
one doesn't make sense for a bootloader.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agoARM: uniphier: add EHCI nodes for PH1-LD11
Masahiro Yamada [Tue, 24 May 2016 12:14:03 +0000 (21:14 +0900)]
ARM: uniphier: add EHCI nodes for PH1-LD11

Make the USB feature really available.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoclk: uniphier: add Media I/O clock driver support for PH1-LD11
Masahiro Yamada [Tue, 24 May 2016 12:14:02 +0000 (21:14 +0900)]
clk: uniphier: add Media I/O clock driver support for PH1-LD11

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add PH1-LD11 SoC support
Masahiro Yamada [Tue, 24 May 2016 12:14:01 +0000 (21:14 +0900)]
ARM: uniphier: add PH1-LD11 SoC support

This is a low-cost ARMv8 SoC from Socionext Inc.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: rename UMC register macros of PH1-LD20
Masahiro Yamada [Tue, 24 May 2016 12:14:00 +0000 (21:14 +0900)]
ARM: uniphier: rename UMC register macros of PH1-LD20

Correct some register names.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: rename umc-ld20-regs.h to umc64-regs.h
Masahiro Yamada [Tue, 24 May 2016 12:13:59 +0000 (21:13 +0900)]
ARM: uniphier: rename umc-ld20-regs.h to umc64-regs.h

This header will be shared between PH1-LD11 and PH1-LD20
(and hopefully new ARMv8 SoCs developed in the future),
so umc64-regs.h would be a better fit.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: clean up boot mode tables
Masahiro Yamada [Tue, 24 May 2016 12:13:58 +0000 (21:13 +0900)]
ARM: uniphier: clean up boot mode tables

Tidy up alignment of open parentheses.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: disable cache in SPL of PH1-LD20
Masahiro Yamada [Tue, 24 May 2016 12:13:57 +0000 (21:13 +0900)]
ARM: uniphier: disable cache in SPL of PH1-LD20

The Boot ROM has enabled D-cache and MMU setting DDR memory area
as Normal Memory in its page table.  Disable D-cache and MMU
before jumping to U-Boot proper.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Wed, 25 May 2016 11:19:31 +0000 (07:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

8 years agopowerpc:t4240: MAC9 and MAC10 should not be identified as 1G interface in some case
Ying Zhang [Mon, 18 Apr 2016 09:04:16 +0000 (17:04 +0800)]
powerpc:t4240: MAC9 and MAC10 should not be identified as 1G interface in some case

When using rcw protocols to support 10G on MAC9 and MAC10, these MACs
should not be identified as 1G interface, otherwise, one MAC will be
listed as two Ethernet ports. For example, MAC9 will be listed as
FM1@TGEC1 and FM1@DTSEC9.

Signed-off-by: Ying Zhang <b40530@freescale.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agopowerpc:t4240rdb: Disable the non-existent ethernet ports on T4240RDB
Ying Zhang [Thu, 21 Apr 2016 06:23:46 +0000 (14:23 +0800)]
powerpc:t4240rdb: Disable the non-existent ethernet ports on T4240RDB

Disable the non-existent ethernet ports on T4240RDB:FM1_DTSEC5,
FM1_DTSEC6, FM2_DTSEC5 and FM2_DTSEC6.

Signed-off-by: Ying Zhang <ying.zhang22455@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Tue, 24 May 2016 17:42:03 +0000 (13:42 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq

8 years agopowerpc/mpc85xx: set L2PE in L2CSR0 before enabling L2 cache
Aneesh Bansal [Mon, 18 Apr 2016 17:28:33 +0000 (22:58 +0530)]
powerpc/mpc85xx: set L2PE in L2CSR0 before enabling L2 cache

While enabling L2 cache, the value of L2PE (L2 cache parity/ECC
error checking enable) must not be changed while the L2 cache is
enabled.
So, L2PE must be set before enabling L2 cache.

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Tue, 24 May 2016 15:59:02 +0000 (11:59 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net

Signed-off-by: Tom Rini <trini@konsulko.com>
Conflicts:
drivers/net/zynq_gem.c

8 years agonet: phy: dp83867: Add SGMII helper for configuration
Dan Murphy [Mon, 2 May 2016 20:46:02 +0000 (15:46 -0500)]
net: phy: dp83867: Add SGMII helper for configuration

The code assumed that if the interface is not RGMII configured
then it must be SGMII configured.  This device has the ability
to support most of the MII interfaces.  Therefore add the
helper for SGMII and only configure the device if the interface is
configured for SGMII.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: phy: Add phy_interface_is_sgmii to phy.h
Dan Murphy [Mon, 2 May 2016 20:46:01 +0000 (15:46 -0500)]
net: phy: Add phy_interface_is_sgmii to phy.h

Add a helper to phy.h to identify whether the
phy is configured for SGMII all variables.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: phy: Move is_rgmii helper to phy.h
Dan Murphy [Mon, 2 May 2016 20:46:00 +0000 (15:46 -0500)]
net: phy: Move is_rgmii helper to phy.h

Move the phy_interface_is_rgmii to the phy.h
file for all phy's to be able to use the API.

This now aligns with the Linux kernel based on
commit e463d88c36d42211aa72ed76d32fb8bf37820ef1

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: phy: ti: Allow the driver to be more configurable
Dan Murphy [Mon, 2 May 2016 20:45:59 +0000 (15:45 -0500)]
net: phy: ti: Allow the driver to be more configurable

Not all devices use the same internal delay or fifo depth.
Add the ability to set the internal delay for rx or tx and the
fifo depth via the devicetree.  If the value is not set in the
devicetree then set the delay to the default.

If devicetree is not used then use the default defines within the
driver.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: phy: dp83867: Add device tree bindings and documentation
Dan Murphy [Mon, 2 May 2016 20:45:58 +0000 (15:45 -0500)]
net: phy: dp83867: Add device tree bindings and documentation

Add the device tree bindings and the accompanying documentation
for the TI DP83867 Giga bit ethernet phy driver.

The original document was from:
    [commit 2a10154abcb75ad0d7b6bfea6210ac743ec60897 from the Linux kernel]

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: zynq_gem: Add the passing of the phy-handle node
Dan Murphy [Mon, 2 May 2016 20:45:57 +0000 (15:45 -0500)]
net: zynq_gem: Add the passing of the phy-handle node

Add the ability to pass the phy-handle node offset
to the phy driver.  This allows the phy driver
to access the DT subnode's data and parse accordingly.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodrivers: net: cpsw: Add reading of DT phy-handle node
Dan Murphy [Mon, 2 May 2016 20:45:56 +0000 (15:45 -0500)]
drivers: net: cpsw: Add reading of DT phy-handle node

Add the ability to read the phy-handle node of the
cpsw slave.  Upon reading this handle the phy-id
can be stored based on the reg node in the DT.

The phy-handle also needs to be stored and passed
to the phy to access any phy data that is available.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodefconfig: dra74_evm: enable eth driver model
Mugunthan V N [Thu, 28 Apr 2016 10:06:13 +0000 (15:36 +0530)]
defconfig: dra74_evm: enable eth driver model

Enable eth driver model for dra74_evm as cpsw supports
driver model.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodefconfig: am437x_sk_evm: enable eth driver model
Mugunthan V N [Thu, 28 Apr 2016 10:06:12 +0000 (15:36 +0530)]
defconfig: am437x_sk_evm: enable eth driver model

Enable eth driver model for am437x_sk_evm as cpsw supports
driver model.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodefconfig: am437x_gp_evm: enable eth driver model
Mugunthan V N [Thu, 28 Apr 2016 10:06:11 +0000 (15:36 +0530)]
defconfig: am437x_gp_evm: enable eth driver model

Enable eth driver model for am437x_gp_evm as cpsw supports
driver model.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agoarm: dts: dra7: fix ethernet name with proper device address
Mugunthan V N [Thu, 28 Apr 2016 10:06:10 +0000 (15:36 +0530)]
arm: dts: dra7: fix ethernet name with proper device address

Fix typo error for cpsw device name with proper device address

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>