Commit Graph

15486 Commits

Author SHA1 Message Date
Ley Foon Tan
d44f793207 pci: intel: Fix configuration type based on secondary number
This fix issue when access config from PCIe switch.

The PCIe controller need to send Type 0 config TLP if the targeting bus
matches with the secondary bus number, which is when the TLP is targeting
the immediate device on the link.

The PCIe controller send Type 1 config TLP if the targeting bus is
larger than the secondary bus, which is when the TLP is targeting the
device not immediate on the link.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2019-08-11 16:43:41 -04:00
Ley Foon Tan
bf9b9813ad pci: intel: Fix error when enumerating multi-function PCIe device
Hardware return completion status non-zero when read from non exist
function in multi-function PCIe device. Return error will cause PCIe
enumeration fail.

Change it to return 0 and return value 0xffffffff when error.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2019-08-11 16:43:41 -04:00
Ley Foon Tan
d0e52c6f29 pci: intel: Increase TLP polling counter
Some PCIe devices require longer time to response.
Increase polling counter to 20000 (~100ms).

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2019-08-11 16:43:41 -04:00
Tom Rini
feb5a02f86 Merge branch 'master' of git://git.denx.de/u-boot-sh
- R8A77980 V3H support
2019-08-10 17:57:58 -04:00
Tom Rini
31d136926b Merge branch 'master' of git://git.denx.de/u-boot-usb
- DaVinci USB updates
- Various OHCI fixes
- Gadget fixes
2019-08-10 12:21:27 -04:00
Tom Rini
9fd8b2c8c7 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- Enable SD slot on Intel Edison
- Populate CSRT ACPI table for shared DMA controller on Intel Tangier
- Convert Intel ICH-SPI driver to use new spi-mem ops
- Enable config_distro_bootcmd for QEMU x86
- Support U-Boot as a payload for Intel Slim Bootloader
- Avoid writing temporary asl files into the source tree which fixes the
  parallel build issue occasionally seen
2019-08-09 23:27:15 -04:00
Marek Vasut
ca6da6dd93 clk: renesas: Add R8A77980 V3H clock tables
Import R8A77980 V3H clock tables from Linux 5.2.7 , commit 5697a9d3d55f.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-08-09 23:15:01 +02:00
Marek Vasut
f497ec368e pinctrl: renesas: Add R8A77980 V3H PFC tables
Import R8A77980 V3H PFC tables from Linux 5.2.7 , commit 5697a9d3d55f.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-08-09 23:15:01 +02:00
Marek Vasut
7234a28664 net: sh_eth: Fix 64bit build warnings
Fix various type warnings when building this driver for 64bit machine.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-08-09 23:15:01 +02:00
Marek Vasut
46c33166d1 net: sh_eth: Add R8A77980 V3H gether support
The R8A77980 V3H gether needs a few minor adjustments to the sh_eth
driver, add them to support ethernet on R8A77980.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-08-09 23:15:01 +02:00
Trent Piepho
b78d97ea49 mmc: Move tegra loopback disable option to be under tegra
This is a configuration option specific to the tegra controller.

Doing it this way makes it show up directly under the tegra controller
option, indented one level, as "Disable external clock loopback".

The way it is now, it shows up at the end of the controller list, not
indented, as if it's some kind of generic MMC configuration option.

Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Tom Warren <twarren@nvidia.com>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-08-09 10:01:34 -07:00
Bernhard Messerklinger
0709ddb68f x86: ich-spi: Convert driver to spi-mem ops
With the introduction of the new spi-mem model operations changed
slightly. The new spi-mem operations make things a bit easier to
handle for ich-spi flash interface. This patch converts the ich-spi
driver by using spi-mem operations.

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Tested on Intel CrownBay and MinnowMax
Tested-by: Bin Meng <bmeng.cn@gmail.com>

[bmeng: fix compiler warnings when building the driver for 64-bit]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-08-09 22:24:02 +08:00
Heinrich Schuchardt
fd95e10178 bios_emulator: remove stray break
Remove a stray break which suppresses some debug messages.

Indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Bin Meng <bmeng.cn@gmail.com>
2019-08-09 22:24:02 +08:00
Tom Rini
163bc1e4da Merge tag 'mmc-8-9' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
- mmc test fix
- sdhci driver fix
2019-08-09 07:29:54 -04:00
Tom Rini
21bc1935b1 Merge tag 'u-boot-rockchip-20190809' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- Add rk3399 boards Khadas Edge/-V/-Captain
- Add fully souce code support for rk3328 including TPL/DRAM init
- Enable boot from eMMC for rk3399 rock960/ficus boards
- turn on the IO supply for dw_mmc
2019-08-09 07:29:20 -04:00
Peng Fan
d569b4b0a4 mmc: tangier_sdhci: fix uninitialized pointer deref on probe
Commit 3d296365e4 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Vincent Tinelli <vincent.tinelli@intel.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-08-09 13:45:25 +08:00
Peng Fan
d703104507 mmc: sdhci-cadence: fix uninitialized pointer deref on probe
Commit 3d296365e4 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-08-09 13:45:25 +08:00
Peng Fan
6f16cbe55b mmc: s5p: fix uninitialized pointer deref on probe
Commit 3d296365e4 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-08-09 13:45:25 +08:00
Peng Fan
a5abe152b2 mmc: pci: fix uninitialized pointer deref on probe
Commit 3d296365e4 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-08-09 13:45:25 +08:00
Peng Fan
6904e1b250 mmc: msm_sdhci: fix uninitialized pointer deref on probe
Commit 3d296365e4 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-08-09 13:45:25 +08:00
Peng Fan
425d83346d mmc: bcm: fix uninitialized pointer deref on probe
Commit 3d296365e4 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Matthias Brugger <mbrugger@suse.com>
Cc: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-08-09 13:45:25 +08:00
Peng Fan
7835e87322 mmc: atmel_sdhci: fix uninitialized pointer deref on probe
Commit 3d296365e4 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Eugen Hristev <eugen.hristev@microchip.com>
2019-08-09 13:45:25 +08:00
Matwey V. Kornilov
3148a3c2d3 mmc: zynq_sdhci: fix uninitialized pointer deref on probe
Since commit 3d296365e4 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field. Move the mmc field initialization before sdhci_setup_cfg()
call to avoid crash on mmc pointer dereference.

[this patch is based on commit 41a9fab8da ("mmc: mv_sdhci: fix
uninitialized pointer deref on probe") by Baruch Siach]

Fixes: 3d296365e4 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu102/zc706)
2019-08-09 13:45:25 +08:00
Faiz Abbas
68b3e8b398 mmc: Select SPL_HS200_SUPPORT if SPL_HS400_SUPPORT is selected
Select SPL_HS200_SUPPORT if SPL_HS400_SUPPORT is selected as is being
done for the U-boot case.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-08-09 13:45:25 +08:00
Tom Rini
fef408679b Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- Remove unused bcm2835 watchdog driver (still non-DM)
- Cosmetic fixup of mtk_wdt.c
2019-08-08 09:19:08 -04:00
Sam Protsenko
29a81142be fastboot: Remove "bootloader-version" variable
As per [1], there is no such fastboot variable as "bootloader-version".
Only "version-bootloader" is supported. Let's reflect this and not
confuse users further.

[1] https://android.googlesource.com/platform/system/core/+/refs/tags/android-q-preview-4/fastboot/README.md

Fixes: 3aab70afc5 ("usb/gadget: add the fastboot gadget")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
2019-08-08 11:35:02 +02:00
Sam Protsenko
139db354b1 fastboot: getvar: Add "is-userspace" variable
As per documentation [1], Android-Q requires for bootloader to provide
"is-userspace" variable. "no" value should be always returned. This
patch implements this fastboot variable.

[1] https://android.googlesource.com/platform/system/core/+/refs/tags/android-q-preview-4/fastboot/README.md

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
2019-08-08 11:35:02 +02:00
Ralph Siemsen
fe876984a4 usb: gadget: f_dfu.c: fix memory leak
dfu_prepare_function() allocates N+1 descriptor header structures,
the last one being the "DFU Functional Descriptor".

dfu_unbind() handles de-allocation, but fails to free the final
one (eg. "DFU Functional Descriptor"), leading to memory leak.

Fixed by incrementing counter, as in dfu_prepare_function().

Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
2019-08-08 11:35:02 +02:00
Sam Protsenko
160102d112 fastboot: Remove "slot-suffixes" variable
"slot-suffixes" variable was dropped in fastboot tool (in [1]). Let's
track AOSP/master and drop this variable in U-Boot as well.

[1] 42b18a518b

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
[lukma: Remove getvar_slot_suffixes() declaration]
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-08-08 11:35:02 +02:00
Heiko Schocher
991e66017c usb, ohci, pci: add DM support for PCI-based OHCI USB controller
add new DM based PCI driver ohci-pci for PCI-based
OHCI USB support.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-08-08 11:35:02 +02:00
Heiko Schocher
f9c7fecbeb usb, ohci: add warning if none on pci found
Signed-off-by: Heiko Schocher <hs@denx.de>
2019-08-08 11:35:02 +02:00
Heiko Schocher
dc4e48d845 usb, ohci-hcd: set OHCI_USE_NPS if DM_PCI
set OHCI_USE_NPS if DM_PCI is enabled.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-08-08 11:35:02 +02:00
Heiko Schocher
a5a7486e62 usb, ohci: fix ohci swap register access
commit 57faca19a8 ("drivers: USB: OHCI: allow compilation for 64-bit targets")
broke ohci support for the mpc85xx based socrates board,
as it removed volatile keyword from ohci_readl/writel.

Fix this so usb works again on socrates board.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-08-08 11:35:02 +02:00
Heiko Schocher
b005d7d5f9 usb, ohci-hdc: fix warning 'ohci_pci_ids' defined but not used
var ohci_pci_ids is only used if DM_USB is not enabled.
So define this varaible only if
!CONFIG_IS_ENABLED(DM_USB)

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-08-08 11:35:02 +02:00
Adam Ford
5608331d81 usb: musb-new: Add support for da8xx-musb
With the recently added phy driver, this patch will enable the
musb driver on the da8xx to operate in host mode.

Signed-off-by: Adam Ford <aford173@gmail.com>
2019-08-08 11:35:02 +02:00
Adam Ford
fc58263d2e phy: Add support for phy-da8xx-usb
In preparation for supporting the musb driver, this patch
adds support for the usb phy associated with the musb driver.

Signed-off-by: Adam Ford <aford173@gmail.com>
2019-08-08 11:35:02 +02:00
Ramon Fried
6948f1023f pci_ep: Fix Coverity warning
Fix the following Coverity warning:
CID 244086:  Incorrect expression  (BAD_COMPARE)
Comparing pointer "ep_bar" against NULL using anything besides == or
is likely to be incorrect.

Fixes: 914026d258 ("drivers: pci_ep: Introduce UCLASS_PCI_EP uclass")

Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
2019-08-07 15:31:04 -04:00
Ryder Lee
2d88b5a38e clk: MediaTek: add hifsys entry for MT7623 SoC.
This adds high speed interface subsystem - hifsys (i.e. PCIe and USB)
for MT7623 SoC and enables its reset controller.

The control block is shared with ethsys and accordingly rename the
related defines.

Tested-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
2019-08-07 15:31:03 -04:00
Kever Yang
85a38742e0 rockchip: ram: add full feature rk3328 DRAM driver
This driver supports DDR3/LPDDR3/DDR4 SDRAM initialization.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
[cherry picked from commit 9fb0777ec3 with minor modifications]
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-08-05 21:14:45 +08:00
Stefan Roese
c07f68dd66 watchdog: mtk_wdt: Cosmetic cleanup of latest changes
This patch cleans up some coding style related issues in the mtk_wtd
driver to make this driver comply again with the U-Boot coding style
standards.

The only minimal functional change is that the timeout parameter is now
passed in (u64) instead of (unsigned int) from mtk_wdt_start() to
mtk_wdt_set_timeout(), preserving the original value.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Shannon Barber <sbarber@dataspeedinc.com>
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
2019-08-05 11:50:11 +02:00
Stefan Roese
c7adc0b5f9 watchdog: bcm2835_wdt: Remove unused BCM283x watchdog driver and its references
The BCM2835/2836 watchdog is not used in mainline U-Boot at all. This
patch removes the driver and its references (CONFIG_BCM2835_WDT)
completely.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Paolo Pisati <p.pisati@gmail.com>
2019-08-05 11:50:06 +02:00
Tom Rini
898c40c0d6 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-clk
- Port more CCF code to work with i.MX8 devices.
2019-08-02 13:29:46 -04:00
Tom Rini
bbaf56eda0 - sync Amlogic G12A DT with linux 5.3-rc1
- add support for 4GiB DRAM memory
 - add support for Amlogic G12B based Odroid-N2
 - small duplicate logic fix for gxbb clock driver
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAl1BkXMACgkQd9zb2sjI
 SdGd+Q/+IdXgTvox69NbfvhyA8d7GwhTWVIKgrF3NvHpxYqvvxmC7gTx1Qdh5sAO
 vyKsuygim9R/Rt7X7bzE/a1gKju/DpkxFJ0hx148xDJXmtzeBSWmDO/oOnZpUZRM
 aRUjncjxvMOZ3axtsWAZSiKqDF5i/K9Y3v/6JaLCs3WmVzlLrgANUSWqdC/Qc1Ka
 HLjem/ug3HK+o/zg0pXS3VguOTOMEV63hlWHlo2jKnxLmBpxcp1O7kH8noKR90+P
 x/byo+GAzayYv6oS0yeUz8YEXIMDVdkEX0eFzkRfe7ykz5lwGONdpLcdjmIIk6nO
 Kef7HNsRTb5ku9QPlgVLHodHNeGsV3axvmPLJQDki6/sgQmZSBWsUWPNt0yZuUjT
 gU2o7XoNmIh49hxk8ShDttGkCAYmacJwhQZ0TMV2q8q0YkDmeTWpzY5JIWq5VRLj
 0W9moxSO5SieM0FSwR/v7J2egPrz0ocOSs7XpQqH7ZNduBjq0jHwhS7Yu8wcbXTA
 baBta3tBKJhjYpfPrexrWOw1NW2fwW5kJJpnMY68nDG/ygTb++syVvTjjiqTfemI
 kIs6aBZ0AEo7WMrehdtHRFmW9SQC6h5h0Ji7bR20TigSGLe+5f0R8tASDD+0FXLB
 KID+sigdyHxM9B6uACR1pOqCjEb+IyyFXJno38v7DjaW/IoyC3k=
 =Q5fc
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-20190731' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic

- sync Amlogic G12A DT with linux 5.3-rc1
- add support for 4GiB DRAM memory
- add support for Amlogic G12B based Odroid-N2
- small duplicate logic fix for gxbb clock driver
2019-07-31 16:06:24 -04:00
Tom Rini
08c41ca1ef Merge branch '2019-07-31-ti-imports'
- Various DaVinci fixes
- Migrate am335x_boneblack_vboot to use more DM drivers
- Keystone updates
2019-07-31 14:20:55 -04:00
Heinrich Schuchardt
51443f57d8 nand: davinci: avoid out of bounds array access
The array bounds have to be checked before accessing the array element.

Identified by cppcheck.

Fixes: 67ac6ffaee ("mtd: nand: davinci: add opportunity to write keystone U-boot image")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-07-31 13:08:07 -04:00
Tom Rini
3fe483b13e Merge tag 'mmc-7-31' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
A new mmc/sd block test case
Bug fixes for sdhci and mv_sdhci
2019-07-31 08:34:35 -04:00
Heinrich Schuchardt
0c0cdc8610 clk: meson: remove duplicate logic
First thing we check in meson_clk_set_rate_by_id() is current_rate == rate.
There is not need to check it again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-07-31 12:11:04 +02:00
Baruch Siach
fea3939d31 mmc: relocate code comment
The comment about init op being NULL used to be next to the NULL check
code. Commit 8ca51e51c1 ("dm: mmc: Add a way to use driver model for
MMC operations") separated the comment from the code. Put them back
together.

Fixes: 8ca51e51c1 ("dm: mmc: Add a way to use driver model for MMC operations")
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 15:31:36 +08:00
Weijie Gao
caa332336d mmc: mtk-sd: add WATCHDOG_RESET() to prevent watchdog timeout
When reading large data in once (reading 512MiB is tested on MT7623), a
watchdog timeout is triggered due to watchdog not being fed.

This patch adds WATCHDOG_RESET() to msdc_start_data() so the watchdog will
be fed every 1024 blocks are read/written.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-07-31 15:31:36 +08:00
Baruch Siach
58d65d5082 mmc: sdhci: fix chip detect gpio property name
The standard property name for chip-detect gpio is "cd-gpios". All
in-tree DT files use only this name.

Fixes: 451931ea70 ("mmc: sdhci: Read cd-gpio from devicetree")
Cc: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 15:31:36 +08:00
Baruch Siach
41a9fab8da mmc: mv_sdhci: fix uninitialized pointer deref on probe
Since commit 3d296365e4 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field. Move the mmc field initialization before sdhci_setup_cfg()
call to avoid crash on mmc pointer dereference.

Fixes: 3d296365e4 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2019-07-31 15:31:36 +08:00
Peng Fan
8f611dc71c clk: sandbox: add composite clk
Add composite clk to sandbox driver

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Peng Fan
2b12957d01 clk: gate: support sandbox
Introduce io_gate_val for sandbox clk gate test usage

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Peng Fan
0009763588 clk: add composite clk support
Import clk composite clk support from Linux Kernel 5.1-rc5

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Peng Fan
91944ef09d dm: clk: ignore default settings when node not valid
When the device not binded with a node, we need ignore
the parents and rate settings.

Cc: Simon Glass <sjg@chromium.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Peng Fan
4b91ec076d clk: imx: gate2 add set rate
Add set rate for imx clk-gate2

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Peng Fan
b6c56d90b8 clk: imx: import clk heplers
Import some clk helpers from Linux Kernel for i.MX8MM usage

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Peng Fan
4f305bf1b6 clk: fixed_rate: export clk_fixed_rate
Export the structure for others to use.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Peng Fan
fe69b030de clk: divider set rate supporrt
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Peng Fan
1c64330318 clk: add clk-gate support
Import clk-gate support from Linux Kernel 5.1-rc5

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Peng Fan
4b044082c1 clk: mux: add set parent support
Add set parent support for clk mux

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Peng Fan
5b27ff8986 clk: use clk_dev_binded
Preparing to support composite clk.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Peng Fan
2457612d6d clk: introduce clk_dev_binded
When support Clock Common Framework, U-Boot use dev for
clk tree information, there is no clk->parent. When
support composite clk, it contains mux/gate/divider,
but the mux/gate/divider is not binded with device.
So we could not use dev_get_uclass_priv to get the correct
clk_mux/gate/divider. So add clk_dev_binded to let
choose the correct method.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-31 09:20:51 +02:00
Urja Rannikko
2b157019bb dw_mmc: turn on the IO supply
Fixes the microSD slot on the ASUS C201.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com<mailto:peng.fan@nxp.com>>
2019-07-31 09:07:30 +08:00
Tom Rini
a239147fa2 - fix EDID mode filtering
- extend mxc_ipuv3_fb to enable backlight/display
 - include fb_base in global_data for DM_VIDEO
 - show frame buffer address via board info
   as used to be with legacy VIDEO support
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCXUCEtQ4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXLYhAJ4gSCCx54ubBmbsZ1cueGk59E/SkwCdFl7nfLqz
 Vy/HbBVAUkzD4JVOR0U=
 =7rSM
 -----END PGP SIGNATURE-----

Merge tag 'video-for-2019.10-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- fix EDID mode filtering
- extend mxc_ipuv3_fb to enable backlight/display
- include fb_base in global_data for DM_VIDEO
- show frame buffer address via board info
  as used to be with legacy VIDEO support
2019-07-30 19:19:54 -04:00
Tom Rini
476a3143d7 Xilinx/FPGA changes for v2019.10
fpga:
 - Xilinx virtex2 cleanup
 - Altera cyclon2 cleanup
 
 zynq:
 - Minor Kconfig cleanup
 - Add psu_init configuration for Z-turn board
 
 zynqmp:
 - Add support for pmufw config passing to PMU
 - script for psu_init conversion
 - zcu1275 renaming
 
 xilinx:
 - Add support for UltraZed-EV SoM
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCXUBgGwAKCRDKSWXLKUoM
 IcJJAKCUoHRpqNgcZUiE10D9/VhZ3bUVtwCgi0fzSlqgHVG2EzApfqN+2KfrGJo=
 =7i0K
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-for-v2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx/FPGA changes for v2019.10

fpga:
- Xilinx virtex2 cleanup
- Altera cyclon2 cleanup

zynq:
- Minor Kconfig cleanup
- Add psu_init configuration for Z-turn board

zynqmp:
- Add support for pmufw config passing to PMU
- script for psu_init conversion
- zcu1275 renaming

xilinx:
- Add support for UltraZed-EV SoM
2019-07-30 19:19:34 -04:00
Tom Rini
dcf722ece6 Merge branch 'master' of git://git.denx.de/u-boot-sh 2019-07-30 19:19:04 -04:00
Heiko Schocher
42a7ce27d9 mxc_ipuv3_fb.c: enable a backlight on a panel
check if we get a panel device, if so, enable
the backlight on it.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-30 12:58:33 +02:00
Heiko Schocher
f4ec1ae08e mxc_ipuv3_fb.c: call display_enable
call display_enable, so a display gets enabled.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-30 12:57:47 +02:00
Heiko Schocher
f03e56adad mxc_ipuv3_fb.c: set gd->fb_base
set gd->fb_base so it can be shown with bdinfo command.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-30 12:55:06 +02:00
Alexander Dahl
b283d6ba67 fpga: altera: cyclon2: Check function pointer before calling
As already done for the 'pre' function, a check is added to not follow a
NULL pointer, if somebody has not assigned a 'post' function.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
2019-07-30 10:21:15 +02:00
Alexander Dahl
3911b19cac fpga: altera: cyclon2: Fix indentation
Some code parts stood too far left …

Signed-off-by: Alexander Dahl <ada@thorsis.com>
2019-07-30 10:21:14 +02:00
Alexander Dahl
bb2c0fa03e fpga: altera: cyclon2: Fix most checkpatch warnings
Nothing special, but done before further cleanup.

* spacing
* braces
* __FUNCTION__ → __func__

Suggested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Alexander Dahl <ada@thorsis.com>
2019-07-30 10:21:13 +02:00
Robert Hancock
175dccd710 fpga: virtex2: Add slave serial programming support
This adds support for slave serial programming, in addition to the
previously supported slave SelectMAP mode. There are two ways that this
can be used:

-Using the clk and wdata callbacks in order to write image data one bit
at a time using pure bit-banging. This works, but is rather painfully
slow with typical image sizes.

-By specifying the wbulkdata callback instead, the image loading process
can be offloaded to SPI hardware. In this mode the clk and wdata
callbacks do not need to be specified. This allows the image to be
loaded much faster, taking only a few seconds with even relatively large
images.

Slave serial programming has been tested on the Kintex-7 series of
FPGAs.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-07-30 10:20:06 +02:00
Robert Hancock
a0549f7390 fpga: virtex2: Add additional clock cycles after DONE assertion
Some Xilinx FPGA configuration options can result in the startup
sequence extending past the end of the FPGA bitstream. Continue applying
CCLK clock cycles for 8 cycles after DONE is asserted in order to ensure
the startup sequence is complete, as recommended by Xilinx.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-07-30 10:20:06 +02:00
Robert Hancock
3372081cfd fpga: virtex2: Split out image writing from pre/post operations
This is in preparation for adding slave serial programming support,
which uses the same pre/post operations as slave SelectMAP, to avoid
duplicating code.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-07-30 10:20:06 +02:00
Robert Hancock
25d63a3677 fpga: virtex2: added Kconfig option
Add an option to allow this driver to be selected with Kconfig. As noted
in the description, this driver should also work with many newer Xilinx
FPGA families as the programming methods are essentially the same.

Also added a missing FPGA_XILINX dependency to the similar Spartan 3
driver.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-07-30 10:20:06 +02:00
Robert Hancock
fa57af0552 fpga: virtex2: cosmetic: Cleanup code style
Address Checkpatch warnings in virtex2 code prior to making other
changes. No functional change intended.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-07-30 10:20:06 +02:00
Tom Rini
333755ef7b Merge branch '2019-07-29-ti-imports'
- More DaVinci DM migration, drop am18xx EVM platform
- Keystone bug fix
2019-07-29 17:59:15 -04:00
Bartosz Golaszewski
29d8eb3345 nand: davinci: add support for driver model
Extend the davinci NAND driver to support the driver model. For now this
doesn't add any device-tree parsing due to the fact that we can't access
the actual nand node on the device-tree - it's a subnode of the aemif
device and we don't have an aemif driver on davinci at the moment.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-07-29 17:58:52 -04:00
Bartosz Golaszewski
7bf9972643 nand: davinci: make davinci_nand_init() static
This function is only used within the driver itself. No need
to export it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-07-29 17:58:52 -04:00
Bartosz Golaszewski
e31148247a i2c: remove i2c driver-model compatibility layer
There are no more users of the compatibility layer for i2c. Remove the
driver and all references to it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Heiko Schocher <hs@denx.de>
2019-07-29 17:58:52 -04:00
Tom Rini
2d64a0f7e9 Merge branch '2019-07-29-master-imports'
- Assorted bug fixes
2019-07-29 11:51:17 -04:00
Heiko Schocher
0c4e81e0eb rtc, rx8025: add DM support
add DM support for this RTC driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-29 09:32:12 -04:00
Heiko Schocher
f91fb7242a rtc, rx8025: fix Coding Style
fix Coding Style for this driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-29 09:32:12 -04:00
Heiko Schocher
a7e6d0c45a rtc: move RTC_RX8025 to Kconfig
move RTC_RX8025 to Kconfig and fixup board configs.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-29 09:32:11 -04:00
Fabien Parent
e66b202eb3 pinctrl: mediatek: fix warning
Fix the following warning when CONFIG_PINCONF=n:

drivers/pinctrl/mediatek/pinctrl-mtk-common.c:35:36:
warning: ‘mtk_drive’ defined but not used [-Wunused-const-variable=]
 static const struct mtk_drive_desc mtk_drive[] = {
                                    ^~~~~~~~~

Signed-off-by: Fabien Parent <fparent@baylibre.com>
2019-07-29 09:32:10 -04:00
Heiko Schocher
49b10cb492 gpio: fixes for gpio-hog support
recently added gpio hog patch was "in discussion"
state with Simon Glass. This patch now adds most
of comments from Simon Glass.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-29 09:32:10 -04:00
Keerthy
5917d0b877 doc: arch: sandbox: Replace all the instances of README.sandbox
commit 49116e6d23 ("doc: arch: Convert README.sandbox to reST")
Moves README.sandbox to doc/arch.
Replace all the existing instances to point to the right documentation
file.

Signed-off-by: Keerthy <j-keerthy@ti.com>
2019-07-29 09:32:09 -04:00
Tom Rini
92430b8fc8 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-socfpga
- Various gen5 fixes
2019-07-29 09:03:11 -04:00
Tom Rini
ad4a699cfe - dcu and imx7 DM_VIDEO conversion
- lb070wv8 compatible in simple_panel driver
 - bmp_logo improvements for DM_VIDEO
 - EDID updates to filter supported modes
 - meson_dw_hdmi: support EDID mode filtering
 - dw_hdmi: support ddc-i2c-bus phandle for external I2C masters
 - fix rpi crash when firmware doesn't report connected display
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCXT6z3g4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXNhfAJ9r0ewu4sKAiLZl7fcOoYYjgz30TACeIrchuxwH
 x9SiZYFntOLL0trK/O0=
 =ZsD5
 -----END PGP SIGNATURE-----

Merge tag 'video-for-2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- dcu and imx7 DM_VIDEO conversion
- lb070wv8 compatible in simple_panel driver
- bmp_logo improvements for DM_VIDEO
- EDID updates to filter supported modes
- meson_dw_hdmi: support EDID mode filtering
- dw_hdmi: support ddc-i2c-bus phandle for external I2C masters
- fix rpi crash when firmware doesn't report connected display
2019-07-29 09:02:46 -04:00
Tom Rini
c957be9ba0 Merge tag 'u-boot-rockchip-20190729' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- Clean up and migrate to use common rockchip spl board file
- Clean up and migrate to use common rockchip board file
- Increase rk3288 CONFIG_SYS_BOOTM_LEN to 16MB
2019-07-29 09:02:15 -04:00
titron
b5f563e588 pinctrl: renesas: fix R-Car gpio0_00 operation fails with 'gpio -input' command
Fix GPIO bank 0 pin 0 request/release off by one error. Without this
patch, it is not possible to request/release GPIO bank 0 pin 0.

Signed-off-by: Tiezhuang Dong <tiezhuang.dong.yh@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Eugeniu Rosca <roscaeugeniu@gmail.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
2019-07-29 13:38:55 +02:00
Fabian Vogt
970baf16d1 video: arm: rpi: Bail out early if querying video information fails
When probing we query for the width and hight of the display. If the
firmware does not report any connected display the system will crash.
See https://github.com/raspberrypi/firmware/issues/1157 for details.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
[mb: update commit message]
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
2019-07-29 10:14:04 +02:00
Kever Yang
84a6a27ae3 rockchip: rk3188: init CPU freq in clock driver
Init CPU frquency in clock driver instead of in SPL board file,
this will help for use common board file later.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-07-29 10:25:27 +08:00
Niklas Schulze
60a62acfb0 video: dw_hdmi: Add support for ddc-i2c-bus property
Add support for the ddc-i2c-bus device tree property which allows
for using an external i2c master for reading the display's EDID.

Signed-off-by: Niklas Schulze <me@jns.io>
2019-07-29 00:32:59 +02:00
Neil Armstrong
233358c46a video: meson: dw-hdmi: add EDID mode filtering to only select supported modes
Add support for the new mode_valid() display op to filter out unsupported
display DMT timings.

This is useful when connected to 4k displays, since we only support DMT
monitors up to 1920x1080, the 4k native timings are discarded to select
supported timings.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-07-29 00:22:02 +02:00
Neil Armstrong
eb4ee4e436 video: display: use edid_get_timing_validate() variant to filter supported EDID modes
Introduce a new display op, mode_valid() to be used with the newly
introduced edid_get_timing_validate() function, to filter supported
monitor timings if handled by the display driver.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-07-29 00:21:49 +02:00
Heiko Schocher
85288ffee6 video, simple_panel: add lg,lb070wv8 display
add "lg,lb070wv8" display to compatible node.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-29 00:20:19 +02:00
Igor Opaniuk
e19441ecbc video: mxsfb: fix mxsfb fbdev binding issues
Add support for display and bits-per-pixel properties.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-07-29 00:11:16 +02:00