oweals/u-boot.git
9 years agozynq: Fix typo in Makefile about custom ps7_init file
Michal Simek [Tue, 21 Jul 2015 09:05:31 +0000 (11:05 +0200)]
zynq: Fix typo in Makefile about custom ps7_init file

Trivial fix.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: gem: Extend timeout value
Michal Simek [Tue, 16 Oct 2012 15:37:11 +0000 (17:37 +0200)]
net: gem: Extend timeout value

Extend time for MDIO. (Because of zed board)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: Show EL level where U-Boot runs
Michal Simek [Mon, 22 Jun 2015 12:31:06 +0000 (14:31 +0200)]
zynqmp: Show EL level where U-Boot runs

Add one more print to make clear which EL level U-Boot runs.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynqmp: Wire up SATA for the board
Michal Simek [Thu, 23 Jul 2015 11:27:40 +0000 (13:27 +0200)]
ARM: zynqmp: Wire up SATA for the board

Enable SATA for the ZynqMP targets.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynqmp: Wire up ethernet controllers
Michal Simek [Thu, 23 Jul 2015 10:03:55 +0000 (12:03 +0200)]
ARM: zynqmp: Wire up ethernet controllers

Wire up ethernet controllers and enable MII and BOOTP options.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Add support for zc770-xm011
Michal Simek [Wed, 22 Jul 2015 09:39:04 +0000 (11:39 +0200)]
ARM: zynq: Add support for zc770-xm011

Add xm011 DTS file and related configs and configurations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Update zc770 dtses
Michal Simek [Wed, 22 Jul 2015 09:36:32 +0000 (11:36 +0200)]
ARM: zynq: DT: Update zc770 dtses

Platform DTSes are missing content needed for platform to be able to use
OF binding and DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Add zc702 pushbuttons to DT as gpio-keys
Michal Simek [Wed, 22 Jul 2015 09:41:11 +0000 (11:41 +0200)]
ARM: zynq: DT: Add zc702 pushbuttons to DT as gpio-keys

Adds the two MIO connected pushbuttons on the zc702 board to the
devicetree as a single multi-key device for us with the gpio-keys driver.

Signed-off-by: Ezra Savard <ezra.savard@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Add missing interrupt for L2 pl310
Michal Simek [Wed, 22 Jul 2015 09:26:08 +0000 (11:26 +0200)]
ARM: zynq: DT: Add missing interrupt for L2 pl310

Add pl310 interrupt to the Zynq devicetree.

Signed-off-by: Alex Wilson <alex.david.wilson@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Get rid of ps-clk-frequency
Michal Simek [Wed, 22 Jul 2015 09:20:54 +0000 (11:20 +0200)]
ARM: zynq: DT: Get rid of ps-clk-frequency

ps-clk-frequency is platform specific setting and shouldn't be the part
of DTSI.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Update years in copyright
Michal Simek [Wed, 22 Jul 2015 09:18:43 +0000 (11:18 +0200)]
ARM: zynq: DT: Update years in copyright

Trivial.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Sync zc702/zc706/zed/zybo DT with kernel
Michal Simek [Wed, 22 Jul 2015 09:12:10 +0000 (11:12 +0200)]
ARM: zynq: DT: Sync zc702/zc706/zed/zybo DT with kernel

Syncup with the latest DT from the Linux kernel.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Add reference to bus node
Michal Simek [Wed, 22 Jul 2015 09:08:40 +0000 (11:08 +0200)]
ARM: zynq: DT: Add reference to bus node

For adding OCM memory in platform DTS is necessary to have reference to
amba bus.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Add pinctrl node
Michal Simek [Wed, 22 Jul 2015 09:07:49 +0000 (11:07 +0200)]
ARM: zynq: DT: Add pinctrl node

Add pinctrl node to DTSI.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Cleanup address-cells and size-cells
Michal Simek [Wed, 22 Jul 2015 09:03:36 +0000 (11:03 +0200)]
ARM: zynq: DT: Cleanup address-cells and size-cells

Remove unneeded address-cells form intc node because it is already setup
in parent node.
Add missing address-cells and size-cells to eth node to be shared for
every platform DTSes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Clean up timer device tree nodes
Michal Simek [Wed, 22 Jul 2015 08:57:51 +0000 (10:57 +0200)]
ARM: zynq: DT: Clean up timer device tree nodes

Separate IRQ cells from each other for easier reading.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Use the zynq binding with macb
Michal Simek [Wed, 22 Jul 2015 08:51:16 +0000 (10:51 +0200)]
ARM: zynq: DT: Use the zynq binding with macb

Use the new zynq binding for macb ethernet, since it will disable half
duplex gigabit like the Zynq TRM says to do. Also allow the compatible
cadence gem binding that won't disable half duplex but works otherwise.

Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Fix GEM register area size
Michal Simek [Wed, 22 Jul 2015 08:50:02 +0000 (10:50 +0200)]
ARM: zynq: DT: Fix GEM register area size

The size of the GEM's register area is only 0x1000 bytes.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agospi: Fix zynq SPI binding
Michal Simek [Wed, 22 Jul 2015 08:47:33 +0000 (10:47 +0200)]
spi: Fix zynq SPI binding

Zynq is using Cadence IP where binding is documented in the Linux kernel
and there is no reason to use different binding.
Synchronize it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Remove 222 MHz OPP
Michal Simek [Wed, 22 Jul 2015 08:42:51 +0000 (10:42 +0200)]
ARM: zynq: DT: Remove 222 MHz OPP

Due to dependencies between timer and CPU frequency, only changes by
powers of two are allowed. The clocksource driver prevents other
changes, but with cpufreq and its governors it can result in being
spammed with error messages constantly. Hence, remove the 222 MHz OPP.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Migrate UART to Cadence binding
Michal Simek [Wed, 22 Jul 2015 08:40:51 +0000 (10:40 +0200)]
ARM: zynq: DT: Migrate UART to Cadence binding

The Zynq UART is Cadence IP and the driver has been renamed accordingly.
Migrate the DT to use the new binding for the UART driver.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Add a fixed regulator for CPU voltage
Michal Simek [Wed, 22 Jul 2015 08:38:45 +0000 (10:38 +0200)]
ARM: zynq: DT: Add a fixed regulator for CPU voltage

To silence the warning
   cpufreq_cpu0: failed to get cpu0 regulator: -19
from the cpufreq driver regarding a missing regulator,
add a fixed regulator to the DT.
Zynq does not support voltage scaling and the CPU rail should always be
supplied with 1 V, hence it is added in the SOC-level dtsi.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Add missing nodes to DTSI
Michal Simek [Wed, 22 Jul 2015 08:32:05 +0000 (10:32 +0200)]
ARM: zynq: DT: Add missing nodes to DTSI

Add ADC, CAN, GPIO, MC, DMA, DEVCFG, USB, Watchdog IPs to DTSI.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Use the right names for nodes
Michal Simek [Wed, 22 Jul 2015 08:28:48 +0000 (10:28 +0200)]
ARM: zynq: DT: Use the right names for nodes

Based on SPEC you right names with addresses.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: Add support for IP detection via SLCR
Michal Simek [Wed, 22 Jul 2015 07:27:11 +0000 (09:27 +0200)]
zynqmp: Add support for IP detection via SLCR

SLCR can be used for IP configuration setting.
Add SLCR skeleton to enable run time checking.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: mp: Simplify set_r5_start handling
Michal Simek [Fri, 22 May 2015 11:26:33 +0000 (13:26 +0200)]
zynqmp: mp: Simplify set_r5_start handling

Pass directly boot_addr which is LOVEC (0) or HIVEC (0xffff0000).
No reason to use magic values 0 and 1.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: Provide option to enable uart dcc support for zynqmp
Siva Durga Prasad Paladugu [Wed, 10 Jun 2015 10:20:59 +0000 (15:50 +0530)]
zynqmp: Provide option to enable uart dcc support for zynqmp

Provide option to enable uart dcc support for zynqmp
This config can be enabled as per board config file.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoKconfig: zynqmp: Move CONFIG_SYS_TEXT_BASE to defconfig
Siva Durga Prasad Paladugu [Wed, 10 Jun 2015 10:20:58 +0000 (15:50 +0530)]
Kconfig: zynqmp: Move CONFIG_SYS_TEXT_BASE to defconfig

Move CONFIG_SYS_TEXT_BASE of ZynqMP_ep to its
respective defconfig

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: Define ep config for ZynqMP
Siva Durga Prasad Paladugu [Wed, 10 Jun 2015 10:20:57 +0000 (15:50 +0530)]
zynqmp: Define ep config for ZynqMP

Define a new config "zynqmp_ep" for ZynqMP instead
of xilinx_zynqmp. This defconfig supports all emulation
platforms of ZynqMP. Also renamed TARGET_XILINX_ZYNQMP
to ARCH_ZYNQMP.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: Kconfig: Move zynqmp Kconfig
Siva Durga Prasad Paladugu [Wed, 10 Jun 2015 10:20:56 +0000 (15:50 +0530)]
zynqmp: Kconfig: Move zynqmp Kconfig

Move the zynqmp Kconfig from board to arch
as there may be different boards under same
architecture.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynq: gem: Setting up WRAP bit for one TX bd
Michal Simek [Tue, 26 May 2015 10:01:12 +0000 (12:01 +0200)]
zynq: gem: Setting up WRAP bit for one TX bd

Setting up WRAP bit to indicate that this is the last TX BD in the
chain.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynq: gem: Increase the Rx buffer descriptors to 32
Siva Durga Prasad Paladugu [Wed, 15 Apr 2015 06:45:01 +0000 (12:15 +0530)]
zynq: gem: Increase the Rx buffer descriptors to 32

Increase the Rx Buffer descriptors to 32. This will avoid
Rx buffer descriptors overflow if more packets were received
at one shot before we process the received ones.
This fixes the issue of intermittent timeouts during tftp
on a 1Gb connection with tftp server running on windows.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: gem: Flush the rx buffers while transmitting
Siva Durga Prasad Paladugu [Sat, 6 Dec 2014 07:27:53 +0000 (12:57 +0530)]
zynqmp: gem: Flush the rx buffers while transmitting

Flush and invalidate the rx buffers while sending the
tx packet it self as armv8 does flush also while doing
invalidation.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: gem: Set data bus width to 64bit for arm64
Siva Durga Prasad Paladugu [Tue, 8 Jul 2014 10:01:03 +0000 (15:31 +0530)]
zynqmp: gem: Set data bus width to 64bit for arm64

Set the data bus width to 64-bit AMBA Databus width in config register.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agoMerge branch 'master' of http://git.denx.de/u-boot-sunxi
Tom Rini [Sat, 25 Jul 2015 13:04:18 +0000 (09:04 -0400)]
Merge branch 'master' of git.denx.de/u-boot-sunxi

9 years agosunxi: Enable both ehci and otg in host mode on various boards
Hans de Goede [Thu, 18 Jun 2015 16:19:22 +0000 (18:19 +0200)]
sunxi: Enable both ehci and otg in host mode on various boards

Now that the device-model port of the musb mode makes it possible, enable
both the ehci and otg in host mode on boards where the musb is wired up in
host only mode, either via an usb-a receptacle or via an usb <-> sata
converter.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: ga10h: Enable both otg and regular usb host controllers
Hans de Goede [Wed, 17 Jun 2015 19:16:59 +0000 (21:16 +0200)]
sunxi: ga10h: Enable both otg and regular usb host controllers

This allows using devices plugged into both ports of the tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: musb: Stop treating not having a vbus-det gpio as an error
Hans de Goede [Thu, 18 Jun 2015 16:21:33 +0000 (18:21 +0200)]
sunxi: musb: Stop treating not having a vbus-det gpio as an error

On some boards the otg is wired up in host-only mode in this case we
have no vbus-det gpio.

Stop logging an error from sunxi_usb_phy_vbus_detect() in this case, and
stop treating sunxi_usb_phy_vbus_detect() returning a negative errno, as
if a charger is plugged into the otg port.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: musb: Improve output during probing
Hans de Goede [Thu, 18 Jun 2015 20:45:34 +0000 (22:45 +0200)]
sunxi: musb: Improve output during probing

When we return an error the usb core will print an error-message, so in this
case do not print anything.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agosunxi: musb: Use device-model for musb host mode
Hans de Goede [Wed, 17 Jun 2015 15:44:58 +0000 (17:44 +0200)]
sunxi: musb: Use device-model for musb host mode

Modify the sunxi musb glue to use the device-model for musb host mode.

This allows using musb in host mode together with other host drivers
such as ehci / ohci, which is esp. useful on boards which use the
musb controller in host-only mode, these boards have e.g. an usb-a
receptacle or an usb to sata converter attached to the musb controller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: musb: Move musb config and platdata to the sunxi-musb glue
Hans de Goede [Wed, 17 Jun 2015 13:49:26 +0000 (15:49 +0200)]
sunxi: musb: Move musb config and platdata to the sunxi-musb glue

Move the musb config and platdata to the sunxi-musb glue, which is where
it really belongs. This is preparation patch for adding device-model
support for the sunxi-musb-host code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: musb: Add id pin support
Hans de Goede [Sun, 14 Jun 2015 15:40:37 +0000 (17:40 +0200)]
sunxi: musb: Add id pin support

When in host mode check if there is a host cable inserted into the otg
port by checking the id pin. If there is no host cable return an error to
make usb_lowlevel_init() exit early, rather then waiting for 1 second
for a device which will never show up.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: musb: Move vbus check to sunxi_musb_enable
Hans de Goede [Sun, 14 Jun 2015 14:48:56 +0000 (16:48 +0200)]
sunxi: musb: Move vbus check to sunxi_musb_enable

This way it can be re-checked on "usb reset".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: usb-phy: Add support for reading otg id pin value
Hans de Goede [Sun, 14 Jun 2015 15:29:53 +0000 (17:29 +0200)]
sunxi: usb-phy: Add support for reading otg id pin value

Add support for reading the id pin value of the otg connector to the usb
phy code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Enable CMD_USB and USB_STORAGE by default on sunxi
Hans de Goede [Wed, 17 Jun 2015 18:54:07 +0000 (20:54 +0200)]
sunxi: Enable CMD_USB and USB_STORAGE by default on sunxi

Start using the new Kconfig options which are available for these now,
and simply always enable them by selecting them as sunxi builds always
include USB support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agosunxi: Update selects in arch/arm/Kconfig for DM conversions
Tom Rini [Tue, 30 Jun 2015 20:51:15 +0000 (16:51 -0400)]
sunxi: Update selects in arch/arm/Kconfig for DM conversions

With certain features being convert to DM now we want sunxi to default
to having DM enabled for ETH/SERIAL and USB in some cases.

Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Rini <trini@konsulko.com>
[hdegoede@redhat.com: Also select CONFIG_USB for all sunxi builds]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agosunxi: Remove bogus uart entry from utoo-p66 dts file
Hans de Goede [Sat, 25 Jul 2015 09:20:38 +0000 (11:20 +0200)]
sunxi: Remove bogus uart entry from utoo-p66 dts file

At one point in time the utoo-p66 dts file in the kernel had a bogus
uart entry, and it seems like we synced with the kernel at just the wrong
moment.

This commit removes the bogus uart entry, which breaks booting the utoo-p66
when DM_SERIAL=y.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Fri, 24 Jul 2015 20:39:56 +0000 (16:39 -0400)]
Merge git://git.denx.de/u-boot-usb

9 years agousb: ci_udc: fix request allocation when endpoints are disabled
Rob Herring [Fri, 24 Jul 2015 15:14:21 +0000 (10:14 -0500)]
usb: ci_udc: fix request allocation when endpoints are disabled

The ci_udc driver request allocation assumes that the endpoint descriptor
pointer is set to retrieve the endpoint number, but that is only true
when the endpoint is enabled. This results in a NULL ptr dereference
which for me happens to return 0 value. This causes the EP0 request
struct to be returned for other endpoints. Some gadget drivers like
fastboot and USB MS work fine, but ethernet does not.

Really, the ci_udc driver is the oddball here doing this EP0 special
case handling Stephen added. All the other drivers alloc/free functions
are pretty much the same with the only variation being the size of the
private struct. This could all be consolidated to a common function.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
9 years agosunxi: spl: Remove redundant check from `board_mmc_init` for signature
Daniel Kochmański [Fri, 29 May 2015 15:21:00 +0000 (17:21 +0200)]
sunxi: spl: Remove redundant check from `board_mmc_init` for signature

Remove the boot signature check from board_mmc_init() in spl mode, as it
is already done in spl_boot_device() in this case, and update the comments
to reflect this.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
CC: Roy Spliet <r.spliet@ultimaker.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
[hdegoede@redhat.com: Disable the check only for SPL instead of always]
Acked-by: Hans De Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: spl: Detect at runtime where SPL was read from
Daniel Kochmański [Fri, 29 May 2015 14:55:42 +0000 (16:55 +0200)]
sunxi: spl: Detect at runtime where SPL was read from

Make possible using a single `u-boot-sunxi-with-spl.bin` binary for both NAND
memory and SD card. Detection where SPL was read from is implemented in
`spl_boot_device`.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
CC: Roy Spliet <r.spliet@ultimaker.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
[hdegoede@redhat.com: Some small coding style fixes]
Acked-by: Hans De Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: Create helper function veryfing valid boot signature on MMC
Daniel Kochmański [Fri, 29 May 2015 14:55:41 +0000 (16:55 +0200)]
sunxi: Create helper function veryfing valid boot signature on MMC

This patch extracts checking for valid SD card "eGON.BT0" signature from
`board_mmc_init` into function `sunxi_mmc_has_egon_boot_signature`.

Buffer for mmc sector is allocated and freed at runtime. `panic` is
triggered on malloc failure.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
CC: Roy Spliet <r.spliet@ultimaker.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
[hdegoede@redhat.com: Small bugfix to make it work for devs other then mmc0]
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agommc: Protect `mmc_initialize` from initialising mmc multiple times
Daniel Kochmański [Fri, 29 May 2015 14:55:43 +0000 (16:55 +0200)]
mmc: Protect `mmc_initialize` from initialising mmc multiple times

`mmc_initialize` might be called multiple times leading to the mmc-controllers
being initialised twice, and initialising the `mmc_devices` list head twice
which may lead to memory leaks.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
CC: Roy Spliet <r.spliet@ultimaker.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
CC: Pantelis Antoniou <panto@antoniou-consulting.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoarm: marvell: Increase MAXARGS to 32
Stefan Roese [Thu, 23 Jul 2015 08:26:11 +0000 (10:26 +0200)]
arm: marvell: Increase MAXARGS to 32

This makes more complex U-Boot scripts possible.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: db-88f6820-gp: Add SDIO/MMC SPL boot support
Stefan Roese [Mon, 20 Jul 2015 09:20:40 +0000 (11:20 +0200)]
arm: mvebu: db-88f6820-gp: Add SDIO/MMC SPL boot support

This patch adds the configuration options to boot via SDIO/MMC on the
Marvell DB-88F6820-GP Armada A38x board. The default boot device
is still SPI NOR flash.

To enable MMC booting on this board 2 things need to be changes:
a) Change kwbimage.cfg
   BOOT_FROM   sdio
b) In the config header select
   #define CONFIG_SPL_BOOT_DEVICE SPL_BOOT_SDIO_MMC_CARD

The generated image needs to be copied to the first bootable MMC
partition:

dd if=u-boot-spl.kwb of=/dev/sdX1

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
9 years agospl: spl_mmc: Add option to boot from a MMC partition with offset
Stefan Roese [Mon, 20 Jul 2015 09:20:39 +0000 (11:20 +0200)]
spl: spl_mmc: Add option to boot from a MMC partition with offset

This patch introduces the option to boot from a MMC card parition with
an offset. This can be done by using both defines together:

define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1
define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR    ((160 << 10) / 512)

The example above loads the main U-Boot at offset 160KiB from the MMC
partition 1.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: Tom Rini <trini@konsulko.com>
9 years agokwbimage: Rename CONFIG_SYS_SPI_U_BOOT_OFFS to CONFIG_SYS_U_BOOT_OFFS
Stefan Roese [Mon, 20 Jul 2015 09:20:38 +0000 (11:20 +0200)]
kwbimage: Rename CONFIG_SYS_SPI_U_BOOT_OFFS to CONFIG_SYS_U_BOOT_OFFS

To use this offset for other boot device (like SDIO/MMC), lets rename
it to a more generic name. This will be used be the SDIO/MMC SPL boot
support for the A38x.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
9 years agokwbimage: Add support for SDIO/MMC boot device selection
Stefan Roese [Mon, 20 Jul 2015 09:20:37 +0000 (11:20 +0200)]
kwbimage: Add support for SDIO/MMC boot device selection

This patch adds support to select the "sdio" as boot device in the
kwbimage.cfg file. This line selects this SDIO device:

BOOT_FROM  sdio

Tested on Marvell DB-88F6820-GP board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
9 years agoarm: mvebu: Add SPL SDIO/MMC boot support
Stefan Roese [Mon, 20 Jul 2015 09:20:36 +0000 (11:20 +0200)]
arm: mvebu: Add SPL SDIO/MMC boot support

This patch adds basic SDIO/MMC booting support to MVEBU SoC's. Since
I don't know of a way to test the boot-device upon runtime, this patch
hardcodes the spl_boot_device instead.

Tested on Marvell DB-88F6820-GP board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
9 years agoMerge git://git.denx.de/u-boot-uniphier
Tom Rini [Thu, 23 Jul 2015 15:46:05 +0000 (11:46 -0400)]
Merge git://git.denx.de/u-boot-uniphier

9 years agoARM: UniPhier: document reference support card
Masahiro Yamada [Tue, 21 Jul 2015 05:04:24 +0000 (14:04 +0900)]
ARM: UniPhier: document reference support card

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoARM: dts: UniPhier: add I2C ch4 device node for PH1-sLD3
Masahiro Yamada [Tue, 21 Jul 2015 05:04:23 +0000 (14:04 +0900)]
ARM: dts: UniPhier: add I2C ch4 device node for PH1-sLD3

This I2C device is used SoC-internally for controlling the DMD core.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoARM: UniPhier: add PH1-sLD3 SoC support
Masahiro Yamada [Tue, 21 Jul 2015 05:04:22 +0000 (14:04 +0900)]
ARM: UniPhier: add PH1-sLD3 SoC support

The init code for UMC (Unified Memory Controller) and PLL has not
been mainlined yet, but U-boot proper should work.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoARM: UniPhier: update CONFIG_BOOTARGS
Masahiro Yamada [Tue, 21 Jul 2015 05:04:21 +0000 (14:04 +0900)]
ARM: UniPhier: update CONFIG_BOOTARGS

Both "earlyprintk" and "loglevel=8" should be useful for the
development.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoARM: UniPhier: disable CONFIG_FIT
Masahiro Yamada [Tue, 21 Jul 2015 05:04:20 +0000 (14:04 +0900)]
ARM: UniPhier: disable CONFIG_FIT

To use FIT boot, we have to describe Image Tree Source in addition.
So, it is not intended for beginners.  Disable it by default.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoARM: UniPhier: add environment variable for TFTP boot
Masahiro Yamada [Tue, 21 Jul 2015 05:04:19 +0000 (14:04 +0900)]
ARM: UniPhier: add environment variable for TFTP boot

The command "run tftpboot" downloads some files onto the RAM
via TFTP and boots the kernel.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoARM: UniPhier: add environment sets for non-FIT Linux boot
Masahiro Yamada [Tue, 21 Jul 2015 05:04:18 +0000 (14:04 +0900)]
ARM: UniPhier: add environment sets for non-FIT Linux boot

Currently, the environment variables "norboot" and "nandboot" only
work with CONFIG_FIT, but we do not want to depend on CONFIG_FIT to
boot the kernel.

This commit adds environments useful for booting Linux with separate
uImage + ramdisk + DTB.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoARM: dts: UniPhier: add device-specific compatible string for EEPROM
Masahiro Yamada [Mon, 13 Jul 2015 01:35:34 +0000 (10:35 +0900)]
ARM: dts: UniPhier: add device-specific compatible string for EEPROM

For the record, describe exactly which device of which vendor
is used on this board.

I2C EEPROM is bound by the generic compatible string, "i2c-eeprom",
so this commit has no impact on the functionality.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Thu, 23 Jul 2015 13:02:28 +0000 (09:02 -0400)]
Merge git://git.denx.de/u-boot-marvell

9 years agoarm: mvebu: db-88f6820: Add SPL support with DDR init code
Stefan Roese [Wed, 25 Mar 2015 12:35:15 +0000 (13:35 +0100)]
arm: mvebu: db-88f6820: Add SPL support with DDR init code

This patch adds SPL support for the Marvell DB-88F6820-GP board.
With this change, the bin_hdr from the original Marvell U-boot
is not needed any more on this board. The sources from bin_hdr
(SERDES/PHY and DDR setup) are now integrated in mainline
U-Boot. And this patch enables them for this board.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: mvebu: a38x: Use correct PEX register access macros
Stefan Roese [Mon, 8 Jun 2015 15:01:26 +0000 (17:01 +0200)]
arm: mvebu: a38x: Use correct PEX register access macros

Remove the incorrect PEX macros from the DDR header. And insert the
correct ones in ctrl_pex.h instead.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: mvebu: Add Armada 38x DDR3 training code from Marvell bin_hdr
Stefan Roese [Thu, 26 Mar 2015 14:36:56 +0000 (15:36 +0100)]
arm: mvebu: Add Armada 38x DDR3 training code from Marvell bin_hdr

This patch adds the DDR3 setup and training code taken from the Marvell
U-Boot repository. This code used to be included as a binary (bin_hdr)
into the Armada A38x boot image. Not linked with the main U-Boot. With this
code addition and the serdes/PHY setup code, the Armada A38x support
in mainline U-Boot is finally self-contained. So the complete image
for booting can be built from mainline U-Boot. Without any additional
external inclusion.

Note:
This code has undergone many hours (days!) of coding-style cleanup and
refactoring. It still is not checkpatch clean though, I'm afraid. As the
factoring of the code has so many levels of indentation that many lines
are longer than 80 chars.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: mvebu: drivers/ddr: Move Armada XP DDR init code into new directory
Stefan Roese [Wed, 25 Mar 2015 11:51:18 +0000 (12:51 +0100)]
arm: mvebu: drivers/ddr: Move Armada XP DDR init code into new directory

With the upcoming addition of the Armada 38x DDR support, which is not
compatible to the Armada XP DDR init code, we need to introduce a new
directory infrastructure. To support multiple Marvell DDR controller.

This will be the new structure:

     drivers/ddr/marvell/axp
     Supporting Armada XP (AXP) devices (and perhaps Armada 370)

     drivers/ddr/marvell/a38x
     Supporting Armada 38x devices (and perhaps Armada 39x)

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: mvebu: Add Armada 38x SERDES / PHY init code from Marvell bin_hdr
Stefan Roese [Mon, 20 Apr 2015 07:31:27 +0000 (09:31 +0200)]
arm: mvebu: Add Armada 38x SERDES / PHY init code from Marvell bin_hdr

This code is ported from the Marvell bin_hdr code into mainline
SPL U-Boot. It needs to be executed very early so that the devices
connected to the serdes PHY are configured correctly.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: mvebu: serdes: Move Armada XP SERDES / PHY init code into new directory
Stefan Roese [Mon, 20 Apr 2015 07:28:12 +0000 (09:28 +0200)]
arm: mvebu: serdes: Move Armada XP SERDES / PHY init code into new directory

With the upcoming addition of the Armada 38x SPL support, which is not
compatible to the Armada XP SERDES init code, we need to introduce a new
directory infrastructure. So lets move the AXP serdes init code into
a new directory. This way the A38x code can be added in a clean way.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoMakefile: Fix mvebu build target to use SPL load and exe-address
Stefan Roese [Mon, 20 Apr 2015 09:17:16 +0000 (11:17 +0200)]
Makefile: Fix mvebu build target to use SPL load and exe-address

The u-boot-spl.kwb build target needs the SPL text-base
(CONFIG_SPL_TEXT_BASE) as load and execution address.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: mvebu: Disable MMU before changing register base address
Stefan Roese [Fri, 24 Apr 2015 08:49:11 +0000 (10:49 +0200)]
arm: mvebu: Disable MMU before changing register base address

Only with disabled MMU its possible to switch the base register address on
Armada 38x. Without this the SDRAM located at >= 0x4000.0000 is also not
accessible, as its still locked to cache.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: mvebu: spl.c: Add call to board_early_init_f()
Stefan Roese [Fri, 17 Apr 2015 16:13:06 +0000 (18:13 +0200)]
arm: mvebu: spl.c: Add call to board_early_init_f()

Pin muxing needs to be done before UART output, since on A38x the UART
pins need some re-muxing for output to work.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: mvebu: Use default reg base address for SPL on A38x
Stefan Roese [Fri, 17 Apr 2015 16:12:41 +0000 (18:12 +0200)]
arm: mvebu: Use default reg base address for SPL on A38x

On A38x switching the regs base address without running from
SDRAM doesn't seem to work. So let the SPL still use the
default base address and switch to the new address in the
mail u-boot later.

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoci_udc: fix 64-bit compile warnings
Stephen Warren [Wed, 22 Jul 2015 21:16:20 +0000 (15:16 -0600)]
ci_udc: fix 64-bit compile warnings

This is the same as f72d8320b605 "usb: ci_udc: fix warnings on 64-bit
builds", but more.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
9 years agoarm: mvebu: Call timer_init early before PHY and DDR init
Stefan Roese [Wed, 15 Jul 2015 13:36:52 +0000 (15:36 +0200)]
arm: mvebu: Call timer_init early before PHY and DDR init

Without calling timer_init(), the xdelay() functions return immediately.
We need to call timer_init() early, so that these functions work and
the PHY and DDR init code works correctly.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anton Schubert <anton.schubert@gmx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: add Armada XP SATA support
Anton Schubert [Wed, 15 Jul 2015 12:50:05 +0000 (14:50 +0200)]
arm: mvebu: add Armada XP SATA support

This patch initializes the SATA address windows on Armada XP and
allows it to work with the existing mvsata_ide driver.
It also adds the necessary configuration for the db-mv784mp-gp board.

Signed-off-by: Anton Schubert <anton.schubert@gmx.de>
Tested-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agolinux_compat: handle __GFP_ZERO in kmalloc()
Masahiro Yamada [Mon, 13 Jul 2015 04:17:07 +0000 (13:17 +0900)]
linux_compat: handle __GFP_ZERO in kmalloc()

Currently, kzalloc() returns zero-filled memory, while kmalloc()
simply ignores the second argument and never fills the memory
area with zeros.

I want kmalloc(size, __GFP_ZERO) to behave as kzalloc() does,
which will make it easier to add more memory allocator variants.

With the introduction of __GFP_ZERO flag, going forward, kzmalloc()
variants can fall back to kmalloc() enabling the __GFP_ZERO flag.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agolinux_compat: move vzalloc() to header file as an inline function
Masahiro Yamada [Mon, 13 Jul 2015 04:17:06 +0000 (13:17 +0900)]
linux_compat: move vzalloc() to header file as an inline function

The vzalloc(size) is equivalent to kzalloc(size, 0).  Move it to
include/linux/compat.h as an inline function in order to avoid the
function call overhead.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agolinux_compat: remove cpu_relax() define
Masahiro Yamada [Mon, 13 Jul 2015 04:17:05 +0000 (13:17 +0900)]
linux_compat: remove cpu_relax() define

The macro cpu_relax() is defined by several headers in different
ways.

arch/{arm,avr32,mips}/include/asm/processor.h defines it as follows:
  #define cpu_relax() barrier()

On the other hand, include/linux/compat.h defines it as follows:
  #define cpu_relax() do {} while (0)

If both headers are included from the same source file, the warning
  warning: "cpu_relax" redefined [enabled by default]
is displayed.

It effectively makes it impossible to include <linux/compat.h>
from some sources.  Drop the latter.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agox86: delete unneeded declarations of disable_irq() and enable_irq()
Masahiro Yamada [Mon, 13 Jul 2015 04:17:04 +0000 (13:17 +0900)]
x86: delete unneeded declarations of disable_irq() and enable_irq()

These two declarations in arch/x86/include/asm/interrupt.h conflict
with ones in include/linux/compat.h, so x86 boards cannot include
<linux/compat.h>.

The comment /* arch/x86/lib/interrupts.c */ is bogus now, and we do
not see any definitions of disable_irq() and enable_irq() in there.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agousb: ehci-marvell: Drop wrl accessor function
Stefan Roese [Wed, 22 Jul 2015 08:01:30 +0000 (10:01 +0200)]
usb: ehci-marvell: Drop wrl accessor function

This patch removes the wrl accessor function from the Marvell EHCI
driver by replacing it with the writel function.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marex@denx.de>
9 years agousb: CONFIG_USB_FASTBOOT prefix replacement for consistency
Paul Kocialkowski [Mon, 20 Jul 2015 10:38:22 +0000 (12:38 +0200)]
usb: CONFIG_USB_FASTBOOT prefix replacement for consistency

FASTBOOT is defined both by CONFIG_USB_FUNCTION_FASTBOOT AND CONFIG_CMD_FASTBOOT, so it doesn't
make much sense to have a CONFIG_USB_FASTBOOT prefix for fastboot-specific options, especially
given that other config options for fastboot use the CONFIG_FASTBOOT prefix.

This replaces the CONFIG_USB_FASTBOOT prefix with CONFIG_FASTBOOT, for consistency.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
9 years agoimplement Fastboot via USB OTG on bcm28155_ap boards
Jiandong Zheng [Thu, 9 Jul 2015 21:26:40 +0000 (14:26 -0700)]
implement Fastboot via USB OTG on bcm28155_ap boards

Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com>
Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agousb: gadget: bcm_udc_otg files
Jiandong Zheng [Thu, 9 Jul 2015 21:26:39 +0000 (14:26 -0700)]
usb: gadget: bcm_udc_otg files

Add the required files for the Broadcom UDC OTG interface.

Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com>
Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agog_dnl: add missing declaration
Steve Rae [Thu, 9 Jul 2015 21:26:38 +0000 (14:26 -0700)]
g_dnl: add missing declaration

Signed-off-by: Steve Rae <srae@broadcom.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Test HW: Exynos 4210 (trats), Exynos 5422 (Odroid XU3)

9 years agousb: gadget: fastboot: Dequeue the previous IN request for the current request
Paul Kocialkowski [Sat, 4 Jul 2015 14:46:16 +0000 (16:46 +0200)]
usb: gadget: fastboot: Dequeue the previous IN request for the current request

Recent versions of the fastboot tool will query the partition type before doing
an operation on a partition (such as erase, flash, etc). It will then submit
the operation as soon as the response for the partition type is received.

Usually, the MUSB controller will see that the partition type request return
status was read by the host at the very same time as the actual operation
request is submitted by the host. However, the operation will be read first
(int_rx is handled first in musb_interrupt) and after it is completed, the
fastboot USB gadget driver will send another return status. Hence, this happens
before the musb gadget framework has had a chance to handle the previous
acknowledgement that the host read the return status and dequeue the request.

The host will then usually empty the FIFO by the time musb_interrupt gets around
handling the return status acknowledgement (for the previous request, this is
still on the same musb_interrupt call), so no other interrupt is generated and
the most recent return status acknowledgement remains unaccounted for.

It will then be used as a response for the next command, and the proper response
for it will be delayed to the next command, and so on.

Dequeuing the previous IN request in the fastboot code ensures that no previous
return status remains. It is acceptable to do it since there is no callback to
it anyways.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
9 years agousb: gadget: fastboot: Request status and length check in rx handler
Paul Kocialkowski [Sat, 4 Jul 2015 14:46:15 +0000 (16:46 +0200)]
usb: gadget: fastboot: Request status and length check in rx handler

This avoids handling requests that have an error status or no data.
In particular, this avoids showing unnecessary error messages when the USB
gadget gets disconnected (e.g. with fastboot continue) and the fastboot USB
gadget driver sends an error back to the host (that has disconnected already).

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
9 years agofastboot: Dynamic controller index for usb_gadget_handle_interrupts
Paul Kocialkowski [Sun, 24 May 2015 09:41:04 +0000 (11:41 +0200)]
fastboot: Dynamic controller index for usb_gadget_handle_interrupts

Since we're now using a dynamic controller index for fastboot too,
usb_gadget_handle_interrupts should be using it instead of 0 (despite the fact
that it's currently not being used at all in the musb-new implementation).

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
9 years agousb: gadget: Weak board_usb_init/cleanup definitions in USB download gadget code
Paul Kocialkowski [Fri, 12 Jun 2015 17:57:01 +0000 (19:57 +0200)]
usb: gadget: Weak board_usb_init/cleanup definitions in USB download gadget code

Weak versions of board_usb_init and board_usb_cleanup are defined in common USB
host code, but it is also used for USB device gadgets, so we also need a weak
definition of it when there is no USB host enabled.
Both weak definitions do not conflict.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)

9 years agousb: board_usb_init and board_usb_cleanup calls in the fastboot command
Paul Kocialkowski [Fri, 12 Jun 2015 17:57:00 +0000 (19:57 +0200)]
usb: board_usb_init and board_usb_cleanup calls in the fastboot command

Each USB download function command calls board_usb_init before registering the
USB gadget and board_usb_cleanup after de-registering it. On devices currently
using fasboot, musb-new is usually initialized earlier, but some other boards
might need the board_usb_init call to properly initialize musb-new.

This requires adding an argument (the USB controller index) to the fastboot
command, as it is currently done with other USB download gadget functions.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)

9 years agousb: Fastboot function config for better consistency with other functions
Paul Kocialkowski [Fri, 12 Jun 2015 17:56:59 +0000 (19:56 +0200)]
usb: Fastboot function config for better consistency with other functions

USB download gadget functions such as thor and dfu have a separate config option
for the USB gadget part of the code, independent from the command part.
This switches the fastboot USB gadget to the same scheme, for better
consistency.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)

9 years agousb: USB download gadget and functions config options coherent naming
Paul Kocialkowski [Fri, 12 Jun 2015 17:56:58 +0000 (19:56 +0200)]
usb: USB download gadget and functions config options coherent naming

This introduces a coherent scheme for naming USB download gadget and functions
config options. The download USB gadget config option is moved to
CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each
function's config option is moved to a CONFIG_USB_FUNCTION_ prefix.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)

9 years agodrivers: usb: fsl: Remove LS102XA immap inclusion
Nikhil Badola [Wed, 24 Jun 2015 05:22:48 +0000 (10:52 +0530)]
drivers: usb: fsl: Remove LS102XA immap inclusion

Remove LS102XA immap header inclusion from xhci fsl driver.
It removes redefinition warnings when built for platforms
other than LS102XA

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
9 years agoinclude: usb: Map USB controller base addresses for LS2085A
Nikhil Badola [Tue, 23 Jun 2015 03:48:20 +0000 (09:18 +0530)]
include: usb: Map USB controller base addresses for LS2085A

Map USB XHCI controller base addresses for LS2085A SOC

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>