]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
9 years agosandbox: Don't try distro_bootcmd by default
Sjoerd Simons [Thu, 30 Apr 2015 20:16:09 +0000 (22:16 +0200)]
sandbox: Don't try distro_bootcmd by default

For the distro_bootcmds to succeed on the sandbox a bit of setup is
required (e.g. network configured or host image bound), so running them
by default isn't that useful.

Add a -b/--boot command to the sandbox binary, which triggers the
distro_bootcmds to run after the other command-line commands.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agousb: ohci: Don't log an error on interrupt packet timeout
Hans de Goede [Tue, 5 May 2015 21:56:14 +0000 (23:56 +0200)]
usb: ohci: Don't log an error on interrupt packet timeout

Interrupts transfers timing out is normal, so do not log an error for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agousb: ohci: Add proper cache flushing / invalidating for non cache coherent cpus
Hans de Goede [Tue, 5 May 2015 21:56:13 +0000 (23:56 +0200)]
usb: ohci: Add proper cache flushing / invalidating for non cache coherent cpus

Add proper cache flushing / invalidating for non cache coherent cpus, for now
only enable this for new (driver-model) usb code to avoid regressions.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agousb: ohci: Fix ctrl in messages with a data-len of 0
Hans de Goede [Tue, 5 May 2015 21:56:12 +0000 (23:56 +0200)]
usb: ohci: Fix ctrl in messages with a data-len of 0

Fix taken from the Linux kernel ohci driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agousb: ohci: Move static func and var declarations from ohci.h to ohci-hcd.c
Hans de Goede [Tue, 5 May 2015 21:56:11 +0000 (23:56 +0200)]
usb: ohci: Move static func and var declarations from ohci.h to ohci-hcd.c

Non static function and variable declarations do not belong in a .h file.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agousb: ohci: Remove unnecessary phcca variable
Hans de Goede [Tue, 5 May 2015 21:56:10 +0000 (23:56 +0200)]
usb: ohci: Remove unnecessary phcca variable

This is a preparation patch for adding driver-model support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agousb: ohci: Move the td array struct to inside the ohci_dev struct
Hans de Goede [Tue, 5 May 2015 21:56:09 +0000 (23:56 +0200)]
usb: ohci: Move the td array struct to inside the ohci_dev struct

This is a preparation patch for adding driver-model support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agousb: ohci: Move the ohci_dev struct to inside the main ohci struct
Hans de Goede [Tue, 5 May 2015 21:56:08 +0000 (23:56 +0200)]
usb: ohci: Move the ohci_dev struct to inside the main ohci struct

This is a preparation patch for adding driver-model support.

Note we do keep ohci_dev as a separate struct so that we can later add
support for interrupt-queues which requires allocating a separate ohci_dev
per interrupt-queue.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agousb: ohci: Pass around a pointer to ohci_t rather then accessing global vars
Hans de Goede [Tue, 5 May 2015 21:56:07 +0000 (23:56 +0200)]
usb: ohci: Pass around a pointer to ohci_t rather then accessing global vars

This is a preparation patch for adding driver-model support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agousb: ohci: Remove unused devgone global variable
Hans de Goede [Tue, 5 May 2015 21:56:06 +0000 (23:56 +0200)]
usb: ohci: Remove unused devgone global variable

devgone is never assigned a value, so the one comparisson reading it will
never be true, and devgone can be completely removed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agousb: Fix maxpacketsize for first descriptor read for low-speed usb devs
Hans de Goede [Tue, 5 May 2015 21:56:04 +0000 (23:56 +0200)]
usb: Fix maxpacketsize for first descriptor read for low-speed usb devs

This fixes descriptor reading of lowspeed devices through ohci not working.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agodm: usb: Set desc_before_addr from ehci dm code
Hans de Goede [Tue, 5 May 2015 09:54:35 +0000 (11:54 +0200)]
dm: usb: Set desc_before_addr from ehci dm code

Without this usb-1 device descriptors do not get read properly.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: usb: Fix finding of first upstream usb-2 hub in the ehci dm code
Hans de Goede [Tue, 5 May 2015 09:54:34 +0000 (11:54 +0200)]
dm: usb: Fix finding of first upstream usb-2 hub in the ehci dm code

The ehci driver model code for finding the first upstream usb-2 hub before
this commit has a number of issues:

1) "if (!ttdev->speed != USB_SPEED_HIGH)" does not work because the '!'
   takes presedence over the '!=' this should simply be
   "if (ttdev->speed == USB_SPEED_HIGH)"
2) It makes ttdev point to the first upstream usb-2 hub, but ttdev should
   point to the last usb-1 device before the first usb-2 hub (when going
   upstream from the device), as ttdev is used to find the port of the
   first usb-2 hub to which the the last usb-1 device is connected.
3) parent_devnum however should be set to the devnum of the first usb-2
   hub, so we need to keep pointers around to both usb_device structs.

To complicate things further during enumeration usb_device.dev will point
to the parent udevice, where as during normal use it will point to
the actual udevice, we must handle both cases correctly.

This commit fixes all this making usb-1 devices attached to usb-2 hubs,
including usb-1 devices attached to usb-1 hubs attached to usb-2 hubs, work.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: usb: Use usb_get_bus in dm ehci code
Hans de Goede [Tue, 5 May 2015 09:54:33 +0000 (11:54 +0200)]
dm: usb: Use usb_get_bus in dm ehci code

Use usb_get_bus in dm ehci code rather then re-implementing it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: usb: Copy over usb_device values from usb_scan_device() to final usb_device
Hans de Goede [Tue, 5 May 2015 09:54:32 +0000 (11:54 +0200)]
dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device

Currently we copy over a number of usb_device values stored in the on stack
struct usb_device probed in usb_scan_device() to the final driver-model managed
struct usb_device in usb_child_pre_probe() through usb_device_platdata, and
then call usb_select_config() to fill in the rest.

There are 3 problems with this approach:

1) It does not fill in enough fields before calling usb_select_config(),
specifically it does not fill in ep0's maxpacketsize causing a div by zero
exception in the ehci driver.

2) It unnecessarily redoes a number of usb requests making usb probing slower

3) Calling usb_select_config() a second time fails on some usb-1 devices
plugged into usb-2 hubs, causing u-boot to not recognize these devices.

This commit fixes these issues by removing (*) the usb_select_config() call
from usb_child_pre_probe(), and instead of copying over things field by field
through usb_device_platdata, store a pointer to the in stack usb_device
(which is still valid when usb_child_pre_probe() gets called) and copy
over the entire struct.

*) Except for devices which are explictly instantiated through device-tree
rather then discovered through usb_scan_device() such as emulated usb devices
in the sandbox.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: usb: Make usb_get_bus easier to use for callers
Hans de Goede [Tue, 5 May 2015 09:54:31 +0000 (11:54 +0200)]
dm: usb: Make usb_get_bus easier to use for callers

Make usb_get_bus easier to use for callers, by directly returning the bus
rather then returning it via a pass-by-ref argument.

This also removes the error checking from the current callers, as
we already have an assert() for bus not being NULL in usb_get_bus().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: usb: Do not use bus->seq before device_probe(bus)
Hans de Goede [Mon, 4 May 2015 19:33:26 +0000 (21:33 +0200)]
dm: usb: Do not use bus->seq before device_probe(bus)

Do not use bus->seq before device_probe(bus), as bus->seq is not set until
after the device_probe() call. This fixes u-boot printing: "USB-1:   " for
each bus it scans.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: i2c-gpio: Remove redundant dm_gpio_set_value() call
Axel Lin [Sun, 26 Apr 2015 03:05:38 +0000 (11:05 +0800)]
dm: i2c-gpio: Remove redundant dm_gpio_set_value() call

dm_gpio_set_dir_flags() will also set gpio output value when switching to
gpio output. So it's not necessary to call dm_gpio_set_value() after
dm_gpio_set_dir_flags() call.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: rtc: Add tests for real-time clocks
Simon Glass [Mon, 20 Apr 2015 18:37:31 +0000 (12:37 -0600)]
dm: rtc: Add tests for real-time clocks

Add some simple tests to verify that the RTC uclass works correctly in
U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: test: dts: Sort the aliases in the test device tree file
Simon Glass [Mon, 20 Apr 2015 18:37:30 +0000 (12:37 -0600)]
dm: test: dts: Sort the aliases in the test device tree file

Sort these aliases to avoid confusion as to what is present.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agodm: rtc: sandbox: Enable real-time clock support
Simon Glass [Mon, 20 Apr 2015 18:37:29 +0000 (12:37 -0600)]
dm: rtc: sandbox: Enable real-time clock support

Enable real-time-clock support in sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: sandbox: dts: Add a real-time clock attached to I2C
Simon Glass [Mon, 20 Apr 2015 18:37:28 +0000 (12:37 -0600)]
dm: sandbox: dts: Add a real-time clock attached to I2C

Add an emulated RTC device for sandbox, so that the 'date' command can be
used.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: net: rtc: Support using driver model for rtc in sntp
Simon Glass [Mon, 20 Apr 2015 18:37:27 +0000 (12:37 -0600)]
dm: net: rtc: Support using driver model for rtc in sntp

When setting the date, support driver model RTC also.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agodm: rtc: Convert 'date' command to support driver model
Simon Glass [Mon, 20 Apr 2015 18:37:26 +0000 (12:37 -0600)]
dm: rtc: Convert 'date' command to support driver model

Adjust this command so that it supports using driver model for I2C, i.e.
CONFIG_DM_I2C. This will permit it to be used in sandbox also.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: rtc: sandbox: Add a driver for the sandbox I2C RTC
Simon Glass [Mon, 20 Apr 2015 18:37:25 +0000 (12:37 -0600)]
dm: rtc: sandbox: Add a driver for the sandbox I2C RTC

Add a driver which communicates with the sandbox I2C emulation RTC device
and permits it to be used in U-Boot. This driver is very simple - it just
reads and writes selected I2C registers in the device.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: rtc: sandbox: Add an emulated I2C RTC device
Simon Glass [Mon, 20 Apr 2015 18:37:24 +0000 (12:37 -0600)]
dm: rtc: sandbox: Add an emulated I2C RTC device

Add a sandbox I2C emulation device which emulates a real-time clock. The
clock works off an offset from the current system time, and supports setting
and getting the clock, as well as access to byte-width regisers in the RTC.
It does not support changing the system time.

This device can be used for testing the 'date' command on sandbox, as well
as the RTC uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: rtc: Add a uclass for real-time clocks
Simon Glass [Mon, 20 Apr 2015 18:37:23 +0000 (12:37 -0600)]
dm: rtc: Add a uclass for real-time clocks

Add a uclass for real-time clocks which support getting the current time,
setting it and resetting the chip to a known-working state. Some RTCs have
additional registers which can be used to store settings, so also provide
an interface to these.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: sandbox: Add os_localtime() to obtain the system time
Simon Glass [Mon, 20 Apr 2015 18:37:22 +0000 (12:37 -0600)]
dm: sandbox: Add os_localtime() to obtain the system time

Add a function to read the system time into U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: rtc: Split structure definition into its own file
Simon Glass [Mon, 20 Apr 2015 18:37:21 +0000 (12:37 -0600)]
dm: rtc: Split structure definition into its own file

Move the definition of struct rtc_time into a separate file so that sandbox
can include it without requiring common.h and the like.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Remove unnecessary types in bcd.h
Simon Glass [Mon, 20 Apr 2015 18:37:20 +0000 (12:37 -0600)]
dm: Remove unnecessary types in bcd.h

We don't need to use u8, and if we avoid it, it isn't so much of a problem
that rtc.h includes this header. With this change we can include rtc.h from
sandbox files.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: rtc: Rename mktime() and reduce the number of parameters
Simon Glass [Mon, 20 Apr 2015 18:37:19 +0000 (12:37 -0600)]
dm: rtc: Rename mktime() and reduce the number of parameters

Most callers unpack the structure and pass each member. It seems better to
pass the whole structure instead, as with the C library. Also add an rtc_
prefix.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agodm: rtc: Rename to_tm() to rtc_to_tm() and add error code
Simon Glass [Mon, 20 Apr 2015 18:37:18 +0000 (12:37 -0600)]
dm: rtc: Rename to_tm() to rtc_to_tm() and add error code

Rename this function so that it is clear that it is provided by the RTC.
Also return an error when it cannot function as expected. This is unlikely
to occur since it works for dates since 1752 and many RTCs do not support
such old dates. Still it is better to be accurate.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agodm: rtc: Rename gregorian day function
Simon Glass [Mon, 20 Apr 2015 18:37:17 +0000 (12:37 -0600)]
dm: rtc: Rename gregorian day function

Change this function name to something more descriptive. Also return a
failure code if it cannot calculate a correct value.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agofdt: Correct warning in fdt_setup_simplefb_node()
Simon Glass [Mon, 20 Apr 2015 18:37:16 +0000 (12:37 -0600)]
fdt: Correct warning in fdt_setup_simplefb_node()

Adjust the printf() string to avoid a warning on sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: i2c: Add an explicit test mode to the sandbox I2C driver
Simon Glass [Mon, 20 Apr 2015 18:37:15 +0000 (12:37 -0600)]
dm: i2c: Add an explicit test mode to the sandbox I2C driver

At present this driver has a few test features. They are needed for running
the driver model unit tests but are confusing and unnecessary if using
sandbox at the command line. Add a flag to enable the test mode, and don't
enable it by default.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: i2c: Add functions to read and write a register
Simon Glass [Mon, 20 Apr 2015 18:37:14 +0000 (12:37 -0600)]
dm: i2c: Add functions to read and write a register

Add driver model versions of the legacy functions to read and write a
single byte register. These are a useful shortcut in many cases.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agodm: i2c: sandbox: Add debugging to the speed limit
Simon Glass [Mon, 20 Apr 2015 18:37:13 +0000 (12:37 -0600)]
dm: i2c: sandbox: Add debugging to the speed limit

Print a debug() message with the I2C speed is exceeded.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agodm: spi: Correct the comment on spi_get_ops()
Simon Glass [Mon, 20 Apr 2015 18:37:12 +0000 (12:37 -0600)]
dm: spi: Correct the comment on spi_get_ops()

This comment should refer to SPI, not serial.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
9 years agocros_ec: Handle the single duplex requirement in cros_ec
Simon Glass [Tue, 17 Feb 2015 22:29:37 +0000 (15:29 -0700)]
cros_ec: Handle the single duplex requirement in cros_ec

With several chips using the SPI protocol it seems better to put the single
duplex functionality in the EC rather than the SPI driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agocros_ec: Show the protocol version in the debug message
Simon Glass [Tue, 17 Feb 2015 22:29:36 +0000 (15:29 -0700)]
cros_ec: Show the protocol version in the debug message

When starting up, show the protocol version that has been negotiated with
the EC.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: spi: Avoid setting the speed with every transfer
Simon Glass [Tue, 17 Feb 2015 22:29:35 +0000 (15:29 -0700)]
dm: spi: Avoid setting the speed with every transfer

Only set the speed if it has changed from last time. Since the speed will
be 0 when the device is probed it will always be changed on the first
transfer after the device is probed.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agotest: dm: eth: Skip timeouts on ping tests
Joe Hershberger [Tue, 21 Apr 2015 18:57:20 +0000 (13:57 -0500)]
test: dm: eth: Skip timeouts on ping tests

Indicate to the emulated sandbox Ethernet driver when we expect a
timeout and tell it to leap forward.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agosandbox: eth: Add a function to skip ping timeouts
Joe Hershberger [Tue, 21 Apr 2015 18:57:19 +0000 (13:57 -0500)]
sandbox: eth: Add a function to skip ping timeouts

When called, the next call to receive will trigger a 10-second leap
forward in time to avoid waiting for time to pass when tests are
evaluating timeout behavior.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agosandbox: Add test function to advance time
Joe Hershberger [Tue, 21 Apr 2015 18:57:18 +0000 (13:57 -0500)]
sandbox: Add test function to advance time

Add a function that maintains an offset to include in the system timer
values returned from the lib/time.c APIs.

This will allow timeouts to be skipped instantly in tests

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoPrepare v2015.07-rc1
Tom Rini [Tue, 5 May 2015 23:52:15 +0000 (19:52 -0400)]
Prepare v2015.07-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agofw_env.h: include autoconf.h
Max Krummenacher [Tue, 14 Apr 2015 19:50:47 +0000 (21:50 +0200)]
fw_env.h: include autoconf.h

Without this, when CONFIG_ENV_VARS_UBOOT_CONFIG is active we get
a compile time error when doing 'make env'.
In file included from tools/env/fw_env.c:117:0:
include/env_default.h:110:11: error: expected â€˜}’ before â€˜CONFIG_SYS_ARCH’

When building U-Boot this is included indirectly by the compiler switch
-include
/home/trdx/git.toradex.com/u-boot-2014.10-toradex/include/linux/kconfig.h

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
9 years agoMerge git://git.denx.de/u-boot-mpc85xx
Tom Rini [Tue, 5 May 2015 18:57:23 +0000 (14:57 -0400)]
Merge git://git.denx.de/u-boot-mpc85xx

9 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Tue, 5 May 2015 14:32:08 +0000 (10:32 -0400)]
Merge git://git.denx.de/u-boot-marvell

9 years agoarm: mvebu: Remove "u-boot.kwb" CONFIG_BUILD_TARGET for non-SPL targets
Stefan Roese [Mon, 4 May 2015 15:31:34 +0000 (17:31 +0200)]
arm: mvebu: Remove "u-boot.kwb" CONFIG_BUILD_TARGET for non-SPL targets

By removing this default build target, the "u-boot.kwb" target is not
automatically generated. This fixes a temporary build error when using
out-of-tree builds, as buildman does per default (reported by Simon).

When the full SPL support is added for these targets with the DDR training
code, the "u-boot-spl.kwb" image will be generated automatically.

Users providing a special bin_hdr binary (binary.0) file can always add
this binary file and generate the full firmware image by issuing the
"make u-boot.kwb" command directly.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: db-mv784mp-gp: Fix ECC I2C address
Stefan Roese [Wed, 22 Apr 2015 16:36:39 +0000 (18:36 +0200)]
arm: mvebu: db-mv784mp-gp: Fix ECC I2C address

The macro to select the I2C address for ECC bus-width detection
was defined incorrectly for the Marvell DB-MV784MP-GP board. This
patch changes the macro to the correct value to fix this issue.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: mvebu: Add Armada A38x DB-88F6820-GP board support
Stefan Roese [Sat, 25 Apr 2015 04:29:56 +0000 (06:29 +0200)]
arm: mvebu: Add Armada A38x DB-88F6820-GP board support

This patch adds support for the Marvell DB-88F6820-GP Armada A38x
evaluation board.

Supported peripherals are:
- UART
- Ethernet (mvneta)
- I2C
- SPI (including SPI NOR flash)

Please note that this board support right now only supports the
main U-Boot. Without the bin_hdr integration (DDR training etc). This
will be added in a few days / weeks to complete this board port. But
till then this U-Boot version can be run on the target via the
original Marvell U-Boot via this command:

tftpboot 4000000 db-88f6820-gp/u-boot.bin;go 4000000

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoarm: mvebu: Add d-cache invalidate before enabling the d-cache
Stefan Roese [Sat, 25 Apr 2015 04:29:55 +0000 (06:29 +0200)]
arm: mvebu: Add d-cache invalidate before enabling the d-cache

This solves some RX problems that have been seen, when using the
mvneta ethernet driver. The cache needs to be reset into a "clean"
state before using it.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoarm: mvebu: mv-common.h: Add CONFIG_PREBOOT
Stefan Roese [Sat, 25 Apr 2015 04:29:54 +0000 (06:29 +0200)]
arm: mvebu: mv-common.h: Add CONFIG_PREBOOT

This enables the usage of the "preboot" environment variable on Marvell
boards.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoarm: mvebu: Remove coherency configuration
Stefan Roese [Sat, 25 Apr 2015 04:29:53 +0000 (06:29 +0200)]
arm: mvebu: Remove coherency configuration

We are not using the coherency feature in U-Boot at all. So lets remove
this configuration from the mbus driver.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoarm: mvebu: Change network init code to allow a more flexible setup
Stefan Roese [Sat, 25 Apr 2015 04:29:52 +0000 (06:29 +0200)]
arm: mvebu: Change network init code to allow a more flexible setup

With the introduction of the Armada 38x support, its necessary to change
the mvneta ethernet driver init call from always 4 times to a
configurable value. Lets make this init call more flexible by moving
the actually used devices to the config header.

Additionally this patch takes care of the slightly different base
addresses for the ethernet controllers on A38x.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agoarm: mvebu: Add basic Armada 38x support
Stefan Roese [Sat, 25 Apr 2015 04:29:51 +0000 (06:29 +0200)]
arm: mvebu: Add basic Armada 38x support

This patch adds support for the Marvell Armada 38x SoC family.

Supported peripherals are:
- UART
- Ethernet (mvneta)
- I2C
- SPI (including SPI NOR flash)

Tested on Marvell DB-88F6820-GP evaluation board.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoarm: mvebu: Move CONFIG_SPL_LDSCRIPT to common header
Stefan Roese [Sat, 25 Apr 2015 04:29:50 +0000 (06:29 +0200)]
arm: mvebu: Move CONFIG_SPL_LDSCRIPT to common header

This way, new MVEBU boards don't need to specifiy the common location
for the SPL linker script.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoarm: mvebu: Only define MV88F78X60 for Armada XP
Stefan Roese [Sat, 25 Apr 2015 04:29:49 +0000 (06:29 +0200)]
arm: mvebu: Only define MV88F78X60 for Armada XP

This define is used by the DDR training code for Armada XP. With the
upcoming addition of Armada 38x support, lets only define it for
Armada XP in this common header.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoarm: mvebu: Remove unreferenced define
Stefan Roese [Sat, 25 Apr 2015 04:29:48 +0000 (06:29 +0200)]
arm: mvebu: Remove unreferenced define

MAX_MVNETA_DEVS is not used anywhere in U-Boot. So lets remove it.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoarm: mvebu: Change header macros from ARMADA_XP to MVEBU
Stefan Roese [Sat, 25 Apr 2015 04:29:47 +0000 (06:29 +0200)]
arm: mvebu: Change header macros from ARMADA_XP to MVEBU

Since these files will be used for other MVEBU SoC's, lets reflect this
in the headers marcos as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoarm: mvebu: Move mvebu-common into mach-mvebu
Stefan Roese [Sat, 25 Apr 2015 04:29:46 +0000 (06:29 +0200)]
arm: mvebu: Move mvebu-common into mach-mvebu

Now that the mach-mvebu directory exists and is used by Armada XP we can
move the mvebu-common files into this directory as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoarm: armada-xp: Move SoC headers to mach-mvebu/include/mach
Stefan Roese [Sat, 25 Apr 2015 04:29:45 +0000 (06:29 +0200)]
arm: armada-xp: Move SoC headers to mach-mvebu/include/mach

Move arch/arm/include/asm/arch-armada-xp/*
     -> arch/arm/mach-mvebu/include/mach/*

Additionally the SYS_SOC is renamed from "armada-xp" to "mvebu". With this
change all these files can better be shared with other, newer Mavell
MVEBU SoC's. Like the upcoming Armada 38x support.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoarm: armada-xp: Move SoC sources to mach-mvebu
Stefan Roese [Sat, 25 Apr 2015 04:29:44 +0000 (06:29 +0200)]
arm: armada-xp: Move SoC sources to mach-mvebu

Move arch/arm/cpu/armv7armada-xp/* -> arch/arm/mach-mvebu/*

Since this platform will be extended to support other Marvell SoC's as
well, lets rename it directly to mvebu.

This will be used by the upcoming Armada 38x suport (A38x).

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mmc
Tom Rini [Tue, 5 May 2015 11:00:38 +0000 (07:00 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mmc

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Tue, 5 May 2015 11:00:11 +0000 (07:00 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoARM: mmc: bcm283x: Remove get_timer_us() from mmc driver
Marek Vasut [Mon, 4 May 2015 20:54:36 +0000 (22:54 +0200)]
ARM: mmc: bcm283x: Remove get_timer_us() from mmc driver

The get_timer_us() function is something which is no longer
existing in case we use generic timer framework, so replace
it with get_timer().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tyler Baker <tyler.baker@linaro.org>
9 years agotegra: mmc: Set the removable flag correctly
Simon Glass [Mon, 4 May 2015 17:31:16 +0000 (11:31 -0600)]
tegra: mmc: Set the removable flag correctly

If the mmc device is non-removable (as indicated by the device tree), set
the flag so that users of the device know.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agommc: bcm2835_sdhci: Use calloc to allocate bcm2835_sdhci_host
Alexander Stein [Fri, 17 Apr 2015 15:33:17 +0000 (17:33 +0200)]
mmc: bcm2835_sdhci: Use calloc to allocate bcm2835_sdhci_host

We need to clear the allocated memory explicitly as the included
struct sdhci_host has function pointers. Those are compared to NULL to
test if this (optional) feature is supported. Leaving them undefined let
u-boot jump to arbitrary memory.

Signed-off-by: Alexander Stein <alexanders83@web.de>
9 years agommc: fsl_esdhc: update eMMC44 adapter card erase timeout
Yangbo Lu [Wed, 15 Apr 2015 02:13:12 +0000 (10:13 +0800)]
mmc: fsl_esdhc: update eMMC44 adapter card erase timeout

Freescale eMMC44 adapter card uses Micron N2M400FDB311A3CF eMMC
memory. According to the silicon datasheet, secure erase timeout
is 600ms. So increase erase timeout value from 250ms to 600ms.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Cc: York Sun <yorksun@freescale.com>
9 years agommc: sdhci: add timeout setting for response busy command
Kevin Liu [Mon, 23 Mar 2015 22:57:00 +0000 (17:57 -0500)]
mmc: sdhci: add timeout setting for response busy command

Timeout interrupt also work for response busy command(R1b) like
cmd38/cmd6. So need to set it accordingly. Current code only
set timeout for data command.

Signed-off-by: Kevin Liu <kliu5@marvell.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
9 years agommc: remove the MMC_MODE_HC flag
Rob Herring [Mon, 23 Mar 2015 22:56:59 +0000 (17:56 -0500)]
mmc: remove the MMC_MODE_HC flag

High capacity support is not a host capability, but a device capability
that is queried via the OCR. The flag in the operating conditions
request argument can just be set unconditionally. This matches the Linux
implementation.

[panto] Hand merged and renumbering MMC_MODE_DDR_52MHz.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
9 years agommc: Fix splitting device initialization
Andrew Gabbasov [Thu, 19 Mar 2015 12:44:07 +0000 (07:44 -0500)]
mmc: Fix splitting device initialization

Starting part of device initialization sets the init_in_progress flag
only if the MMC card did not yet come to ready state and needs to continue
polling. If the card is SD or if the MMC card became ready quickly,
the flag is not set and (if using pre-initialization) the starting
phase will be re-executed from mmc_init function.

Set the init_in_progress flag in all non-error cases. Also, move flags
setting statements around so that the flags are not set in error paths.
Also, IN_PROGRESS return status becomes unnecessary, so get rid of it.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
9 years agommc: Restructure polling loops to avoid extra delays
Andrew Gabbasov [Thu, 19 Mar 2015 12:44:06 +0000 (07:44 -0500)]
mmc: Restructure polling loops to avoid extra delays

The polling loops in sd_send_op_cond and mmc_complete_op_cond functions
check the ready flag state at the end of the loop, that is after executing
a delay inside the loop, which, in case of exiting with no error,
is not needed. Also, one of these loops, as well as the loop
in mmc_send_status, have the delay just before exiting on timeout
conditions.

Restructure all these loops to check the respective conditions before making
a delay for the next loop pass, and to appropriately exit without the delay.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
9 years agommc: Continue polling MMC card for OCR only if it is still not ready
Andrew Gabbasov [Thu, 19 Mar 2015 12:44:05 +0000 (07:44 -0500)]
mmc: Continue polling MMC card for OCR only if it is still not ready

Some MMC cards come to ready state quite quickly, so that the respective
flag appears to be set in mmc_send_op_cond already. In this case trying
to continue polling the card with CMD1 in mmc_complete_op_cond is incorrect
and may lead to unpredictable results. So check the flag before polling
and skip it appropriately.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
9 years agommc: Do not pass external mmc_cmd structure to mmc_send_op_cond_iter()
Andrew Gabbasov [Thu, 19 Mar 2015 12:44:04 +0000 (07:44 -0500)]
mmc: Do not pass external mmc_cmd structure to mmc_send_op_cond_iter()

The previous change to use 'ocr' structure field for storing send_op_cond
command response also stopped using command response directly
outside of mmc_send_op_cond_iter(). Now it becomes possible to use
command structure in mmc_send_op_cond_iter() locally, removing a necessity
to pass it as an argument from the caller.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
9 years agommc: Avoid extra duplicate entry in mmc device structure
Andrew Gabbasov [Thu, 19 Mar 2015 12:44:03 +0000 (07:44 -0500)]
mmc: Avoid extra duplicate entry in mmc device structure

The 'op_cond_response' field in mmc structure contains the response
from the last SEND_OP_COND MMC command while making iterational
polling of the card. Later it is copied to 'ocr' field, designed
to contain the OCR register value, which is actually the same
response from the same command. So, these fields have actually
the same data, just in different time periods. It's easier to use
the same 'ocr' field in both cases at once, without temporary using
of the 'op_cond_response' field.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
9 years agommc: Fix typo in MMC type checking macro
Andrew Gabbasov [Thu, 19 Mar 2015 12:44:02 +0000 (07:44 -0500)]
mmc: Fix typo in MMC type checking macro

The version flag constant name used in IS_MMC macro is incorrect/undefined.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
9 years agoMerge branch 'u-boot/master' into 'u-boot-arm/master'
Albert ARIBAUD [Tue, 5 May 2015 08:09:06 +0000 (10:09 +0200)]
Merge branch 'u-boot/master' into 'u-boot-arm/master'

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Mon, 4 May 2015 21:50:20 +0000 (17:50 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

9 years agopowerpc/mpc85xx: Add board support for ucp1020
Oleksandr G Zhadan [Wed, 29 Apr 2015 20:57:39 +0000 (16:57 -0400)]
powerpc/mpc85xx: Add board support for ucp1020

New QorIQ p1020 based board support from Arcturus Networks Inc.
http://www.arcturusnetworks.com/products/ucp1020/

Signed-off-by: Michael Durrant <mdurrant@arcturusnetworks.com>
Signed-off-by: Oleksandr G Zhadan <oleks@arcturusnetworks.com>
[York Sun: remove patman tags from commit message]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/mpc85xx: Fix compiling error for common/cmd_gpio.c
Oleksandr G Zhadan [Tue, 28 Apr 2015 17:59:50 +0000 (13:59 -0400)]
powerpc/mpc85xx: Fix compiling error for common/cmd_gpio.c

To replicate:
1. add to include/configs/p1_p2_rdb_pc.h "#define CONFIG_CMD_GPIO"
2. run `make P1020RDB-PC_defconfig`
3. run CROSS_COMPILE=powerpc-linux- make

and you will get:
common/built-in.o: In function `do_gpio':
u-boot/common/cmd_gpio.c:186: undefined reference to `gpio_request'
u-boot/common/cmd_gpio.c:194: undefined reference to `gpio_direction_input'
u-boot/common/cmd_gpio.c:195: undefined reference to `gpio_get_value'
u-boot/common/cmd_gpio.c:200: undefined reference to `gpio_get_value'
u-boot/common/cmd_gpio.c:203: undefined reference to `gpio_direction_output'
u-boot/common/cmd_gpio.c:209: undefined reference to `gpio_free

Signed-off-by: Michael Durrant <mdurrant@arcturusnetworks.com>
Signed-off-by: Oleksandr G Zhadan <oleks@arcturusnetworks.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t4240qds: Update RCW, defconfig and maintainer
Shaohui Xie [Mon, 27 Apr 2015 07:28:17 +0000 (15:28 +0800)]
powerpc/t4240qds: Update RCW, defconfig and maintainer

1. board/freescale/t4qds/t4_rcw.cfg
1.8GHz support is requested as default frequency, so update the rcw.

2. remove un-used configs
configs/T4160QDS_SPIFLASH_defconfig
configs/T4240QDS_SPIFLASH_defconfig
SPI boot is not available on T4QDS, so the configs should be removed.

3. board/freescale/t4qds/MAINTAINERS
Updated MAINTAINERS accordingly.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
[York Sun: revise subject]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agot2080rdb/rcw: update ddr frequency from 1600MT/s to 1867MT/s
Shengzhou Liu [Wed, 22 Apr 2015 09:54:40 +0000 (17:54 +0800)]
t2080rdb/rcw: update ddr frequency from 1600MT/s to 1867MT/s

T2080RDB RevC uses new SODIMM 1867MT/s instead of previous 1600MT/s.
So update RCW to support new DDR frequency 1867MT/s by default.
Reserve the old 1600MT/s in comment for users in needed.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t2080qds: enable eSDHC peripheral clock support
Yangbo Lu [Wed, 22 Apr 2015 05:57:56 +0000 (13:57 +0800)]
powerpc/t2080qds: enable eSDHC peripheral clock support

Enable eSDHC peripheral clock support. u-boot and linux will
use SD clock generated by peripheral clock instead of platform
clock.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agommc: fsl_esdhc: Add peripheral clock support
Yangbo Lu [Wed, 22 Apr 2015 05:57:40 +0000 (13:57 +0800)]
mmc: fsl_esdhc: Add peripheral clock support

The SD clock could be generated by platform clock or peripheral
clock for some platforms. This patch adds peripheral clock
support for T1024/T1040/T2080. To enable it, define
CONFIG_FSL_ESDHC_USE_PERIPHERAL_CLK.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t2080qds: enable eSDHC adapter card type identification
Yangbo Lu [Wed, 22 Apr 2015 05:57:21 +0000 (13:57 +0800)]
powerpc/t2080qds: enable eSDHC adapter card type identification

Enable eSDHC adapter card type identification and this will do
some corresponding operations and set 'adapter-type' property
for device tree according SDHC Card ID.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agommc: fsl_esdhc: Add adapter card type identification support
Yangbo Lu [Wed, 22 Apr 2015 05:57:00 +0000 (13:57 +0800)]
mmc: fsl_esdhc: Add adapter card type identification support

Add adapter card type identification support by reading
FPGA STAT_PRES1 register SDHC Card ID[0:2] bits. To use this function,
define CONFIG_FSL_ESDHC_ADAPTER_IDENT.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
[York Sun: resolve conflicts in README.fsl-esdhc]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoboard/t2080rdb: reset cs4315 phy
Shengzhou Liu [Wed, 22 Apr 2015 02:59:50 +0000 (10:59 +0800)]
board/t2080rdb: reset cs4315 phy

CS4315 PHY doesn't support phy-reset by software, it
needs to reset it by hardware via CPLD control.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agofsl/deepsleep: avoid the DDR restore from being optimized out
Tang Yuantian [Mon, 20 Apr 2015 03:16:56 +0000 (11:16 +0800)]
fsl/deepsleep: avoid the DDR restore from being optimized out

Function dp_ddr_restore is to restore the first 128-byte space
of DDR. However those codes may be optimized out by compiler
since the destination address is at 0x0. In order to avoid
compiler optimization, we restore the space from high address,
which is not at 0x0, to low address.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/mpc85xx: Don't deref NULL if qman portal lacks cell-index
Scott Wood [Fri, 17 Apr 2015 23:10:06 +0000 (18:10 -0500)]
powerpc/mpc85xx: Don't deref NULL if qman portal lacks cell-index

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoboard/t102x: use fdt_setprop_string instead of fdt_setprop
Shengzhou Liu [Tue, 14 Apr 2015 09:56:50 +0000 (17:56 +0800)]
board/t102x: use fdt_setprop_string instead of fdt_setprop

Use fdt_setprop_string instead of fdt_setprop to fix string length.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc: add 2 common dcache assembly functions
Valentin Longchamp [Fri, 27 Mar 2015 15:07:32 +0000 (16:07 +0100)]
powerpc: add 2 common dcache assembly functions

This patch defines the 2 flush_dcache_range and invalidate_dcache_range
functions for all the powerpc architecture. Their implementation is
borrowed from the kernel's misc_32.S file and replace the ones from
mpc86xx and ppc4xx since they were equivalent.

This is a fix for the problem introduced by this patch:
http://patchwork.ozlabs.org/patch/448849/

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t1023rdb: Add T1023 RDB board support
Shengzhou Liu [Fri, 27 Mar 2015 07:48:34 +0000 (15:48 +0800)]
powerpc/t1023rdb: Add T1023 RDB board support

T1023RDB is a Freescale Reference Design Board that hosts the T1023 SoC.

T1023RDB board Overview
-----------------------
- T1023 SoC integrating two 64-bit e5500 cores up to 1.4GHz
- CoreNet fabric supporting coherent and noncoherent transactions with
  prioritization and bandwidth allocation
- Memory: 2GB Micron MT40A512M8HX unbuffered 32-bit fixed DDR4 without ECC
- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
- Ethernet interfaces:
  - one 1G RGMII port on-board(RTL8211F PHY)
  - one 1G SGMII port on-board(RTL8211F PHY)
  - one 2.5G SGMII port on-board(AQR105 PHY)
- PCIe: Two Mini-PCIe connectors on-board.
- SerDes: 4 lanes up to 10.3125GHz
- NOR:  128MB S29GL01GS110TFIV10 Spansion NOR Flash
- NAND: 512MB S34MS04G200BFI000 Spansion NAND Flash
- eSPI: 64MB S25FL512SAGMFI010 Spansion SPI flash.
- USB: one Type-A USB 2.0 port with internal PHY
- eSDHC: support SD/MMC card and eMMC on-board
- 256Kbit M24256 I2C EEPROM
- RTC: Real-time clock DS1339 on I2C bus
- UART: one serial port on-board with RJ45 connector
- Debugging: JTAG/COP for T1023 debugging

As well updated T1024RDB to add T1023RDB.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
[York Sun: fix defconfig files]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agofsl/pci: Set CFG_READY for PCIe v3.0 and later
Minghuan Lian [Fri, 27 Mar 2015 05:24:39 +0000 (13:24 +0800)]
fsl/pci: Set CFG_READY for PCIe v3.0 and later

Freescale PCIe controllers v3.0 and later need to set bit
CFG_READY to allow all inbound configuration transactions
to be processed normally when in EP mode. However, bit
CFG_READY has been moved from PCIe configuration space to
CCSR PCIe configuration register comparing previous version.
The patch is to set this bit according to PCIe version.

Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoT2080QDS/PCIe: Soft Reset PCIe on T2080QDS for down-training issue
Zhao Qiang [Thu, 26 Mar 2015 08:13:09 +0000 (16:13 +0800)]
T2080QDS/PCIe: Soft Reset PCIe on T2080QDS for down-training issue

T2080QDS PEX1/Slot#1 will down-train from x4 to x2,
with SRDS_PRTCL_S1 = 0x66 and SRDS_PRTCL_S2 = 0x15.
Soft reset PCIe can fix this issue.

Signed-off-by: Zhao Qiang <B45475@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t4rdb: Add SD boot support for T4240RDB board
Chunhe Lan [Fri, 20 Mar 2015 09:08:54 +0000 (17:08 +0800)]
powerpc/t4rdb: Add SD boot support for T4240RDB board

This patch adds SD boot support for T4240RDB board. SPL
framework is used. PBL initializes the internal RAM and
copies SPL to it. Then SPL initializes DDR using SPD and
copies u-boot from SD card to DDR, finally SPL transfers
control to u-boot.

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
[York Sun: Fix T4240RDB_SDCARD_defcofig]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodrivers: usb: fsl: Workaround for Erratum A004477
Nikhil Badola [Fri, 21 Nov 2014 11:55:21 +0000 (17:25 +0530)]
drivers: usb: fsl: Workaround for Erratum A004477

Add a delay of 1 microsecond before issuing soft reset to the
controller to let ongoing ULPI transaction complete.
This prevents corruption of ULPI Function Control Register which
eventually prevents phy clock from entering to low power mode

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agompc85xx/T4240EMU: Remove T4240EMU board
York Sun [Tue, 21 Apr 2015 17:09:52 +0000 (10:09 -0700)]
mpc85xx/T4240EMU: Remove T4240EMU board

T4240 SoC has been available for a long time. Emulator support
is no longer needed.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/mpc85xx: Use GOT when loading IVORs post-relocation
Scott Wood [Fri, 24 Apr 2015 01:01:56 +0000 (20:01 -0500)]
powerpc/mpc85xx: Use GOT when loading IVORs post-relocation

Commit 96d2bb952bb ("powerpc/mpc85xx: Don't relocate exception vectors")
simplified IVOR initialization a bit too much, failing to use the
post-relocation offset.  This doesn't cause a problem with normal NOR
boot, in which both the pre-relocation and post-relocation addresses
are 64 KiB aligned.  However, if TEXT_BASE is only 4 KiB aligned, such
as for NAND/SD/etc. boot on some targets, as well as the QEMU target,
the post-relocation address will not be the same in the lower 16 bits,
as reserve_uboot() ensures that the relocation address is always 64
KiB aligned even if the pre-relocation address was not.

Use the GOT to get the proper post-relocation offsets.

Fixes: 96d2bb952bb ("powerpc/mpc85xx: Don't relocate exception vectors")
Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
Tested-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agosunxi: usb: Protect phy-init and phy-power-on against multiple calls
Hans de Goede [Mon, 27 Apr 2015 14:57:54 +0000 (16:57 +0200)]
sunxi: usb: Protect phy-init and phy-power-on against multiple calls

Once we add support for the ohci controller the phy-init and phy-power-on
functions may be called twice (once by the ehci code and once by the ohci
code) protect them against this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>