oweals/u-boot.git
5 years agoriscv: qemu: Create a simple-bus driver for the soc node
Bin Meng [Wed, 12 Dec 2018 14:12:25 +0000 (06:12 -0800)]
riscv: qemu: Create a simple-bus driver for the soc node

To enumerate devices on the /soc/ node, create a "simple-bus"
driver to match "riscv-virtio-soc".

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
5 years agodm: cpu: Add timebase frequency to the platdata
Bin Meng [Wed, 12 Dec 2018 14:12:24 +0000 (06:12 -0800)]
dm: cpu: Add timebase frequency to the platdata

This adds a timebase_freq member to the 'struct cpu_platdata', to
hold the "timebase-frequency" value in the cpu or /cpus node.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
5 years agoriscv: add Kconfig entries for the code model
Lukas Auer [Wed, 12 Dec 2018 14:12:23 +0000 (06:12 -0800)]
riscv: add Kconfig entries for the code model

RISC-V has two code models, medium low (medlow) and medium any (medany).
Medlow limits addressable memory to a single 2 GiB range between the
absolute addresses -2 GiB and +2 GiB. Medany limits addressable memory
to any single 2 GiB address range.

By default, medlow is selected for U-Boot on both 32-bit and 64-bit
systems.

The -mcmodel compiler flag is selected according to the Kconfig
configuration.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
[bmeng: adjust to make medlow the default code model for U-Boot]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
5 years agoPrepare v2019.01-rc2 v2019.01-rc2
Tom Rini [Tue, 18 Dec 2018 01:25:24 +0000 (20:25 -0500)]
Prepare v2019.01-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoarm: ti: boot: Increase system partition size
Sam Protsenko [Tue, 11 Dec 2018 16:20:21 +0000 (18:20 +0200)]
arm: ti: boot: Increase system partition size

Android code base is growing, so since Android "Pie" the size of
system.img grew up to be about 740 MiB. Let's increase system.img to
1 GiB to accommodate for those changes and leave some margin for future
changes. We don't want to make it more than 1 GiB, because we should
keep userdata partition big enough (for user files, like media etc.),
and eMMC size on BeagleBoard-X15 is only 3.5 GiB.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Acked-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoMakefile: output migration warnings to stderr
Chris Packham [Fri, 14 Dec 2018 22:35:54 +0000 (11:35 +1300)]
Makefile: output migration warnings to stderr

Output the device model migration warnings to stderr. This allows tools
like buildman to pick them up rather than suppressing them along with
the normal build output on stdout.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
5 years agoRestore compatibility of image type IDs
Stefano Babic [Mon, 17 Dec 2018 10:02:00 +0000 (11:02 +0100)]
Restore compatibility of image type IDs

Commit a2b96ece5be146f4995d737f047e5bbb76079b8f breaks the enumeration
of the Image Types. New image types can be appended, but they cannot be
inserted in the list else backward compatibility is broken.

This restores the images types as before 2018.11 and move i.MX8 related
images at the end.

Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <trini@konsulko.com>
5 years agoMerge tag 'for-master-20181216' of git://git.denx.de/u-boot-rockchip
Tom Rini [Mon, 17 Dec 2018 01:49:46 +0000 (20:49 -0500)]
Merge tag 'for-master-20181216' of git://git.denx.de/u-boot-rockchip

Improvements and fixes or u-boot-rockchip:
- new board: adds rv1108-elgin-r1 board support
- rk3288-evb: dts: remove 'vmmc' from emmc node
- rk3399-puma: dts: remove obsolete DTS node 'vcc5v0_host'

5 years agoARM: rockchip: Add rv1108-elgin-r1 board support
Otavio Salvador [Sat, 1 Dec 2018 14:05:54 +0000 (12:05 -0200)]
ARM: rockchip: Add rv1108-elgin-r1 board support

Add the initial support for Elgin R1 board, which is based on the
RV1108 SoC and has the following features currently supported in
U-Boot:

- UART
- eMMC
- USB

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Sat, 15 Dec 2018 22:49:49 +0000 (17:49 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

- Second half of the USB Gadget DM conversion

5 years agoMerge branch '2018-12-15-master-imports'
Tom Rini [Sat, 15 Dec 2018 22:47:28 +0000 (17:47 -0500)]
Merge branch '2018-12-15-master-imports'

- Introduce tools-only build for host tools
- Bugfixes to poplar, syscon and the hashtable, a tee return code
- Fix a warning on gcc-8 by reworking part of mtk_image to be not unsafe
  wrt strings.
- serial_stm32 reset support

5 years agorockchip: rk3288-evb: dts: remove 'vmmc' from emmc node
Kever Yang [Fri, 14 Dec 2018 01:37:12 +0000 (09:37 +0800)]
rockchip: rk3288-evb: dts: remove 'vmmc' from emmc node

This is a sync with kernel mainline dts.

The U-Boot eMMC does not need to care about the power for Rockchip
SoCs, because if the board is using eMMC, the power will default on
(for bootrom), so the 'vmmc', 'vqmmc' is only useful for SD in U-Boot.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agorockchip: rk3399-puma: Remove obsolete DTS node 'vcc5v0_host'.
Christoph Muellner [Wed, 12 Dec 2018 00:32:59 +0000 (01:32 +0100)]
rockchip: rk3399-puma: Remove obsolete DTS node 'vcc5v0_host'.

vcc5v0_host and usbhub_enable share gpio4 RK_PA3,
which is a problem during probing (the second probe
will trigger a -EBUSY, when trying to get the gpio handle).

An analysis of the situation shows, that both regulators
are actually describing the same supply.

This patch removes the (currenlty not successful probing)
regulator vcc5v0_host from the DTS and adds the pinctrl-*
setting to usbhub_enable.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Phiilipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agosyscon: update syscon_node_to_regmap to use the DM functions
Patrick Delaunay [Wed, 31 Oct 2018 15:49:03 +0000 (16:49 +0100)]
syscon: update syscon_node_to_regmap to use the DM functions

+ Update the function syscon_node_to_regmap() to force bound on
  syscon uclass and directly use the list of device from DM.
+ Remove the static list syscon_list.

This patch avoid issue (crash) when syscon_node_to_regmap() is called
before and after reallocation (list content is invalid).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agotools: mtk_image: replace strncpy(d, s, sizeof(d)) with snprintf()
Andy Shevchenko [Tue, 11 Dec 2018 14:41:43 +0000 (16:41 +0200)]
tools: mtk_image: replace strncpy(d, s, sizeof(d)) with snprintf()

Starting from version 8 the GCC, i.e. C compiler, starts complaining about
possible '\0' terminator loss or, as in this case, garbage copy.

In function ‘mtk_image_set_gen_header’,
    inlined from ‘mtk_image_set_header’ at tools/mtk_image.c:733:3:
tools/mtk_image.c:659:2: warning: ‘strncpy’ specified bound 12 equals destination size [-Wstringop-truncation]
  strncpy(hdr->boot.name, bootname, sizeof(hdr->boot.name));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘mtk_brom_parse_imagename’,
    inlined from ‘mtk_image_check_params’ at tools/mtk_image.c:388:9:
tools/mtk_image.c:325:5: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
     strncpy(lk_name, val, sizeof(lk_name));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Replace it with snprintf() to tell compiler how much room we have in the
destination buffer for source string.

Fixes: 3b975a147c3c ("tools: MediaTek: add MTK boot header generation to mkimage")
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Weijie Gao <weijie.gao@mediatek.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
5 years agoserial: serial_stm32: Add reset support
Patrice Chotard [Tue, 4 Dec 2018 13:11:36 +0000 (14:11 +0100)]
serial: serial_stm32: Add reset support

In some cases, UART is configured by early boot stage.
To be sure of the initial state of UART and to avoid
spurious chars on console, reset the serial block before
configuring it.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agopoplar: fix boot failure caused by serial driver change
Shawn Guo [Wed, 12 Dec 2018 07:24:44 +0000 (15:24 +0800)]
poplar: fix boot failure caused by serial driver change

Commit 4687919684e0 ("serial: Remove DM_FLAG_PRE_RELOC flag in various
drivers") essentially drops flag DM_FLAG_PRE_RELOC from serial_pl01x
driver for Poplar platform, because the platform falls into the
following strategy category made by the commit.

  Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for
  drivers that support both statically declared devices and
  configuration from device tree

Before the commit lands, Poplar platform works by statically declaring
pl011 serial device via U_BOOT_DEVICE() with DM_FLAG_PRE_RELOC flag set
in the driver.  But since Poplar also supports device configuration from
device tree, the commit practically drops the flag for Poplar, and hence
breaks the platform from booting.

This patch changes platform code and device tree to initiate pl011
serial device from device tree rather than static declaration, so that
above strategy about DM_FLAG_PRE_RELOC applies to Poplar, and therefore
the reported boot failure gets fixed.

Reported-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Fixes: 4687919684e0 ("serial: Remove DM_FLAG_PRE_RELOC flag in various drivers")
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Tested-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agopoplar: add a co-maintainer for poplar board
Shawn Guo [Thu, 13 Dec 2018 09:10:43 +0000 (17:10 +0800)]
poplar: add a co-maintainer for poplar board

Add myself as co-maintainer for poplar board, as I'm actively working
on the board.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
5 years agotools: add a generic config for native tools building
Otavio Salvador [Sat, 8 Dec 2018 00:00:41 +0000 (19:00 -0500)]
tools: add a generic config for native tools building

The motivation for this is to allow distributions to distribute all
possible tools in a generic way, avoiding the need of specific tools
building for each machine.

Especially on OpenEmbedded / Yocto Project ecosystem, it is very
common each BSP to end providing their specific tools when they need
to generate images for some SoC (e.g MX23 / MX28 in meta-freescale
case).

Using this, we can package the tools doing:

$: make tools-only_defconfig
$: make tools-only

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
[trini: Add MAINTAINERS entry for myself, add to .travis.yml, make
U-Boot itself buildable to not trip up other frameworks]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agotest: Only descend into test/ when CONFIG_UNIT_TEST is enabled
Tom Rini [Sat, 8 Dec 2018 00:00:40 +0000 (19:00 -0500)]
test: Only descend into test/ when CONFIG_UNIT_TEST is enabled

The contents of the test subdirectories only make sense when we have
CONFIG_UNIT_TEST set.  We will otherwise attempt to build code on for
example sandbox that needs CONFIG_UNIT_TEST otherwise and rather than
complicate the Makefiles simply leave them out when we can.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agocmd: Move the "dm" command from test/dm/ to cmd/
Tom Rini [Sat, 8 Dec 2018 00:00:39 +0000 (19:00 -0500)]
cmd: Move the "dm" command from test/dm/ to cmd/

The "dm" command under CONFIG_CMD_DM should live under cmd/ rather than
test/dm/ so move it.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agohashtable: fix length calculation in hexport_r
AKASHI Takahiro [Fri, 14 Dec 2018 09:42:51 +0000 (18:42 +0900)]
hashtable: fix length calculation in hexport_r

The commit below incorrectly fixed hexport_r();
 > size = totlen + 1;
One extra byte is necessary to NULL-terminate a whole buffer, "resp."

Fixes: f1b20acb4a03 ("hashtable: Fix length calculation in hexport_r")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
5 years agotee: change return code for REE FS supplicant cmd
Igor Opaniuk [Tue, 4 Dec 2018 12:37:19 +0000 (14:37 +0200)]
tee: change return code for REE FS supplicant cmd

If OP-TEE core is compiled with support of REE FS and RPMB
at the same time (CFG_RPMB_FS ?= y; CFG_RPMB_FS ?= y), and persistent
storage API is used with TEE_STORAGE_PRIVATE storage id, it will
lead to TA panic.

E/TC:? 0 TA panicked with code 0xffff0009
.....
E/TC:? 0 Call stack:
E/TC:? 0  0x000000004002f2f8 TEE_OpenPersistentObject at
lib/libutee/tee_api_objects.c:422

In this particular case TEE_ERROR_STORAGE_NOT_AVAILABLE is more suitable
than TEE_ERROR_NOT_IMPLEMENTED, as it provides to a TA a possibility
to handle this error code [1].

>From GPD TEE Internal Core specification [2]:
TEE_ERROR_STORAGE_NOT_AVAILABLE - if the persistent object is stored in a
storage area which is currently inaccessible. It may be associated with
the device but unplugged, busy, or inaccessible for some other reason.

[1]: https://github.com/OP-TEE/optee_os/blob/94db01ef448d1e552161c2d861d57a5f8bda0cc0/lib/libutee/tee_api_objects.c#L419
[2]: https://globalplatform.org/wp-content/uploads/2018/06/GPD_TEE_Internal_Core_API_Specification_v1.1.2.50_PublicReview.pdf

Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
5 years agoMerge tag 'dm-pull-14dec18' of git://git.denx.de/u-boot-dm
Tom Rini [Fri, 14 Dec 2018 19:18:47 +0000 (14:18 -0500)]
Merge tag 'dm-pull-14dec18' of git://git.denx.de/u-boot-dm

Complete conversion of sound to driver model

5 years agousb: musb-new: sunxi: Fix null pointer access
Stefan Mavrodiev [Wed, 5 Dec 2018 12:49:44 +0000 (14:49 +0200)]
usb: musb-new: sunxi: Fix null pointer access

When the device is in peripheral mode there is no
struct usb_bus_priv allocated pointer, as the uclass driver
("usb_dev_generic") doesn't call per_device_auto_alloc_size.

This results in writing to the internal SDRAM at
priv->desc_before_addr = true;

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
5 years agousb: composite: Fix max packet size for USB3.0
Siva Durga Prasad Paladugu [Thu, 13 Dec 2018 09:46:36 +0000 (15:16 +0530)]
usb: composite: Fix max packet size for USB3.0

For USB3.0, the max packetsize for GET_DESCRIPTOR should be
sent as exponent value for 2. This means for 512, max packet
size should be filled with 9(2^9=512). Also, fill the USB
version field with 3.0 if speed is negotiated to Superspeed.
This fixes the issue of DFU gadget download failure with
superspeed. Without this patch, the max packet size is
overflowed to zero as the bMaxPacketsize is of u8 and hence
host is not able to detect this device.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoconfigs: am335x_boneblack_vboot: enable DM_USB and RNDIS boot in SPl
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:31:00 +0000 (11:31 +0100)]
configs: am335x_boneblack_vboot: enable DM_USB and RNDIS boot in SPl

Enable DM_USB and DM_USB_GADGET for this platform. Also enable RNDIS boot
support (SPL load u-boot over USB RNDIS).
This is an example of how to use DM_USB on a am335x-based board.
A subsequent series will take this a step further and modify more
defconfigs.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: am335x_evm: Do not disable DM_USB in SPL
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:59 +0000 (11:30 +0100)]
configs: am335x_evm: Do not disable DM_USB in SPL

DM_USB is now supported in the SPL. Do not undef it
Besides to support DM_USB in SPL, one now has to use SPL_DM_USB

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoarm: am33xx: Register USB controllers if DM_USB is used but not OF_CONTROL
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:58 +0000 (11:30 +0100)]
arm: am33xx: Register USB controllers if DM_USB is used but not OF_CONTROL

When DM_USB is used, either the USB controllers are bound when the DTB
is parsed (when OF_CONTROL is enabled) or they are bound using the
U_BOOT_DEVICES() macro.
In the later case, the platform data is passed in a struct ti_musb_platdata
because it cannot be read from the DTB.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agousb: musb-new: Add support for DM_USB
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:57 +0000 (11:30 +0100)]
usb: musb-new: Add support for DM_USB

Enable DM for USB peripheral in the musb-new driver.
Also make sure that the driver can be used in the SPL.
This implies that:
* the driver must work with and without the OF_CONTROL option. That
in turn, implies that the platform data can be passed in a struct
ti_musb_platdata or be read from the dtb
* usb.o is linked in the SPL if host support is enabled

Another change is that the driver does not fail to bind (and stop the boot
process) if one of the child driver does not bind. Reporting the error is
enough. This kind of error would appear if the port is configured in the
DTS but the driver is not activated in the config.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agousb: musb-new: Allow the diver not to use the set_phy_power() callback
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:56 +0000 (11:30 +0100)]
usb: musb-new: Allow the diver not to use the set_phy_power() callback

The set_phy_power() callback is part of struct omap_musb_board_data. This
structure is part of the platform data passed to the musb-new driver. This
does not really fit with the Driver Model, so allow not to use struct
omap_musb_board_data to turn the phy on or off.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: am43xx: Enable RNDIS support in SPL
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:55 +0000 (11:30 +0100)]
configs: am43xx: Enable RNDIS support in SPL

The AM43xx SOCs have the ability to download the SPl through USB (RNDIS).
Adding support for RNDIS in SPL allows to also download u-boot through USB.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: am43xx_evm: Enable DM_USB and DM_USB_GADGET
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:54 +0000 (11:30 +0100)]
configs: am43xx_evm: Enable DM_USB and DM_USB_GADGET

Enable DM_USB and DM_USB_GADGET for AM43xx EVM boards.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodts: am4372: Enable USB1 in SPL
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:53 +0000 (11:30 +0100)]
dts: am4372: Enable USB1 in SPL

USB1 can be used by the romboot on all am4372 platforms to download a
firmware (SPL in our case).
It makes sense to enable USB1 in the SPL to download u-boot.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodts: Add a u-boot specific dtsi file for the am4372
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:52 +0000 (11:30 +0100)]
dts: Add a u-boot specific dtsi file for the am4372

This file is used to override the values found in am4372.dtsi
Use it to fix the "compatible" options for the controllers used
to support the USB (parent bus and syscons).

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoboard: ti: am43xx: turn on USB clocks
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:51 +0000 (11:30 +0100)]
board: ti: am43xx: turn on USB clocks

Enable USB clocks in late init stage to support ports under DM_USB.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodwc3-generic: Add support for the am437x
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:50 +0000 (11:30 +0100)]
dwc3-generic: Add support for the am437x

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agophy: omap_usb2: Add support for am437x
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:49 +0000 (11:30 +0100)]
phy: omap_usb2: Add support for am437x

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agospl: net: dm: usb: bind the gadget before attempting to load the image
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:48 +0000 (11:30 +0100)]
spl: net: dm: usb: bind the gadget before attempting to load the image

If DM_USB_GADGET is used, the usb ethernet gadget driver must be bound to a
controller before the image can be downloaded over the network.
In u-boot this can be done with the bind command. In SPL it must be done
programmatically.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agospl: drivers: Link usb common library to SPL if USB gadget is enabled
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:47 +0000 (11:30 +0100)]
spl: drivers: Link usb common library to SPL if USB gadget is enabled

Some drivers might need to access common USB functions such as
usb_get_maximum_speed() or usb_get_dr_mode().

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: k2g_evm: Enable DFU on K2G EVM
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:13:01 +0000 (11:13 +0100)]
configs: k2g_evm: Enable DFU on K2G EVM

The K2G evm uses the generic DWC3 driver. DFU can thus be enabled.
Enabling DFU for easier firmware update.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agousb: host: replace xhci-keystone driver by the generic dwc3 driver
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:13:00 +0000 (11:13 +0100)]
usb: host: replace xhci-keystone driver by the generic dwc3 driver

The keystone platforms can use the generic DC3 driver. Removing the
keystone-spcecific xchi driver and add the configuration options to enable
the generic DWC3 driver on all K2 platforms.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoPHY: Add phy driver for the keystone USB PHY
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:12:59 +0000 (11:12 +0100)]
PHY: Add phy driver for the keystone USB PHY

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoARM: dts: k2g-evm: enable USB0 and USB1
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:12:58 +0000 (11:12 +0100)]
ARM: dts: k2g-evm: enable USB0 and USB1

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoboard: ks2_evm: Enable the USB clocks if DM_USB is used
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:12:57 +0000 (11:12 +0100)]
board: ks2_evm: Enable the USB clocks if DM_USB is used

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agousb: dwc3-generic: make it compatible with "ti, keystone-dwc3"
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:12:56 +0000 (11:12 +0100)]
usb: dwc3-generic: make it compatible with "ti, keystone-dwc3"

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agousb: musb: Remove legacy CONFIG_USB_DA8XX
Adam Ford [Wed, 12 Dec 2018 14:17:41 +0000 (08:17 -0600)]
usb: musb: Remove legacy CONFIG_USB_DA8XX

There don't appear to be any boards enabling CONFIG_USB_DA8XX,
and there is a newer version of the MUSB driver, so let's remove
the legacy version of it.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agousb: musb: Remove Legacy CONFIG_USB_DAVINCI
Adam Ford [Wed, 12 Dec 2018 14:17:22 +0000 (08:17 -0600)]
usb: musb: Remove Legacy CONFIG_USB_DAVINCI

This patch removes CONFIG_USB_DAVINCI.  It's a legacy option
that isn't defined anywhere, and there is a newer MUSB driver.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agousb: Don't enable CONFIG_SPL_DM_USB for non-DM SPL
Martyn Welch [Mon, 10 Dec 2018 11:05:16 +0000 (11:05 +0000)]
usb: Don't enable CONFIG_SPL_DM_USB for non-DM SPL

When CONFIG_SPL_DM_USB was added, it was added defaulted on without
protection to ensure it didn't get set for non-DM SPL builds.

This leads to unexpected and confusing failures when building a DM based
U-Boot but with a non-DM SPL, as the defconfig is unlikely to have
CONFIG_SPL_DM_USB actively disabled.

Tweak the Kconfig to not enable this setting unless CONFIG_SPL_DM is set.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
5 years agousb: composite: Move bitmap related operations to ./include/linux/bitmap.h
Lukasz Majewski [Fri, 23 Nov 2018 16:36:19 +0000 (17:36 +0100)]
usb: composite: Move bitmap related operations to ./include/linux/bitmap.h

The BITMAP related operations can now be moved to ./include/linux/bitmap.h
file to mimic the Linux kernel directory tree.

This change also allows to remove the lin_gadget_compat.h header file
(which is a legacy code only for composite U-boot layer).
It was also possible to remove #includes from several USB gadget drivers.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
5 years agousb: gadget: f_sdp: Provide filesize env variable for downloaded images
Petr Štetiar [Fri, 23 Nov 2018 13:37:52 +0000 (14:37 +0100)]
usb: gadget: f_sdp: Provide filesize env variable for downloaded images

Currently it's not possible to get filesize of downloaded images and
it's impossible to automate some tasks in scripts. So this patch adds
`filesize` environment variable with size (as hex number in bytes) of
the last successfully downloaded file via `sdp` command.

Cc: Lukasz Majewski <lukma@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
5 years agodm: sound: Use the correct number of channels for sound
Simon Glass [Mon, 10 Dec 2018 17:37:51 +0000 (10:37 -0700)]
dm: sound: Use the correct number of channels for sound

At present the 'beep' sound generates a waveform for only one channel even
if two are being used. This means that the beep is twice the frequency it
should be. Correct this by making it a parameter.

The fix in a previous commit was correct for sandbox but not for other
boards.

Fixes: 03f11e87a8 ("sound: Correct data output in sound_create_square_wave()")
Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sandbox: Allow selection of sample rate and channels
Simon Glass [Mon, 10 Dec 2018 17:37:50 +0000 (10:37 -0700)]
dm: sandbox: Allow selection of sample rate and channels

At present these parameters are hard-coded in the sdl interface code.
Allow them to be specified by the driver instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: max98095: Tidy up error codes
Simon Glass [Mon, 10 Dec 2018 17:37:49 +0000 (10:37 -0700)]
dm: sound: max98095: Tidy up error codes

Return a valid error code instead of -1.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Fix license headers
Simon Glass [Mon, 10 Dec 2018 17:37:48 +0000 (10:37 -0700)]
dm: sound: Fix license headers

Fix a few files whos license headers were not converted to SPDX.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Complete migration to driver model
Simon Glass [Mon, 10 Dec 2018 17:37:47 +0000 (10:37 -0700)]
dm: sound: Complete migration to driver model

All users of sound are converted to use driver model. Drop the old code
and the CONFIG_DM_SOUND option.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: exynos: Drop CONFIG_DM_I2C_COMPAT
Simon Glass [Mon, 10 Dec 2018 17:37:46 +0000 (10:37 -0700)]
dm: exynos: Drop CONFIG_DM_I2C_COMPAT

This option is not needed anymore for all exynos boards except arndale.
Update the config.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sandbox: sound: Convert to use driver model
Simon Glass [Mon, 10 Dec 2018 17:37:45 +0000 (10:37 -0700)]
dm: sandbox: sound: Convert to use driver model

Update sandbox's device tree and config to use driver model for sound. Use
the double buffer for sound output so that we don't need to wait for the
sound to complete before returning.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: exynos: sound: Convert to use driver model
Simon Glass [Mon, 10 Dec 2018 17:37:44 +0000 (10:37 -0700)]
dm: exynos: sound: Convert to use driver model

Update snow's device tree and config to use driver model for sound. Also
update the others as best we can.

Spring does not appear to have audio support in the kernel. The smdk5250
and smdk5420 boards use a wolfson codec which I cannot test with. So the
only boards that is tested and known to work are snow, pit and pi.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: exynos: Add support for max98090
Simon Glass [Mon, 10 Dec 2018 17:37:43 +0000 (10:37 -0700)]
dm: sound: exynos: Add support for max98090

Add support for this new codec which is used by pit.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Move common code out of maxim98095
Simon Glass [Mon, 10 Dec 2018 17:37:42 +0000 (10:37 -0700)]
dm: sound: Move common code out of maxim98095

The register-access code is useful for any maxim codec. Move it out into
its own file.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoexynos: Add support for exynos5420 i2s pinmux
Simon Glass [Mon, 10 Dec 2018 17:37:41 +0000 (10:37 -0700)]
exynos: Add support for exynos5420 i2s pinmux

Allow setting the i2s pinmux correctly on exyno5420 so that i2c can be
used on that SoC. Also rename EXYNOS_AUDSS to something consistent with
other naming.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoexynos: Add proid_is_exynos542x() for common 542x
Simon Glass [Mon, 10 Dec 2018 17:37:40 +0000 (10:37 -0700)]
exynos: Add proid_is_exynos542x() for common 542x

Add a convenience function for any Exynos 542x chip.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Add conversion to driver model
Simon Glass [Mon, 10 Dec 2018 17:37:39 +0000 (10:37 -0700)]
dm: sound: Add conversion to driver model

Move the existing hardware drivers over to use driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Start i2c IDs from 0
Simon Glass [Mon, 10 Dec 2018 17:37:38 +0000 (10:37 -0700)]
dm: sound: Start i2c IDs from 0

The current ID enums start from 1 but there does not seem to be any reason
that they cannot start with 0. Adjust the code to avoid the +1 in
codec_init().

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: core: Add a function to read into a unsigned int
Simon Glass [Mon, 10 Dec 2018 17:37:37 +0000 (10:37 -0700)]
dm: core: Add a function to read into a unsigned int

The current dev_read...() functions use s32 and u32 which are convenient
for device tree but not so useful for normal code, which often wants to
use normal integers for values.

Add a helper which supports returning an unsigned int. Also add signed
versions of the unsigned readers.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Create a uclass for sound
Simon Glass [Mon, 10 Dec 2018 17:37:36 +0000 (10:37 -0700)]
dm: sound: Create a uclass for sound

The sound driver pulls together the audio codec and i2s drivers in order
to actually make sounds. It supports setup() and play() methods. The
sound_find_codec_i2s() function allows locating the linked codec and i2s
devices. They can be referred to from uclass-private data.

Add a uclass and a test for sound.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sandbox: Update sound to use two buffers
Simon Glass [Mon, 10 Dec 2018 17:37:35 +0000 (10:37 -0700)]
dm: sandbox: Update sound to use two buffers

At present we use a single buffer for sound which means we cannot be
playing one sound while queueing up the next. This wouldn't matter except
that a long sound (more than a second) has to be created as a single
buffer, thus using a lot of memory. To better mimic what real sound
drivers do, add support for double buffering in sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Create a uclass for i2s
Simon Glass [Mon, 10 Dec 2018 17:37:34 +0000 (10:37 -0700)]
dm: sound: Create a uclass for i2s

The i2s bus is commonly used with audio codecs. It provides a way to
stream digital data sychronously in both directions. U-Boot only supports
audio output, so this uclass is very simple, with a single tx_data()
method.

Add a uclass and a test for i2s.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Create a uclass for audio codecs
Simon Glass [Mon, 10 Dec 2018 17:37:33 +0000 (10:37 -0700)]
dm: sound: Create a uclass for audio codecs

An audio codec provides a way to convert digital data to sound and vice
versa. Add a simple uclass which just supports setting the parameters for
the codec.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Rename samsung_i2s_priv to i2s_uc_priv
Simon Glass [Mon, 10 Dec 2018 17:37:32 +0000 (10:37 -0700)]
dm: sound: Rename samsung_i2s_priv to i2s_uc_priv

This structure contains information that is likely needed by any i2s
driver so it seems useful to attach it to the (forthcoming) i2c uclass.
For now, just rename it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Create an option to use driver model for sound
Simon Glass [Mon, 10 Dec 2018 17:37:31 +0000 (10:37 -0700)]
dm: sound: Create an option to use driver model for sound

The U-Boot sound system provides basic support for beeping. At present it
does not use driver model, but it needs to be converted. Add an option to
enable driver model for sound. For now it is not connected to anything.
Future work will add drivers which use this option. It will then be
removed once everything is converted.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: exynos: Correct codec bus addresses
Simon Glass [Mon, 10 Dec 2018 17:37:30 +0000 (10:37 -0700)]
dm: sound: exynos: Correct codec bus addresses

For snow the codec is at address 0x11 on the i2c bus, in 7-bit format.
The device tree and code are in 8-bit format (i.e. shifted left one bit).
Fix both. Fix pit in a similar way.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Fix up header ordering
Simon Glass [Mon, 3 Dec 2018 11:37:34 +0000 (04:37 -0700)]
dm: sound: Fix up header ordering

Tidy up the ordering of header files in the sounds files.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: wm8994: Drop wm8994_i2c_init()
Simon Glass [Mon, 3 Dec 2018 11:37:33 +0000 (04:37 -0700)]
dm: sound: wm8994: Drop wm8994_i2c_init()

This function has only one line in it. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: max98095: Drop g_codec_info and g_max98095_info
Simon Glass [Mon, 3 Dec 2018 11:37:32 +0000 (04:37 -0700)]
dm: sound: max98095: Drop g_codec_info and g_max98095_info

These are only used in two functions so can be made local.

Also change the first argument of max98095_do_init() to suit.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: wm8994: Drop g_codec_info and g_wm8994_info
Simon Glass [Mon, 3 Dec 2018 11:37:31 +0000 (04:37 -0700)]
dm: sound: wm8994: Drop g_codec_info and g_wm8994_info

These are only used in two functions so can be made local.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: max98095: Drop global i2c-address variable
Simon Glass [Mon, 3 Dec 2018 11:37:30 +0000 (04:37 -0700)]
dm: sound: max98095: Drop global i2c-address variable

We can put this in the private structure and avoid a global.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: wm8994: Drop global i2c-address variable
Simon Glass [Mon, 3 Dec 2018 11:37:29 +0000 (04:37 -0700)]
dm: sound: wm8994: Drop global i2c-address variable

We can put this in the private structure and avoid a global.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: max98095: Split out interface setup code
Simon Glass [Mon, 3 Dec 2018 11:37:28 +0000 (04:37 -0700)]
dm: sound: max98095: Split out interface setup code

With driver model we want to do a minimal probe when the device is probed
and then set up the codec interface later when a sound is actully played.

Split this setup code out into its own function to help with this.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: wm899c: Split out interface setup code
Simon Glass [Mon, 3 Dec 2018 11:37:27 +0000 (04:37 -0700)]
dm: sound: wm899c: Split out interface setup code

With driver model we want to do a minimal probe when the device is probed
and then set up the codec interface later when a sound is actully played.

Split this setup code out into its own function to help with this.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: wm8994: Create a new common init function
Simon Glass [Mon, 3 Dec 2018 11:37:26 +0000 (04:37 -0700)]
dm: sound: wm8994: Create a new common init function

With driver model we cannot pass in the global struct, but instead want
to pass in the driver-private data. Split some of the code out of
wm8994_init() to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: max98095: Pass private data to internal functions
Simon Glass [Mon, 3 Dec 2018 11:37:25 +0000 (04:37 -0700)]
dm: sound: max98095: Pass private data to internal functions

At present the driver-private data is global. To allow this code to be
used with driver model, change it to pass the data down to each function.
Use the name 'priv' consistently throughout.

Also rename max98095_update_bits() to max98095_bic_or() which is more
descriptive and shorter, thus breaking fewer lines with the parameter
addition.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: wm8994: Pass private data to internal functions
Simon Glass [Mon, 3 Dec 2018 11:37:24 +0000 (04:37 -0700)]
dm: sound: wm8994: Pass private data to internal functions

At present the driver-private data is global. To allow this code to be
used with driver model, change it to pass the data down to each function.
Use the name 'priv' consistently throughout.

Also rename wm8994_update_bits() to wm8994_bic_or() which is more
descriptive and shorter, thus breaking fewer lines with the parameter
addition.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Drop codec_type
Simon Glass [Mon, 3 Dec 2018 11:37:23 +0000 (04:37 -0700)]
dm: sound: Drop codec_type

This field is not really used. It is always set to a known value. Drop it
to simplify the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: samsung: Rename i2stx_info to samsung_i2s_priv
Simon Glass [Mon, 3 Dec 2018 11:37:22 +0000 (04:37 -0700)]
dm: sound: samsung: Rename i2stx_info to samsung_i2s_priv

This struct is only used by the Samsung I2C driver and should move into
that driver. For now, rename it so it is clear that is driver-private
info.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Drop unused pre-device-tree code
Simon Glass [Mon, 3 Dec 2018 11:37:21 +0000 (04:37 -0700)]
dm: sound: Drop unused pre-device-tree code

CONFIG_OF_CONTROL is enabled for all boards that use sound, so remove the
dead code.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Rename en_sound_codec to sound_codec
Simon Glass [Mon, 3 Dec 2018 11:37:20 +0000 (04:37 -0700)]
dm: sound: Rename en_sound_codec to sound_codec

The en_ prefix is confusing and not needed. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: samsung: Make local function static
Simon Glass [Mon, 3 Dec 2018 11:37:19 +0000 (04:37 -0700)]
dm: sound: samsung: Make local function static

Several functions are not exported from this file. Make them static so
this is clear.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosnow: Expand U-Boot size
Simon Glass [Mon, 3 Dec 2018 11:37:18 +0000 (04:37 -0700)]
snow: Expand U-Boot size

Now that we have EFI, etc. enabled, U-Boot is larger than it was. Expand
the region allocated for it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: Increase the pre-relocation memory
Simon Glass [Mon, 3 Dec 2018 11:37:17 +0000 (04:37 -0700)]
sandbox: Increase the pre-relocation memory

This is close to full now, so increase it to avoid problems with adding
more devices.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Thu, 13 Dec 2018 14:36:55 +0000 (09:36 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

5 years agoMerge branch '2018-12-12-master-imports'
Tom Rini [Thu, 13 Dec 2018 00:45:07 +0000 (19:45 -0500)]
Merge branch '2018-12-12-master-imports'

- Various small TI platform updates
- Two unit test fixes
- qemu-arm updates

5 years agoam3517_evm: Use ttyS2 instead of ttyO2
Adam Ford [Mon, 10 Dec 2018 20:56:36 +0000 (14:56 -0600)]
am3517_evm: Use ttyS2 instead of ttyO2

The serial driver in the kernel moved from ttyOx to ttySx a while
ago.  This patch updates the console parameter to align with the
kernel change.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agofirmware: psci: introduce SPL_ARM_PSCI_FW
Peng Fan [Sun, 9 Dec 2018 12:45:45 +0000 (12:45 +0000)]
firmware: psci: introduce SPL_ARM_PSCI_FW

Introduce a new macro SPL_ARM_PSCI_FW

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
5 years agotest: overlay: NULL passed as fdt
Heinrich Schuchardt [Sat, 8 Dec 2018 08:53:05 +0000 (09:53 +0100)]
test: overlay: NULL passed as fdt

The uts created in do_ut_overlay() is not the one used in
cmd_ut_category(). Currently all tests are therefore called with
uts->priv = NULL and fail.

Using a static variable is the easiest fix here.

Fixes: e93232e15ec9 ("test: overlay: Use cmd_ut_category()")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoARM: omap3logic: Remove legacy USB code in favor of DM_USB
Adam Ford [Fri, 7 Dec 2018 23:28:03 +0000 (17:28 -0600)]
ARM: omap3logic: Remove legacy USB code in favor of DM_USB

With the defconfig options enabling DM_USB, the legacy code
can be removed.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: omap3_logic/omap35_logic: Move to DM_USB
Adam Ford [Fri, 7 Dec 2018 20:38:33 +0000 (14:38 -0600)]
ARM: omap3_logic/omap35_logic: Move to DM_USB

The existing config is setup as a gadget but it doesn't use
DM_USB.  This patch converts all boards to DM_USB, but as host.

As host, it is able to mount USB drives and browse them.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoarm: am335x-pdu001: Move from embedded to separate DTB
Felix Brack [Fri, 7 Dec 2018 14:01:55 +0000 (15:01 +0100)]
arm: am335x-pdu001: Move from embedded to separate DTB

There is no need for an embedded device tree for this board so let the
build process generate a separate u-boot.dtb file instead.

Signed-off-by: Felix Brack <fb@ltec.ch>
5 years agospl: fix build failure with !CONFIG_SPL_PCI_SUPPORT
Sekhar Nori [Thu, 6 Dec 2018 10:10:08 +0000 (15:40 +0530)]
spl: fix build failure with !CONFIG_SPL_PCI_SUPPORT

Building U-Boot with CONFIG_PCI and CONFIG_DM_PCI enabled, but
CONFIG_SPL_PCI_SUPPORT disabled, results in following linker
error:

lib/built-in.o: In function `fdtdec_get_pci_bar32':
lib/fdtdec.c:305: undefined reference to `dm_pci_read_bar32'
fdtdec.c:305:(.text.fdtdec_get_pci_bar32+0x24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `dm_pci_read_bar32'

This is because reference to dm_pci_read_bar32() remains in lib/fdtdec.c
while SPL build does not descend into drivers/pci directory in
drivers/Makefile if CONFIG_SPL_PCI_SUPPORT is not enabled.

Fix this by applying appropriate #define guards in lib/fdtdec.c.
It looks like ns16550.c has the same problem, so fixed that too.

To simplify this, CONFIG_SPL_PCI_SUPPORT is renamed to CONFIG_SPL_PCI
(enables use of CONFIG_IS_ENABLED() macro).

Suggested-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>