platform/kernel/u-boot.git
3 years agobcmgenet: fix DMA buffer management 61/245361/1 accepted/tizen/6.0/unified/20201030.105045 accepted/tizen/6.0/unified/hotfix/20201102.235414 accepted/tizen/unified/20201008.043022 submit/tizen/20201008.021146 submit/tizen_6.0/20201029.205501 submit/tizen_6.0_hotfix/20201102.192901 submit/tizen_6.0_hotfix/20201103.115101 tizen_6.0.m2_release
Jason Wessel [Fri, 17 Jul 2020 13:31:59 +0000 (06:31 -0700)]
bcmgenet: fix DMA buffer management

This commit fixes a serious issue occurring when several network
commands are run on a raspberry pi 4 board: for instance a "dhcp"
command and then one or several "tftp" commands. In this case,
packet recv callbacks were called several times on the same packets,
and send function was failing most of the time.

note: if the boot procedure is made of a single network
command, the issue is not visible.

The issue is related to management of the packet ring buffers
(producer / consumer) and DMA.
Each time a packet is received, the ethernet device stores it
in the buffer and increments an index called RDMA_PROD_INDEX.
Each time the driver outputs a received packet, it increments
another index called RDMA_CONS_INDEX.

Between each pair of network commands, as part of the driver
'start' function, previous code tried to reset both RDMA_CONS_INDEX
and RDMA_PROD_INDEX to 0. But RDMA_PROD_INDEX cannot be written from
driver side, thus its value was actually not updated, and only
RDMA_CONS_INDEX was reset to 0. This was resulting in a major
synchronization issue between the driver and the device. Most
visible behavior was that the driver seemed to receive again the
packets from the previous commands (e.g. DHCP response packets
"received" again when performing the first TFTP command).

This fix consists in setting RDMA_CONS_INDEX to the same
value as RDMA_PROD_INDEX, when resetting the driver.

The same kind of fix was needed on the TX side, and a few variables
had to be reset accordingly (c_index, tx_index, rx_index).

The rx_index and tx_index have only 256 entries so the bottom 8 bits
must be masked off.

Originated-by: Etienne Dublé <etienne.duble@imag.fr>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Tested-by: Petr Tesarik <ptesarik@suse.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia7c66c3957f1c6b5f104bf621ddef87402921da6
[backport of mainline commit ac458dc823de95e05e433d7645b960f8c6088f55]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
3 years agorpi: perform xhci firmware upload only once 19/243819/1 accepted/tizen/unified/20200922.053354 submit/tizen/20200922.021559
Marek Szyprowski [Thu, 10 Sep 2020 08:31:09 +0000 (10:31 +0200)]
rpi: perform xhci firmware upload only once

This fixes usb stack initialization after calling "usb stop".

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Icb3f3478c02b17c4e80cd924685492dc373b5c1f

3 years agousb: xhci: Load Raspberry Pi 4 VL805's firmware 31/240331/2
Nicolas Saenz Julienne [Tue, 5 May 2020 16:26:07 +0000 (18:26 +0200)]
usb: xhci: Load Raspberry Pi 4 VL805's firmware

When needed, RPi4's co-processor (called VideoCore) has to be instructed
to load VL805's firmware (the chip providing xHCI support). VideCore's
firmware expects the board's PCIe bus to be already configured in order
for it to load the xHCI chip firmware. So we have to make sure this
happens in between the PCIe configuration and xHCI startup.

Introduce a callback in xhci_pci_probe() to run this platform specific
routine.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
[mszyprow: backport of https://patchwork.ozlabs.org/project/uboot/list/?series=174860&state=%2A&archive=both
 the final mainline patch depends on DTS changes not present in vendor tree]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I1391806cae261d1ce22137e1a8baf5e261cb865a

3 years agoarm: rpi: Add function to trigger VL805's firmware load 30/240330/2
Marek Szyprowski [Wed, 5 Aug 2020 10:03:14 +0000 (12:03 +0200)]
arm: rpi: Add function to trigger VL805's firmware load

On the Raspberry Pi 4, after a PCI reset, VL805's (a xHCI chip) firmware
may either be loaded directly from an EEPROM or, if not present, by the
SoC's VideCore (the SoC's co-processor). Introduce the function that
informs VideCore that VL805 may need its firmware loaded.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
[mszyprow: backport of https://patchwork.ozlabs.org/project/uboot/list/?series=174860&state=%2A&archive=both
 the final mainline patch depends on DTS changes not present in vendor tree]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I565a81e49c0684cfc2500ecb203ed4233cce4e14

3 years agousb: xhci: move xhci.h to include usb 29/240329/2
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:46 +0000 (11:33 +0200)]
usb: xhci: move xhci.h to include usb

The xhci.h header file is currently located under drivers/usb/xhci
Move it to the include/usb folder to make it available to drivers that
are not under drivers/usb/xhci

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
[backport of mainline commit 1708a12377b98397606677e117f93f07d7cd2f7e]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I815c3a648ce06dc9d21c9b21b233d60959c4bc5c

3 years agoconfigs: rpi_3: disable configs relevant to SPL 77/240277/1
Jaehoon Chung [Wed, 5 Aug 2020 04:54:47 +0000 (13:54 +0900)]
configs: rpi_3: disable configs relevant to SPL

Disable configs relevant to SPL.
It doesn't need to enable anymore.

Change-Id: Idbe37b441e7dc3e2488a2db154522257f2c08722
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agopackaging: u-boot-rpi3: remove unnecessary files 76/240276/1
Jaehoon Chung [Wed, 5 Aug 2020 03:53:39 +0000 (12:53 +0900)]
packaging: u-boot-rpi3: remove unnecessary files

Remove unnecessary files. It was used to boot with optee.
But it doesn't use anymore because trust-firmware doesn't support.

Change-Id: I115ba5e6099b624a2113b8cdf1934699f31b6757
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoconfigs: rpi: set NR_DRAM_BANKS to four 82/237982/1 accepted/tizen/unified/20200708.125334 submit/tizen/20200707.104031
Matthias Brugger [Fri, 29 May 2020 14:42:22 +0000 (16:42 +0200)]
configs: rpi: set NR_DRAM_BANKS to four

With the new RPi4 which has 8 GB of RAM, we can have up to four DRAM
banks. Bump up the configuration files to detect all the memory in
U-Boot.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
[sw0312.kim: cherry-pick mainline commit a61cf765f7e3 to support rpi4 8GB dram]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I7d47e4ae3b70166cde96bc0c86011a8ff4f54262

3 years agoscripts: tizen: sd_fusing_rpi3: change partition size 40/236940/3
Jaehoon Chung [Tue, 23 Jun 2020 10:04:56 +0000 (19:04 +0900)]
scripts: tizen: sd_fusing_rpi3: change partition size

Change partition size to use 64bit image.
- ramdisk-recovery : 12MB -> 32MB
- system-data : 512MB -> 1.3GB
- modules : 20MB -> 32MB
- reserved1 : 64MB
- reserved2 : 128MB

Change-Id: I6bb1cca052af91e0e66f6148b76055c60670aead
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agosamsung: tizen_rpi: remove unnecessary variable and comment 58/236758/1 accepted/tizen/unified/20200623.080549 submit/tizen/20200622.213607
Jaehoon Chung [Mon, 22 Jun 2020 02:24:36 +0000 (11:24 +0900)]
samsung: tizen_rpi: remove unnecessary variable and comment

Remove unnecesarry environment variable.
ramdisksize and tizen_kernel_addr_r are set to correct value in boot
script.
Because comment was not valid, it doesn't need to keep.

Change-Id: Ica280a521ba538340b9dfbe640e6a5fd9839ab85
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agorpi: tizen-boot-rpi2: calculate tizen_kernel_addr_r with ramdisk's size 57/236757/1
Jaehoon Chung [Mon, 22 Jun 2020 02:18:46 +0000 (11:18 +0900)]
rpi: tizen-boot-rpi2: calculate tizen_kernel_addr_r with ramdisk's size

Calculate tizen_kernel_addr_r with ramdisk's size.
When ramdisk size is increased, kernel loading offset will be also
increased. It can prevent to overwrite the images.

Change-Id: Id65e084a0e076a95ffe005955ef4c12e7554fa07
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agorpi: tizen-boot-rpi3: calculate tizen_kernel_addr_r with ramdisk's size 56/236756/1
Jaehoon Chung [Mon, 22 Jun 2020 02:18:03 +0000 (11:18 +0900)]
rpi: tizen-boot-rpi3: calculate tizen_kernel_addr_r with ramdisk's size

Calculate tizen_kernel_addr_r with ramdisk's size.
When ramdisk size is increased, kernel loading offset will be also
increased. It can prevent to overwrite the images.

Change-Id: Ibbec03b4e3380028841d10eee7157c5e86fa8756
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agorpi: tizen-boot-rpi4: calculate tizen_kernel_addr_r with ramdisk's size 41/236641/2
Jaehoon Chung [Fri, 19 Jun 2020 03:56:33 +0000 (12:56 +0900)]
rpi: tizen-boot-rpi4: calculate tizen_kernel_addr_r with ramdisk's size

Calculate tizen_kernel_addr_r with ramdisk's size.
When ramdisk size is increased, kernel loading offset will be also
increased. It can prevent to overwrite the images.

Change-Id: Icc900b726f46683e5104be7f8ab31f36934f12b5
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agorpi: tizen-boot-rpi2: fix hard-coding value about ramdisksize 45/236545/1
Seung-Woo Kim [Thu, 18 Jun 2020 04:20:35 +0000 (13:20 +0900)]
rpi: tizen-boot-rpi2: fix hard-coding value about ramdisksize

Current ramdisksize is set to hard-condig value as 0xc00000 or 0x800000.
If ramdisk's size is changed to other, it also needs to change.
But we're getting the number of block about ramdisk partition.
Use its value to load a ramdisk image. Then it's more clear than now.

Change-Id: I96e1e383d4603f2375a45193a72a95f261bb996d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agorpi: tizen-boot-rpi3: fix hard-coding value about ramdisksize 43/236543/1
Jaehoon Chung [Thu, 18 Jun 2020 04:04:18 +0000 (13:04 +0900)]
rpi: tizen-boot-rpi3: fix hard-coding value about ramdisksize

Current ramdisksize is set to hard-condig value as 0xc00000 or 0x800000.
If ramdisk's size is changed to other, it also needs to change.
But we're getting the number of block about ramdisk partition.
Use its value to load a ramdisk image. Then it's more clear than now.

Change-Id: I59e4ed5d1c49e82c2bd76474b1d4bc086fb600e1
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agorpi: tizen-boot-rpi4: fix hard-coding value about ramdisksize 93/236493/1
Jaehoon Chung [Wed, 17 Jun 2020 11:44:37 +0000 (20:44 +0900)]
rpi: tizen-boot-rpi4: fix hard-coding value about ramdisksize

Current ramdisksize is set to hard-condig value as 0xc00000 or 0x800000.
If ramdisk's size is changed to other, it also needs to change.
But we're getting the number of block about ramdisk partition.
Use its value to load a ramdisk image. Then it's more clear than now.

Change-Id: I450ace4f0e795f0a05f5ff36fcd837349bc5a4aa
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoconfigs: rpi_4 : enable SDHCI_SDMA config 97/235797/1 accepted/tizen/unified/20200610.140844 submit/tizen/20200610.021850
Jaehoon Chung [Wed, 10 Jun 2020 00:00:27 +0000 (09:00 +0900)]
configs: rpi_4 : enable SDHCI_SDMA config

Enable SDHCI_SDMA configuration.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
[jh80.chung: cherry picked from mainline commit c6b9fbf7566f]

Change-Id: I889d2503239d508465d498202f29a369df247137

3 years agoconfigs: rpi_4_defconfig: enable ums configuration 96/235796/1
Jaehoon Chung [Tue, 9 Jun 2020 23:32:56 +0000 (08:32 +0900)]
configs: rpi_4_defconfig: enable ums configuration

Enable ums configuration.
And CONFIG_ARCH_FIXUP_FDT_MEMORY was enabled by default.

Change-Id: I4eaebba7b3fd05bc01d125b159289056162d203a
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: sd_fusing_xu4.sh: Support for non-sdX partition names 94/235694/1
Marek Szyprowski [Tue, 9 Jun 2020 03:42:07 +0000 (12:42 +0900)]
tizen: sd_fusing_xu4.sh: Support for non-sdX partition names

Properly find partiton device names for the given block device. In
case of MMC (or loop) partition names are created in a different way
(/dev/mmcblk0p1) than for typical USB pen-drives (/dev/sdb1).

Change-Id: Ic486e97a4e04c25dc438315bcefa668945765e65
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agotizen: sd_fusing_rpi3.sh: Support for non-sdX partition names 33/235633/7
Marek Szyprowski [Mon, 8 Jun 2020 08:01:16 +0000 (10:01 +0200)]
tizen: sd_fusing_rpi3.sh: Support for non-sdX partition names

Properly find partiton device names for the given block device. In
case of MMC (or loop) partition names are created in a different way
(/dev/mmcblk0p1) than for typical USB pen-drives (/dev/sdb1).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I4e3e272acd85bcd5a54ff8102a3978d18ea5687e

3 years agoconfigs: rpi_4: Enable CONFIG_ARCH_FIXUP_FDT_MEMORY for Tizen 67/235567/2
Marek Szyprowski [Fri, 5 Jun 2020 12:52:02 +0000 (14:52 +0200)]
configs: rpi_4: Enable CONFIG_ARCH_FIXUP_FDT_MEMORY for Tizen

On Tizen, a custom dtb loaded directly from boot partition is used instead of the one provided by the VC4 firmware, thus u-boot needs to update the
memory information in the loaded dtb. Without this option, the memory information is missing
and the loaded Linux kernel crashes early.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ic78d134aaef2ab272f839d305b5db3e79b0ef90b

3 years agopackaging: rpi4: add rpi4 64-bit spec file 26/235526/1
Seung-Woo Kim [Fri, 5 Jun 2020 07:46:03 +0000 (16:46 +0900)]
packaging: rpi4: add rpi4 64-bit spec file

Add rpi4 64-bit spec file.

Change-Id: I569df01d93a1d08de28f56f1ccbaf4a1600d79c0
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agorpi: tizen-boot: rpi: tizen-boot: add tizen boot script for rpi4 64bit 25/235525/1
Seung-Woo Kim [Fri, 5 Jun 2020 07:42:28 +0000 (16:42 +0900)]
rpi: tizen-boot: rpi: tizen-boot: add tizen boot script for rpi4 64bit

Add tizen boot script for rpi4 64bit.

Change-Id: I5ea641bccfa38dbabf666a783c2c3446daad4992
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agorpi: tizen-boot: rpi3: fix wrong setenv usage 24/235524/1
Seung-Woo Kim [Fri, 5 Jun 2020 07:40:52 +0000 (16:40 +0900)]
rpi: tizen-boot: rpi3: fix wrong setenv usage

The setenv does not require '='. Fix wrong setenv usage.

Change-Id: Idf1bf41655fa80837784fabc441dd2e47ac487a9
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agommc: s5p_sdhci: add Tizen specific bind codes 38/233838/4 accepted/tizen/unified/20200528.132817 submit/tizen/20200528.065747
Marek Szyprowski [Tue, 19 May 2020 12:46:43 +0000 (14:46 +0200)]
mmc: s5p_sdhci: add Tizen specific bind codes

Add Tizen specific bind codes for OdroidU3. When device is booted from SD,
SDHCI MMC controller is registered as MMC0, like it is done for DWMMC for OdroidXU3.
Based on commit 76f4fcf ("mmc: exynos_dw_mmc: add tizen specific bind codes").

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I624be4f0c6f7b1ce5a392249d73e36785649fd35

3 years agoarm: dts: exynos: Fix card-detect polarity for SD card on Odroid U3/X2 37/233837/4
Marek Szyprowski [Thu, 16 Jan 2020 15:25:34 +0000 (16:25 +0100)]
arm: dts: exynos: Fix card-detect polarity for SD card on Odroid U3/X2

Card detect line for SD-card on Odroid U3/X2 boards are active low, so
add cd-inverted property to indicate this, as u-boot's GPIO driver doesn't
support specifying line polarity. This restores S5P_SDHCI driver operation
on Odroid U3/X2 boards.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
[backport of mainline commit 1bca28a5d98a81a9d189a46347f8a92619624f94]

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I420d44fd232431491442e50012804beea3075d6d

3 years agommc: s5p_sdhci: Read generic MMC properties from DT 36/233836/4
Marek Szyprowski [Thu, 16 Jan 2020 15:25:33 +0000 (16:25 +0100)]
mmc: s5p_sdhci: Read generic MMC properties from DT

Read generic MMC properties from device-tree. This allows to specify for
example cd-inverted property and let MMC core to properly handle such
case.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
[backport of mainline commit e27108c433a249ba8ebc59f7a3113b9b666f5d67]

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I6cbad2667a524083bdf9abc11598e80d8830a0cc

3 years agoRevert "bootstage: enable bootstage timing report to fdt" 25/233825/4
Seung-Woo Kim [Tue, 19 May 2020 10:32:17 +0000 (19:32 +0900)]
Revert "bootstage: enable bootstage timing report to fdt"

This reverts commit cc19bd066c446a91d0e1292e2e21fc9395afb92a
pratially for odroid_defconfig. From other defconfigs including
tizen_defconfig and odroid-xu3_defconfig, the options has been
already removed.

Note: the bootstage options breaks booting from odroid-u3.

Change-Id: If85a8956ed805f6221619f9462f8d672f48458bf
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agocmd: remote obsoleted nfsdown and usbdown commands 84/231984/8
Marek Szyprowski [Fri, 15 May 2020 07:45:41 +0000 (09:45 +0200)]
cmd: remote obsoleted nfsdown and usbdown commands

Gneric Tizen Downloader based on the DFU framework, provides better
replacement for those commands.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia0a0ccd5fb7e1b65c12f6c5653015ef7ae05e6be

3 years agotizen: replace NFSdown with generic Tizen Download utility (NFS and USB) 17/231517/10
Marek Szyprowski [Mon, 20 Apr 2020 13:08:30 +0000 (15:08 +0200)]
tizen: replace NFSdown with generic Tizen Download utility (NFS and USB)

Tizen Download utility provides replacement for nfsdown and usbdown
commands, implemented on top of the generic u-boot's DFU framework.
It allows to flash any entity defined in dfu_alt_info, not only the ones
hardcoded in the mentioned commands.

This is useful for flashing only the selected images/entities.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ic4275302442b84dc96a2d7d31188eb3d7143e7ec

3 years agoarm: exynos: enable DFU's alt_info support for Tizen downloader 87/233587/6
Marek Szyprowski [Fri, 15 May 2020 09:20:53 +0000 (11:20 +0200)]
arm: exynos: enable DFU's alt_info support for Tizen downloader

dfu_alt_info env is required for Tizen downloader, so set it correctly on
all Odroid variants.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I3530d3be22b1ed76f4687198064bde3faebd6b37

3 years agocmd: add generic Tizen Download (NFS & USB) command 16/231516/10
Marek Szyprowski [Mon, 27 Apr 2020 06:45:02 +0000 (08:45 +0200)]
cmd: add generic Tizen Download (NFS & USB) command

This is a quick replacement of the NFSdown and USBdown commands, rewritten
on top of the generic DFU framework. This removes a few limitation of both
obsoleted commands.

Change-Id: Id8a311eabd2bab7d90aeee6adabbd6461897b4e3
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
[sw0312.kim: remove newline from command name]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoconfig: Enable support for the XHCI controller on RPI4 board 15/231515/9
Marek Szyprowski [Fri, 15 May 2020 11:40:27 +0000 (13:40 +0200)]
config: Enable support for the XHCI controller on RPI4 board

This requires enabling BRCMSTB PCIe and XHCI_PCI drivers as well as PCI
and USB commands. To get it working one has to call the following commands:
"pci enum; usb start;", thus such commands have been added to the default
"preboot" environment variable. One has to update their environment if it
is already configured to get this feature working out of the box.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ibef9ae32311091780e3f5243509cb066964af829

3 years agopci: Add driver for Broadcom BCM2711 SoC PCIe controller 14/231514/8
Sylwester Nawrocki [Tue, 12 May 2020 18:47:15 +0000 (20:47 +0200)]
pci: Add driver for Broadcom BCM2711 SoC PCIe controller

This patch adds basic driver PCI Express controller found on Broadcom
set-top-box SoCs, e.g. BCM2711.
The code is based on Linux upstream driver (pcie-brcmstb.c) with MSI
handling removed. The inbound access memory region is not currently
parsed from dma-ranges DT property and a fixed 3GB region is used.

The patch has been tested on RPI4 board, i.e. on BCM2711 SoC with VL805
USB Host Controller.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
[mszyprow: rebased onto tizen branch]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ib2f4e6f3ced902b86b0283fdb0cce390d9688b1f

3 years agopci: Add some PCI Express capability register offset definitions 24/231524/7
Sylwester Nawrocki [Tue, 12 May 2020 18:47:14 +0000 (20:47 +0200)]
pci: Add some PCI Express capability register offset definitions

Add PCI Express capability definitions required by the Broadcom
STB PCIe controller driver.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I7ebba592cfe787bffeb0985ada38f11b721166f7

3 years agolinux/bitfield.h: Add primitives for manipulating bitfields both in host- and fixed... 83/231983/6
Nicolas Saenz Julienne [Tue, 12 May 2020 19:04:32 +0000 (21:04 +0200)]
linux/bitfield.h: Add primitives for manipulating bitfields both in host- and fixed-endian

Imports Al Viro's original Linux commit 00b0c9b82663a, which contains
an in depth explanation and two fixes from Johannes Berg:
 e7d4a95da86e0 "bitfield: fix *_encode_bits()",
 37a3862e12382 "bitfield: add u8 helpers".

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
[s.nawrocki: added empty lines between functions and macros]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I93e237f1478e59a5a44345ea68aa4ed6a4ab7bed

3 years agorpi4: add a mapping for the PCIe XHCI controller MMIO registers (ARM 32bit) 22/231522/7
Marek Szyprowski [Tue, 12 May 2020 12:44:15 +0000 (14:44 +0200)]
rpi4: add a mapping for the PCIe XHCI controller MMIO registers (ARM 32bit)

Create a non-cacheable mapping for the 0x600000000 physical memory region,
where MMIO registers for the PCIe XHCI controller are instantiated by the
PCIe bridge. Due to 32bit limit in the CPU virtual address space in ARM
32bit mode, this region is mapped at 0xff800000 CPU virtual address.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I032641c782e915fa1f999a1e208dd915a22515f7

3 years agommc: bcm283x: fix int to pointer cast 24/233724/4
Seung-Woo Kim [Fri, 15 May 2020 10:14:26 +0000 (19:14 +0900)]
mmc: bcm283x: fix int to pointer cast

On build with 32 bit, there is a warning for int-to-pointer-cast.
Fix the int to pointer cast by using uintptr_t.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I590d32437763e6e60f216379e4fb55814d0b1bb2

3 years agoarm: provide a function for boards init code to modify MMU virtual-physical map 86/233586/5
Marek Szyprowski [Tue, 12 May 2020 12:56:37 +0000 (14:56 +0200)]
arm: provide a function for boards init code to modify MMU virtual-physical map

Provide function for setting arbitrary virtual-physical MMU mapping for the given region.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: If10b06cc6edbdff311a1b6302112e8cd0bb5313f

3 years agorpi4: add a mapping for the PCIe XHCI controller MMIO registers (ARM 64bit) 21/231521/7
Marek Szyprowski [Tue, 12 May 2020 18:47:12 +0000 (20:47 +0200)]
rpi4: add a mapping for the PCIe XHCI controller MMIO registers (ARM 64bit)

Create a non-cacheable mapping for the 0x600000000 physical memory region,
where MMIO registers for the PCIe XHCI controller are instantiated by the
PCIe bridge.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Idcbaf78228aa87d992020b3fe0a0d4c9fdfa1329

3 years agorpi4: shorten a mapping for the DRAM 20/231520/7
Marek Szyprowski [Tue, 12 May 2020 18:47:11 +0000 (20:47 +0200)]
rpi4: shorten a mapping for the DRAM

Remove the overlap between DRAM and device's IO area.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ie3a7bfa1dbba32d425b9145197e2e8d1f972ab33

3 years agopci: Move some PCIe register offset definitions to a common header 19/231519/7
Sylwester Nawrocki [Tue, 12 May 2020 18:47:10 +0000 (20:47 +0200)]
pci: Move some PCIe register offset definitions to a common header

Some PCI Express register offsets are currently defined in multiple
drivers, move them to a common header to avoid re-definitions and
as a pre-requisite for adding new PCIe driver.
While at it replace some spaces with tabs.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I2e06710f8ff1195b66cee7dc8d16af26cc6c6a60

3 years agousb: xhci: Use only 32-bit accesses in xhci_writeq/xhci_readq 23/231523/7
Sylwester Nawrocki [Tue, 12 May 2020 18:47:09 +0000 (20:47 +0200)]
usb: xhci: Use only 32-bit accesses in xhci_writeq/xhci_readq

There might be hardware configurations where 64-bit data accesses
to XHCI registers are not supported properly.  This patch removes
the readq/writeq so always two 32-bit accesses are used to read/write
64-bit XHCI registers, similarly as it is done in Linux kernel.

This patch fixes operation of the XHCI controller on RPI4 Broadcom
BCM2711 SoC based board, where the VL805 USB XHCI controller is
connected to the PCIe Root Complex, which is attached to the system
through the SCB bridge.

Even though the architecture is 64-bit the PCIe BAR is 32-bit and likely
the 64-bit wide register accesses initiated by the CPU are not properly
translated to a sequence of 32-bit PCIe accesses.
xhci_readq(), for example, always returns same value in upper and lower
32-bits, e.g. 0xabcd1234abcd1234 instead of 0x00000000abcd1234.

Cc: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia886dcae5d63b0d23591948e571ca07907893b58

3 years agousb: xhci: Add missing cache flush in the scratchpad array initialization 18/231518/7
Sylwester Nawrocki [Fri, 24 Apr 2020 16:50:03 +0000 (18:50 +0200)]
usb: xhci: Add missing cache flush in the scratchpad array initialization

In current code there is no cache flush after initializing the scratchpad
buffer array with the scratchpad buffer pointers. This leads to a failure
of the "slot enable" command on the rpi4 board (Broadcom STB PCIe
controller + VL805 USB hub) - the very first TRB transfer on the command
ring fails and there is a timeout while waiting for the command completion
event. After adding the missing cache flush everything seems to be working
as expected.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I0a8a482bf452230edd754509b2f1bcdb6b1ea090

3 years agodm: pci: Update the PCI read_config() method to const dev * 85/233585/5
Simon Glass [Mon, 27 Jan 2020 15:49:37 +0000 (08:49 -0700)]
dm: pci: Update the PCI read_config() method to const dev *

At present this method uses a non-const udevice pointer, but the call
should not modify the device. Use a const pointer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Conflicts:
drivers/misc/p2sb_emul.c
drivers/misc/swap_case.c
drivers/pci/pci_mpc85xx.c
drivers/pci/pci_x86.c
drivers/pci/pcie_mediatek.c
drivers/pci/pcie_phytium.c
drivers/power/acpi_pmc/pmc_emul.c

[backport of mainline commit c4e72c4ad8b7c2db9c868bd053c25344b95900b8]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Iee5347f9a131102f691ea79650b33bbb09c50926

3 years agodm: core: Use const where possible in device.h 84/233584/5
Simon Glass [Mon, 27 Jan 2020 15:49:36 +0000 (08:49 -0700)]
dm: core: Use const where possible in device.h

Update this header file to use const devices where possible, to permit
callers to also use const.

Signed-off-by: Simon Glass <sjg@chromium.org>
Conflicts:
drivers/core/device.c
include/dm/device.h

[backport of mainline commit fc347fbdd44a01b1aba6283dec56c1374baca383]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Id883506ac5c20ae7898c576316b64e64a9a52c90

3 years agoscripts: tizen: update script version to distinguish 62/234162/1
Jaehoon Chung [Fri, 22 May 2020 07:52:18 +0000 (16:52 +0900)]
scripts: tizen: update script version to distinguish

Update script minor version to distinguish.
(from 1.3 to 1.3.1)
- 1.3.1 : Enhance write performcne

Change-Id: If9bbc1cbca22d87bc837d03e60d09a3a0e6c6883
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agonet: fix build without NFS or NFS download enabled 71/233571/5
Marek Szyprowski [Fri, 15 May 2020 10:08:54 +0000 (12:08 +0200)]
net: fix build without NFS or NFS download enabled

Partial NFS download requires setting net_boot_file_{offset,size_limit}
global variables, which are available only when CONFIG_CMD_NFS is set.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I74e2dbb56c2b41078d2e5506bdcba6458299d792

3 years agoFixup "tools:mkimage_multidtb: Align less than PAD size" 70/233570/5
Marek Szyprowski [Fri, 15 May 2020 05:56:24 +0000 (07:56 +0200)]
Fixup "tools:mkimage_multidtb: Align less than PAD size"

Partially revert commit fe215b2f7ddf30f36b326f7a3fe3734a872a37fe
("tools:mkimage_multidtb: Align less than PAD size"), as it looks that the MFC hack
 accidendly sneaked into that commit.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I81c0f4713a83a8e5d888b03fb851e9c673cd1c77

3 years agoconfigs: odroid-xu3: enable NET_RANDOM_ETHADDR for proper USB ethernet support 23/233723/3
Marek Szyprowski [Mon, 18 May 2020 11:56:34 +0000 (13:56 +0200)]
configs: odroid-xu3: enable NET_RANDOM_ETHADDR for proper USB ethernet support

Odroid XU3 and XU3lite has built-in USB SMSC9512/9514 Ethernet controller, which has no
EEPROM for the board MAC address. Force using random one instead of failing.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia1024f925d7b692b40cb76ef261e9c1cc8890e7b

3 years agoRevert "configs: odroid-xu3: disable ENV_VARS_UBOOT_RUNTIME_CONFIG" 22/233722/3
Marek Szyprowski [Mon, 18 May 2020 11:28:58 +0000 (13:28 +0200)]
Revert "configs: odroid-xu3: disable ENV_VARS_UBOOT_RUNTIME_CONFIG"

This reverts commit 91c1e726e5c01cbed34df700f9fdab6d6fedd4fc.

CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is needed to properly set fdtfile
env depending on the ADC value.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Iebcde36316117198eeca747aed112d8a9b177afd

3 years agotizen: odroid-xu3: add missing Odroid HC1 support to CONFIG_DFU_ALT_SYSTEM_2 69/233569/4
Marek Szyprowski [Fri, 15 May 2020 06:29:46 +0000 (08:29 +0200)]
tizen: odroid-xu3: add missing Odroid HC1 support to CONFIG_DFU_ALT_SYSTEM_2

Add missing exynos5422-odroidhc1.dtb to DFU_ALT_SYSTEM_2, selected when ramdisk
partition is available.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ie72136e5b63739abe40add42590d30463c09f3c1

3 years agoarm: dts: exynos: Extend board description 68/233568/4
Marek Szyprowski [Wed, 15 Jan 2020 15:18:03 +0000 (16:18 +0100)]
arm: dts: exynos: Extend board description

u-boot uses the same DTS for the all Odroid XU3-based boards, so list
them in the model description to let user know that those boards are
supported.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
[backport of mainline commit a6ee3fe19d8bdf369edbd9301eb2be283458b920]

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Idac4f4438945530bc6c652f84e0b9468236e2283

3 years agoarm: exynos: Use proper PMIC device names 67/233567/4
Marek Szyprowski [Thu, 16 Jan 2020 13:46:04 +0000 (14:46 +0100)]
arm: exynos: Use proper PMIC device names

Since commit 4213609cc7 ("drivers: core: use strcmp when find device by
name") one has to provide full name to get requested object. Fix the code
used to detect enable power regulators on the supported Exynos boards to
use proper PMIC device device name then.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
[backport of mainline commit 4b8984e969fa8e68f2fdd79c70cd4be8f1f1378c]

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I898b9dbdbfd89b467e0a85de3158b5176fc42018

3 years agoarm: exynos: Use proper ADC device name 66/233566/4
Marek Szyprowski [Tue, 14 Jan 2020 14:04:20 +0000 (15:04 +0100)]
arm: exynos: Use proper ADC device name

Since commit 4213609cc7 ("drivers: core: use strcmp when find device by
name") one has to provide full name to get requested object. Fix the code
used to detect Odroid board revision to use proper ADC device name then.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
[backport of mainline commit fa06669d0181b2c92ba86fb6c40a4cb0c196b13c]

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I2f7bda9d69826b38fd6d3a193876b3fe502d8859

3 years agoscripts: sd_fusing: Increase the block size upon the image flashing 91/233991/1
Junghoon Kim [Thu, 21 May 2020 03:56:23 +0000 (12:56 +0900)]
scripts: sd_fusing: Increase the block size upon the image flashing

Fine-grained IO degrades the image flashing performance due to the IO
stack overhead. Increase the block size upon the dd operation to improve
the flashing performance.

Change-Id: I937ca401d07045f055d3f55ca9f52a3261ee4fb4
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agoscripts: sd_fusing_xu4.sh: Improve the image flashing performance 64/233664/1
Junghoon Kim [Mon, 18 May 2020 06:22:47 +0000 (15:22 +0900)]
scripts: sd_fusing_xu4.sh: Improve the image flashing performance

The current dd of the pv combination degrades the flashing performance
due to the pipe overhead and is also bad to see due to the duplicate
output. This can be improved by the use of direct mode with progress
status.

Change-Id: Id682683e892181cc2608d1ba811d4ddb847048da
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agoscripts: tizen: sd_fusing_rpi3: Check dd version for backward compatibility 85/233385/2
Seung-Woo Kim [Thu, 14 May 2020 08:19:36 +0000 (17:19 +0900)]
scripts: tizen: sd_fusing_rpi3: Check dd version for backward compatibility

Before dd version 8.24, "status=progress" option is not supported.
For backward compatibility, check dd version and use the option
only when it is possible.

Change-Id: Ia90668e9cd22bf2906b4b0ecd574bb45ad14fd95
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoscripts: tizen: Improve the image flashing performance for RPI family 52/233352/3
Junghoon Kim [Thu, 14 May 2020 05:51:00 +0000 (14:51 +0900)]
scripts: tizen: Improve the image flashing performance for RPI family

The current dd of the pv combination degrades the performance due to the
pipe overhead and is also bad to see due to the duplicate output.

It can be resolved by the use of direct mode with progress status. This
reduces the flashing time of platform images by 17.5% in my environment.

Change-Id: I986ce72e0294b6f143ca95419364a0f89f289d74
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agocmd: thordown: Fix to show stopped message when interrupted 03/231903/1
Seung-Woo Kim [Sat, 25 Apr 2020 06:05:34 +0000 (15:05 +0900)]
cmd: thordown: Fix to show stopped message when interrupted

The thordown command can be interrupted by Ctrl-C, and it can be
identified with error value. Fix to show stopped message when
interrupted.

Change-Id: Idfe1a9dc1e168ea20c94d49ada497dc1b66bde52
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agogadget: f_thor: Return proper error value for thor_init() 98/231798/1
Seung-Woo Kim [Fri, 24 Apr 2020 07:40:40 +0000 (16:40 +0900)]
gadget: f_thor: Return proper error value for thor_init()

After the commit 17679aed622b ("usb: thor: add screen support"),
caller of thor_init() expects general error value to check
interrupt by Ctrl-C but thor_init() returns wrong error value -1
for Ctrl-C termination during rx or wrong protocol response.
Return proper error for the cases.

Change-Id: I8a637918930673bad953a88e26c79b8e64580bc8
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agogadget: f_thor: add missing line breaks for pr_err() 77/231777/1
Seung-Woo Kim [Thu, 13 Feb 2020 08:24:11 +0000 (17:24 +0900)]
gadget: f_thor: add missing line breaks for pr_err()

After the commit 9b643e312d52 ("treewide: replace with error()
with pr_err()"), there are pr_err() usages without line break. Add
missing line breaks for pr_err() used in f_thor.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
[sw0312.kim: cherry-pick mainline commit 491cabf067c6 to fix error message]

Change-Id: If1750e46cb3e9d64d5c9460d82c7fd90f7a58acd

4 years agocmd/gpt: Address error cases during gpt rename more correctly 28/231428/2 accepted/tizen/unified/20200424.141632 submit/tizen/20200423.092248
Tom Rini [Tue, 21 Jan 2020 16:53:38 +0000 (11:53 -0500)]
cmd/gpt: Address error cases during gpt rename more correctly

New analysis by the tool has shown that we have some cases where we
weren't handling the error exit condition correctly.  When we ran into
the ENOMEM case we wouldn't exit the function and thus incorrect things
could happen.  Rework the unwinding such that we don't need a helper
function now and free what we may have allocated.

Fixes: 18030d04d25d ("GPT: fix memory leaks identified by Coverity")
Reported-by: Coverity (CID: 275475, 275476)
Cc: Alison Chaiken <alison@she-devel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Jordy <jordy@simplyhacker.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
[jh80.chung: cherry picked from mainline commit 5749faa3d683]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Ifdccec243f89b55363ffd6d18bfee971a42f7bc6

4 years agoFix the use of resize2fs 34/231334/2
Junghoon Kim [Tue, 21 Apr 2020 07:59:05 +0000 (16:59 +0900)]
Fix the use of resize2fs

The resize2fs can be used to enlarge or shrink the ext family filesystem
only. Thus, An error occurs when trying to use it with other filesystems
such as vfat. Fix the use of resize2fs for use only with the ext family
filesystem.

Change-Id: I2c9b7c686086d924b003d07a2762bb668dd39ac8
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agotizen: rpi2/3/4: fix typo in Tizen boot scripts 38/231138/1
Marek Szyprowski [Fri, 17 Apr 2020 10:43:45 +0000 (12:43 +0200)]
tizen: rpi2/3/4: fix typo in Tizen boot scripts

/s/comdline/cmdline

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I2464583207200762d981f0d133dacb14ec66a445

4 years agoscripts: tizen: sd_fusing: Check requested device 74/229774/2
Seung-Woo Kim [Fri, 3 Apr 2020 07:58:36 +0000 (16:58 +0900)]
scripts: tizen: sd_fusing: Check requested device

It is possible to request flashing a device which is non-existent
or unaccessible. Especially, request can flash non-removable
storage disk that user do not really intend. To skip all the case,
Check requested device.
For non removable disk, it will ask user really intended to flash
the device.

Change-Id: I7ee3363fe4075abd7b860acf26b6cbe65e6fa68c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agonet: bcmgenet: move PHY initialization from probe() to start() 72/228772/1 accepted/tizen/unified/20200402.155635 submit/tizen/20200331.090714
Marek Szyprowski [Wed, 25 Mar 2020 09:01:48 +0000 (10:01 +0100)]
net: bcmgenet: move PHY initialization from probe() to start()

Fix random network failures on subsequent network access by forcing PHY initialization on
every network access. This also fixes sudden link drop from 100baseT to 10baseT observed
from time to time.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I5bb55ce6546dec5449afea1bef036458563f287c

4 years agonet: tftp: Fix too small block size 71/228771/1
Andre Przywara [Sat, 23 Nov 2019 17:58:59 +0000 (17:58 +0000)]
net: tftp: Fix too small block size

Commit b618b3707633 ("net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig")
accidentally set the default *option* TFTP block size to 512 bytes, even
though the comment in the code says that this is a terrible choice. Most
boards didn't define the symbol before, so they got the default block size
of 1468 bytes before, but now use 512 bytes, which is also the fallback.
This leads to both abysmal performance and a lot of hashes printed
on the screen (one character for every 5K), which is both annoying and
slow over serial links.

Set the default block size in Kconfig back to the value it had before.

This improves TFTP performance from 2.8 MB/s to 6.9 MB/s on a Pine64.

Fixes: b618b3707633 ("net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
[backport of mainline commit 16cdc2daa07986243751a9f545aa287c60e04ced]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ib62265400f73d6ecd7780e70a84070158e9d8184

4 years agonet: nfs: show file offset and improve progress display 70/228770/1
Marek Szyprowski [Wed, 25 Mar 2020 09:03:40 +0000 (10:03 +0100)]
net: nfs: show file offset and improve progress display

Always align progress display to the start of the column and show downloaded
file offset.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia5e3185110e0dbfc89046854f8d612f6428af794

4 years agonet: ping: reset stored IP once the command finishes to avoid interrupting other... 69/228769/1
Marek Szyprowski [Wed, 25 Mar 2020 09:08:16 +0000 (10:08 +0100)]
net: ping: reset stored IP once the command finishes to avoid interrupting other protocols

Reset stored ping IP address before leaving the netloop to ensure that the subsequent calls
to the netloop, especially for the other protocols, won't be interrupted by the received
ICMP_ECHO_REPLY packet.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I0d90b3a6e9481c8e8237874eff8a9a12df4190e0

4 years agocmd/nfsdown: fix summary message 68/228768/1
Marek Szyprowski [Wed, 25 Mar 2020 09:02:03 +0000 (10:02 +0100)]
cmd/nfsdown: fix summary message

Adjust summary message format to align properly with
'ramdisk-recovery.img' file.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I1747695718585f1a91e17a41ca12948b6db99a75

4 years agocmd/nfsdown: fix download image names for all RPi variants 57/228757/1
Marek Szyprowski [Wed, 25 Mar 2020 08:10:11 +0000 (09:10 +0100)]
cmd/nfsdown: fix download image names for all RPi variants

There is no single CONFIG option for all RPi variants, so preprocessor has to check all of them.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I730a7f29dbf529c3da1c06f075e4c7a52089bf6c

4 years agocmd/nfsdown: fix wrong null check for argument in do_mmc_init() 98/228498/2
Seung-Woo Kim [Mon, 23 Mar 2020 09:07:32 +0000 (18:07 +0900)]
cmd/nfsdown: fix wrong null check for argument in do_mmc_init()

In do_mmc_init(), there is wrong null check for argument
instead of find_mmc_device() result. Fix wrong null check.

Change-Id: Ibbd2781bed7ae1a812563a5d77b2a4c46cf66523
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agocmd/nfsdown: fix recently introduced type mismatch issues 70/228470/1
Marek Szyprowski [Mon, 23 Mar 2020 08:05:39 +0000 (09:05 +0100)]
cmd/nfsdown: fix recently introduced type mismatch issues

When u-boot is configured from odroid-xu3_defconfig, the compiler reports following warnings:
In file included from include/config.h:5:0,
                 from include/common.h:23,
                 from cmd/nfsdown.c:11:
cmd/nfsdown.c: In function ‘do_nfs_down’:
include/configs/odroid_xu3.h:16:32: warning: passing argument 1 of ‘do_nfs_to_fat’ makes pointer from integer without a cast [-Wint-conversion]
 #define CONFIG_SYS_SDRAM_BASE  0x40000000
                                ^
cmd/nfsdown.c:24:27: note: in expansion of macro ‘CONFIG_SYS_SDRAM_BASE’
 #define NFS_DOWNLOAD_ADDR CONFIG_SYS_SDRAM_BASE
                           ^~~~~~~~~~~~~~~~~~~~~
cmd/nfsdown.c:429:25: note: in expansion of macro ‘NFS_DOWNLOAD_ADDR’
    size = do_nfs_to_fat(NFS_DOWNLOAD_ADDR, src_path,
                         ^~~~~~~~~~~~~~~~~
cmd/nfsdown.c:328:12: note: expected ‘void *’ but argument is of type ‘int’
 static int do_nfs_to_fat(void *addr, char *file_path, char *file_name,
            ^~~~~~~~~~~~~
In file included from include/config.h:5:0,
                 from include/common.h:23,
                 from cmd/nfsdown.c:11:
include/configs/odroid_xu3.h:16:32: warning: passing argument 2 of ‘do_nfs_to_mmc’ makes pointer from integer without a cast [-Wint-conversion]
 #define CONFIG_SYS_SDRAM_BASE  0x40000000
                                ^
cmd/nfsdown.c:24:27: note: in expansion of macro ‘CONFIG_SYS_SDRAM_BASE’
 #define NFS_DOWNLOAD_ADDR CONFIG_SYS_SDRAM_BASE
                           ^~~~~~~~~~~~~~~~~~~~~
cmd/nfsdown.c:433:30: note: in expansion of macro ‘NFS_DOWNLOAD_ADDR’
    size = do_nfs_to_mmc(mmc, NFS_DOWNLOAD_ADDR, src_path,
                              ^~~~~~~~~~~~~~~~~
cmd/nfsdown.c:282:12: note: expected ‘void *’ but argument is of type ‘int’
 static int do_nfs_to_mmc(struct mmc *mmc, void *addr, char *file_path,
            ^~~~~~~~~~~~~

Fix this by changing addr to unsigned long and adding needed casts.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia78da10d04a0daf3301ddc6fa4c7b73000d33c22

4 years agocmd/nfsdown: add support for partial image download 67/227967/2
Marek Szyprowski [Wed, 18 Mar 2020 07:41:36 +0000 (08:41 +0100)]
cmd/nfsdown: add support for partial image download

Add support for downloading image file in parts, so images larger than the available memory
can be flashed correctly. This allows to flash large (>1GiB) rootfs images on RPi3 or RPi4
boards.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I40437191876eb48b9ca14756106f8316a92cc546

4 years agonet: nfs: add support for partial downloads from given offset 66/227966/1
Marek Szyprowski [Tue, 17 Mar 2020 13:03:10 +0000 (14:03 +0100)]
net: nfs: add support for partial downloads from given offset

Add support for downloading file from the given offset (in bytes) and limit the size up to given
bytes.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I9f442d375d6b37986cb7c10f93c11d265886cceb

4 years agonet: nfs: reduce the number of printed hashes during data transfer 65/227965/1
Marek Szyprowski [Tue, 17 Mar 2020 13:50:08 +0000 (14:50 +0100)]
net: nfs: reduce the number of printed hashes during data transfer

Downloading large images (about 1GiB) prints a lots of hash characters, so it is hard to follow
what is happenings. Reduce the amount of printed progress marks by a magnitude.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I142d1c646b2232eb505301a88b1ff051ac2bc19c

4 years agorpi3/4: enable NFS download feature 50/227550/1 submit/tizen/20200317.014342
Marek Szyprowski [Thu, 12 Mar 2020 13:04:56 +0000 (14:04 +0100)]
rpi3/4: enable NFS download feature

Sync RPi3/4 defconfigs and enable NFS download feature for all configs.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I35ade633d89bbd18374270362ba831d35c9a0d49

4 years agommc: exynos_dw_mmc: remove unused code 27/225727/1 accepted/tizen/unified/20200225.224418 submit/tizen/20200225.003030
Jaehoon Chung [Mon, 24 Feb 2020 06:47:42 +0000 (15:47 +0900)]
mmc: exynos_dw_mmc: remove unused code

Remove unused code and fix wrong memory allocation.
- When rebased on v2019.10, it was applied wrong.

Change-Id: I6cc953c511d01ce42c33bf8d461e7bf5629c6428
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoRevert "Revert "rpi4: Enable GENET Ethernet controller"" 30/224830/1 accepted/tizen/unified/20200214.050352 submit/tizen/20200213.090905 submit/tizen/20200213.092423
Marek Szyprowski [Thu, 13 Feb 2020 08:52:40 +0000 (09:52 +0100)]
Revert "Revert "rpi4: Enable GENET Ethernet controller""

This reverts commit 59b5cde11b0fed5f7bcdb06d69f92887985d43e7.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I2a73ad792a678d994620f470e002929b3f8abfa9

4 years agoconfig: rpi: Increase malloc buffer size 29/224829/2
Marek Szyprowski [Thu, 13 Feb 2020 08:50:54 +0000 (09:50 +0100)]
config: rpi: Increase malloc buffer size

GENET ethernet driver and THORdown consume more memory than the default
4M, so increase the malloc buffer size to 16M to let them work together.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I1c4d386761699fcb72b1a76d90d50518554a2980

4 years agoRevert "rpi4: Enable GENET Ethernet controller" 15/224815/1 submit/tizen/20200213.081741
Dongwoo Lee [Thu, 13 Feb 2020 07:38:25 +0000 (16:38 +0900)]
Revert "rpi4: Enable GENET Ethernet controller"

Since commit 60857f8ec759 ("rpi4: Enable GENET Ehternet controller")
thor downloder fails with log like below:

U-boot> thordown 0 mmc 0
TIZEN "THOR" Downloader
DFU alt info setting: done
thor_func_set_alt: EPs setup failed!kill ep2out-bulk:  resubmit 4 bytes --> -22thor_init: Data not received!
THOR DOWNLOAD failed: -1
WARNING at drivers/usb/gadget/dwc2_udc_otg.c:730/dwc2_free_request()!
WARNING at drivers/usb/gadget/dwc2_udc_otg.c:730/dwc2_free_request()!

So this disables GENET Ethernet contorller.

Change-Id: I0dd5e5789b0a099768655946122f07ecd1fb609f
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
4 years agorpi4: Enable GENET Ethernet controller 17/224417/1 accepted/tizen/unified/20200212.125728 submit/tizen/20200212.035459
Amit Singh Tomar [Mon, 27 Jan 2020 01:14:44 +0000 (01:14 +0000)]
rpi4: Enable GENET Ethernet controller

The Raspberry Pi 4 SoC features an integrated Gigabit Ethernet
controller, connected as a platform device.

Enable the new driver in the three applicable defconfigs, to allow
TFTP booting on the board.

Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
[Andre: Add joined and 32-bit configs]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
[backport of mainline commit 095c6eba9d02688e7a1c3cd2093f826d05fe961f]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I666fbda9f027b54c8ec29be324e38a7f53ad0cfe

4 years agorpi4: Update memory map to accommodate scb devices 16/224416/1
Amit Singh Tomar [Mon, 27 Jan 2020 01:14:43 +0000 (01:14 +0000)]
rpi4: Update memory map to accommodate scb devices

Some of the devices(for instance, pcie and gnet controller) sitting on
SCB bus falls behind/below the memory range that we currenty have.

This patch updates the memory range to map those devices correctly.

Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
[backport of mainline commit fff5d5499d28dda0b22b44bb57c4525ad7d0a89d]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ic93d9d00e57f134b1386cd5da17f29d997854d91

4 years agonet: Add support for Broadcom GENETv5 Ethernet controller 15/224415/1
Amit Singh Tomar [Mon, 27 Jan 2020 01:14:42 +0000 (01:14 +0000)]
net: Add support for Broadcom GENETv5 Ethernet controller

The Broadcom GENET Ethernet MACs are used in several MIPS based SoCs
and in the Broadcom 2711/2838 SoC used on the Raspberry Pi 4.
There is no publicly available documentation, so this driver is based
on the Linux driver. Compared to that the queue management is
drastically simplified, also we only support version 5 of the IP and
RGMII connections between MAC and PHY, as used on the RPi4.

Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
[Andre: heavy cleanup and a few fixes]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
[backport of mainline commit d53e3fa3853d5dad9ac4c39128cd08e0ae7a33ef]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I578e251809583314695e0212e5f954dac366ddef

4 years agowaitbit: Add the generic wait_for_bit macros for 16 and 32 bits. 14/224414/1
Kursad Oney [Wed, 14 Aug 2019 13:18:33 +0000 (15:18 +0200)]
waitbit: Add the generic wait_for_bit macros for 16 and 32 bits.

wait_for_bit_le32 and wait_for_bit_le16 use the raw I/O functions
which would default to big-endian on BE systems. Create the generic
equivalents to use the native endianness.

Signed-off-by: Kursad Oney <kursad.oney@broadcom.com>
Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
[backport of mainline commit c50d670c56109c001875cd72930810b2ddfb29e6]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I4a808d9a343ce1fc259cc973ef222668fe3ff0fd

4 years agocommon: Move older CPU functions to their own header 13/224413/1
Simon Glass [Thu, 14 Nov 2019 19:57:09 +0000 (12:57 -0700)]
common: Move older CPU functions to their own header

These should be moved to driver model, but in the meantime, move them
out of the common header to help reduce its size.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
[backport of mainline commit bdf30e84909d8d99c2700a0fc6c3e799e3d8e2d4]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I620725bda17233e4c0901d2050a6bb7754cde2f1

4 years agommc: bcm2835_sdhci: remove QUIRK_BROKEN_SDMA flag 97/223097/1
Jaehoon Chung [Wed, 22 Jan 2020 23:45:52 +0000 (08:45 +0900)]
mmc: bcm2835_sdhci: remove QUIRK_BROKEN_SDMA flag

Remove QUIRK_BROKEN_SDMA flag.

Change-Id: I6206ccb6ade14f51786d5603ae5207840ac51f63
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: sdhci: not return error when SDMA is not suppported 96/223096/1
Jaehoon Chung [Wed, 22 Jan 2020 23:43:42 +0000 (08:43 +0900)]
mmc: sdhci: not return error when SDMA is not suppported

If host controller doesn't support SDMA mode, it doesn't need to return
error. Because it can be worked with PIO mode.
It doesn't need to use QUIRK_BROKEN_SDMA.

Change-Id: Iafbb915b3fd33209ba689e856bfd934acac9a03e
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agosamsung: tizen_rpi: add dfu setup informations 45/222845/2 accepted/tizen/unified/20200121.121258 submit/tizen/20200121.034330
Jaehoon Chung [Mon, 20 Jan 2020 21:55:14 +0000 (06:55 +0900)]
samsung: tizen_rpi: add dfu setup informations

Add dfu setup informations.
- usb controller index : 0
- dfu interface : mmc(eMMC/SD)
- default dfu device : 0

After applied this patch, it will be worked with "thor" instead of "thor 0 mmc 0".

Change-Id: I32294af8531532ea86333853fb208c2c23deb33d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: rpi_4_32b_defconfig: enable SDHCI_SDMA config 27/222827/2
Jaehoon Chung [Tue, 14 Jan 2020 03:43:06 +0000 (12:43 +0900)]
configs: rpi_4_32b_defconfig: enable SDHCI_SDMA config

Enable SDHCI_SDMA configuration.

Change-Id: If9ca4199125b13ac225697dfb631c2d4a13ed4df
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: bcm2835_sdhci: set SDHCI_QUIRK_BROKEN_SDMA flag 26/222826/2
Jaehoon Chung [Mon, 20 Jan 2020 09:50:45 +0000 (18:50 +0900)]
mmc: bcm2835_sdhci: set SDHCI_QUIRK_BROKEN_SDMA flag

RPI4 is used device-tree that taken from firmware.
mmcnr@73e00000 is enabled on device-tree, so it's probed on u-boot side.
Because it's for SDIO interface, it doesn't need to probe.
When SDMA is enabled, mmcnr's probe is always failed.

Below log is unnecessary :
  sdhci_setup_cfg: Your controller doesn't support SDMA!!
  mmcnr@7e30000 - probe failed: -22

Change-Id: Icb1cbebf9172d8bf6d14bd167e28eb3d570a21cd
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: sdhci: add quriks relevant to broken SDMA 25/222825/2
Jaehoon Chung [Mon, 20 Jan 2020 09:47:35 +0000 (18:47 +0900)]
mmc: sdhci: add quriks relevant to broken SDMA

ADd quirks relevant to broken SDMA.
If set to SDHCI_QUIRK_BROKEN_SDMA, it should be run the pio mode.

Change-Id: Iddae84fea4d1de0301b9afd45f9f55d7d3f8de74
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: sdhci: use phys2bus macro when dma address is accessed 24/222824/2
Jaehoon Chung [Mon, 20 Jan 2020 09:33:26 +0000 (18:33 +0900)]
mmc: sdhci: use phys2bus macro when dma address is accessed

Use phys2bus macro when dma address is accessed.
Some targets need to use phys2bus macro.(e.g, RPI4)
After applied it, SDMA mode can be used.

When thor download is used,
- Before : 1.8MB/s
- After : 7.23MB/s

Change-Id: Id63dbdc4bd48198ca33c2b55d9bdf3d9f1a4b570
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agospl: atf: cast NULL to uintptr_t explictly 26/221626/1 accepted/tizen/unified/20200108.131627 submit/tizen/20200107.060950
Seung-Woo Kim [Mon, 6 Jan 2020 09:46:08 +0000 (18:46 +0900)]
spl: atf: cast NULL to uintptr_t explictly

The bl31_entry() requires uintptr_t for its 3rd argument but NULL
is used calling the function. Cast it explictly to avoid
int-conversion build warning.

Change-Id: I0033c1bdcb9e115745ecec67950487cb85aeaba2
Fixes: d332415fe82f ("spl: atf: call bl31_entry function before jump to u-boot")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agolib: errno: avoid error format-overflow 25/221625/1
Heinrich Schuchardt [Sun, 6 Oct 2019 11:58:57 +0000 (13:58 +0200)]
lib: errno: avoid error format-overflow

In cmd/regulator.c an error occurs with GCC 9.2.1 if CONFIG_ERRNO_STR is
not defined:

cmd/regulator.c: In function ‘failure’:
cmd/regulator.c:20:2: error: ‘%s’ directive argument is null
[-Werror=format-overflow=]
   20 |  printf("Error: %d (%s)\n", ret, errno_str(ret));
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘constraint’,
    inlined from ‘constraint’ at cmd/regulator.c:111:12:
cmd/regulator.c:115:3: error: ‘%s’ directive argument is null
[-Werror=format-overflow=]
  115 |   printf(" %s (err: %d)\n", errno_str(val), val);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

errno_str() should return a valid string instead of NULL if
CONFIG_ERRNO_STR is not defined.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[sw0312.kim: cherry-pick mainline commit f279e1d9167f to remove gcc 9 build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ib7819bfd2bb93bd44801229c5fce8f4c511765c5

4 years agoconfigs: rpi_4_32b_defconfig: enable btrfs config 05/220505/1 accepted/tizen/unified/20191219.143702 submit/tizen/20191219.051336
Jaehoon Chung [Thu, 19 Dec 2019 04:25:19 +0000 (13:25 +0900)]
configs: rpi_4_32b_defconfig: enable btrfs config

Enable btrfs configuration to support BTRFS on u-boot.

Change-Id: I883ab759f48724bb6bac6804d95f58a2b07b1ab5
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: rpi_4_32b_defconfig: enable UMS configuration 88/220488/3
Jaehoon Chung [Thu, 19 Dec 2019 00:53:45 +0000 (09:53 +0900)]
configs: rpi_4_32b_defconfig: enable UMS configuration

Enable UMS configuration.
It can be used to usb-mass storage.
Usage: U-Boot> ums 0 mmc 0
- Then you can see block device node on your local host.

It's useful to flash or format for using Tizen.

Change-Id: Ic3a27a69a03d05691f60e764990d33d8bfef2275
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agosamsung: tizen_rpi: fix typo about boot.scr.uimg 87/220487/3
Jaehoon Chung [Thu, 19 Dec 2019 00:44:18 +0000 (09:44 +0900)]
samsung: tizen_rpi: fix typo about boot.scr.uimg

Fix typo about boot.scr.uimg.
- s/boot.src.uimg/boot.scr.uimg

Change-Id: I656f8f856cc918ca0239e12a709662269f6c10c9
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agousb: dwc2: fix possible alignment issues 27/220427/2
Simon Goldschmidt [Thu, 21 Nov 2019 21:15:23 +0000 (22:15 +0100)]
usb: dwc2: fix possible alignment issues

Since upgrading to gcc9, warnings are issued:
"taking address of packed member of ‘...’ may result in an unaligned
pointer value"

Fix this by converting dwc2_fifo_read to use unaligned access since packed
structures may be on an unaligned address, depending on USB hardware.

Change-Id: I4d86812b06e8c16f3e1cc8fdbe03f26653ecdac5
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>