Commit Graph

63404 Commits

Author SHA1 Message Date
Keerthy
805b3cac1e lib: elf: Move the generic elf loading/validating functions to lib
Move the generic elf loading/validating functions to lib/
so that they can be re-used and accessed by code existing
outside cmd.

While at it remove the duplicate static version of load_elf_image_phdr
under arch/arm/mach-imx/imx_bootaux.c.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Suggested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2020-03-03 13:08:14 +05:30
Vignesh Raghavendra
0900254c8c configs: j721e_hs_evm: Enable OSPI related configs
Enable OSPI related configs for J721e HS variant.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-03-03 13:08:14 +05:30
Vignesh Raghavendra
0b58688e1c configs: ama65x_hs_evm: Enable OSPI related configs
Enable OSPI related defconfigs for AM65x HS variant.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-03-03 13:08:13 +05:30
Vignesh Raghavendra
29ab5d3fb4 board: ti: Update AM65x and J721e READMEs for OSPI boot
Update AM65x and J721e README files with instructions for flashing OSPI
images.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-03-03 13:08:13 +05:30
Vignesh Raghavendra
36a5c8939b configs: am65x_evm_defconfig: Enable OSPI configs
Enable OSPI related defconfigs. Also enable SPL_DMA so that DMA is used
during OSPI boot

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-03-03 13:08:13 +05:30
Vignesh Raghavendra
9c0e1998e5 configs: j721e_evm_defconfig: Enable OSPI configs
Enable OSPI related defconfigs. Also enable SPL_DMA so that DMA is used
during OSPI boot

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-03-03 13:08:13 +05:30
Vignesh Raghavendra
97103b11d7 configs: j721e_evm: Setup mtdparts for OSPI
Set up mtdparts cmdline argument to be passed to kernel

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-03-03 13:08:13 +05:30
Vignesh Raghavendra
33e741c5c2 configs: am65x_evm: Setup mtdparts for OSPI
Set up mtdparts cmdline argument to be passed to kernel

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-03-03 13:08:13 +05:30
Vignesh Raghavendra
224d7fe263 ARM: dts: k3-j721e: Add OSPI DT nodes
Add OSPI DT nodes to enable OSPI at U-Boot prompt and also to support
OSPI boot.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-03-03 13:08:13 +05:30
Vignesh Raghavendra
9e9dfc1fc4 ARM: dts: k3-am65: Add OSPI DT nodes
Add OSPI DT nodes to enable OSPI at U-Boot prompt and also to support
OSPI boot.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-03-03 13:08:13 +05:30
Lokesh Vutla
7d0866b9be ARM: mach-k3: sysfw-loader: Use SPI memmapped addr when loading SYSFW
Since ROM configures OSPI controller to be in memory mapped mode in OSPI
boot, R5 SPL can directly pass the memory mapped pointer to ROM. With
this ROM can directly pull the SYSFW image from OSPI.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-03-03 13:08:13 +05:30
Vignesh Raghavendra
8915a40da4 ARM: mach-k3: arm64-mmu: map 64bit FSS MMIO space in A53 MMU
Populate address mapping entries in A53 MMU for 4 GB of MMIO space
reserved for providing MMIO access to multiple flash devices through
OSPI/HBMC IPs within FSS.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-03-03 13:08:13 +05:30
Vignesh Raghavendra
28ff144662 drivers: Descend to drivers/soc unconditionally
Descend to drivers/soc directory unconditionally for SPL and U-Boot
builds. Individual drivers can have their own config to check what needs
to be built for SPL. There should be no increase in SPL code size
due to this change.

This is required on K3 SoCs to support DMA in SPL.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-03-03 13:08:13 +05:30
Tom Rini
548ce227d3 Prepare v2020.04-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-02-26 07:53:20 -05:00
Tom Rini
1234d178a8 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx
- Update Sata node for T2080QDS and revert SATA related unrequired
  patches.
2020-02-25 23:35:53 -05:00
Tom Rini
133276f14a Merge branch '2020-02-25-master-imports'
- Assorted fixes
2020-02-25 13:59:21 -05:00
Carl Gelfand
be06032eb0 board: novtech: meerkat96: use correct mmc driver
When the board was originally submitted, it was attempting to use the
ESDHC driver. The board uses the USDHC driver.

Signed-off-by: Carl Gelfand <carl@novtech.com>
Cc: Shawn Guo <shawn.guo@kernel.org> (maintainer:MEERKAT96 BOARD)
Acked-by: Shawn Guo <shawnguo@kernel.org>
2020-02-25 13:46:25 -05:00
Markus Klotzbuecher
4f5c5e99bb moveconfig: convert ps.stderr to string
Printing the error message in verbose mode fails, since python3
doesn't implicitely convert bytes to strings.

Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-02-25 13:46:25 -05:00
Markus Klotzbuecher
b3192f48c1 moveconfig: replace unsafe eval with asteval
Commit b237d358b4 ("moveconfig: expand simple expressions") added
support for expanding expressions in configs, but used the unsafe python
built-in "eval". This patch fixes this by replacing eval with the
asteval module.

Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-02-25 13:46:25 -05:00
Heinrich Schuchardt
080cc0b1b3 MAINTAINERS: set maintainer for doc/api/efi.rst
doc/api/efi.rst belongs to the UEFI sub-system documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-02-25 11:39:54 -05:00
Wasim Khan
f381a26cb5 arch: arm: Fix SZ_64K undeclared compilation error
Macro SZ_64K is undeclared. Include sizes.h to fix the compilation
error.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-02-25 11:39:54 -05:00
Philippe Reynes
a3ca99c260 tools: image-host.c: remove uboot_aes.h
The include uboot_aes.h is not useful and
it breaks the compilation on android, so
we remove it.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reported-by: Praneeth Bajjuri <praneeth@ti.com>
2020-02-25 11:29:39 -05:00
Tom Rini
c2358258c2 Merge branch '2020-02-24-ci-htmldocs'
- Update our CI loops to run 'make htmldocs' and stop on errors
2020-02-25 09:06:50 -05:00
Heinrich Schuchardt
f3957b69fd doc/Makefile: turn warnings into errors
Several patches delivered incorrect restructured text as documentation. We
should be able to discover this in Travis CI, Gitlab CI, or Azure CI.

So let us turn all build warnings into errors.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-25 09:06:40 -05:00
Heinrich Schuchardt
4eb0fc996c azure: build HTML documentation
Several patches delivered incorrect restructured text as documentation. We
should be able to discover this in Azure CI.

Provide a build step for 'make htmldocs'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-25 09:06:40 -05:00
Heinrich Schuchardt
3eb7b78b42 gitlab: build HTML documentation
Several patches delivered incorrect restructured text as documentation. We
should be able to discover this in Gitlab CI.

Provide a build step for 'make htmldocs'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-25 09:06:40 -05:00
Heinrich Schuchardt
bb9a76ea67 travis: build HTML docs
Several patches delivered incorrect restructured text as documentation.
We should be able to discover this in Travis CI.

Provide a build step for 'make htmldocs'.

Add required package graphviz.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-25 09:06:40 -05:00
Tom Rini
f36f15b64b travis: Add python3-sphinx to the package list
In order to build htmldocs we need sphinx-build which comes from
python3-sphinx.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-02-25 09:06:40 -05:00
Peng Ma
ce92b89c40 arch: powerpc: Rewrite the sata node to fit the driver
The sata of our powerpc platforms are updated. These changes is to
fit the driver probe.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-02-25 10:16:05 +05:30
Peng Ma
a54c216bdf Revert "configs: enable sata device module in T2080QDS"
This reverts commit 02dc1599ba

Commit 02dc1599ba ("configs: enable sata, eSDHC, USB device module in
T2080QDS")

has some sata defconfig changes to fit support DM mode, Now the driver
will be reverted, So revert it.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-02-25 10:16:05 +05:30
Peng Ma
a2d4cb2523 Revert "powerpc: mpc85xx: delete FSL_SATA for T2080QDS board."
This reverts commit 856b9cdb53.

Commit 856b9cdb53 ("powerpc: mpc85xx: delete FSL_SATA for T2080QDS
board.") is to fit support sata DM mode, Now the driver will be reverted,
So revert it.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-02-25 10:16:05 +05:30
Peng Ma
5ff78d11e5 Revert "ata: fsl_ahci: Add sata DM support for Freescale powerpc socs"
This reverts commit 1ee4942918.

Commit 1ee4942918 ("ata: fsl_ahci: Add sata DM support for Freescale
powerpc socs") introduced SCSI layer to call AHCI private API in order
to support sata operations, In DM mode, This is not necessary for
non-AHCI sata. So revert it and have already updated the driver itself
to operate sata directly.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-02-25 10:16:05 +05:30
Heinrich Schuchardt
d94a3d1707 doc: update doc/sphinx/kerneldoc.py
Update doc/sphinx/kerneldoc.py from Linux next-20200219 to avoid warnings
like:

doc/sphinx/kerneldoc.py:125: RemovedInSphinx20Warning:
AutodocReporter is now deprecated. Use
sphinx.util.docutils.switch_source_input() instead.
  self.state.memo.reporter =
  	AutodocReporter(result, self.state.memo.reporter)

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-02-24 11:07:51 -05:00
Tom Rini
15ae500026 Azure / GitLab: Update Docker image
Bring in a newer Docker image to build on that has everything required
for running 'make htmldocs'.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-02-24 11:04:29 -05:00
Tom Rini
8e51bf746a Merge tag 'u-boot-rockchip-20200220' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- rk3399: split roc-pc-rk3399 out of evb_rk3399
- sync dts from upstream kernel for rk3399,rk3288,px30
- boot_mode: find the saradc device name
2020-02-20 22:14:29 -05:00
Tom Rini
4246fae418 Merge tag 'mmc-2-20-2020' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
- sdhci: code clean-up and fix cache coherency problem
- enable cache snooping on mpc830x
- Fix build error when MMC_WRITE disabled
2020-02-20 07:27:31 -05:00
Masahiro Yamada
4155ad9aac mmc: sdhci: fix missing cache invalidation after reading by DMA
This driver currently performs cache operation before the DMA start,
but does nothing after the DMA completion.

When reading data by DMA, the cache invalidation is needed also after
finishing the DMA transfer. Otherwise, the CPU might read data from
the cache instead of from the main memory when speculative memory read
or memory prefetch occurs.

Instead of calling the cache operation directly, this commit adds
dma_unmap_single(), which performs cache invalidation internally,
but drivers do not need which operation is being run.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-20 15:09:57 +08:00
Masahiro Yamada
58d8ace12b mmc: sdhci: use dma_map_single() instead of flush_cache() before DMA
Currently, sdhci_prepare_dma() calls flush_cache() regardless of the
DMA direction.

Actually, cache invalidation is enough when reading data from the device.

This is correctly handled by dma_map_single(), which mimics the DMA-API
in Linux kernel. Drivers can be agnostic which cache operation occurs
behind the scene.

This commit also sanitizes the difference between the virtual address
and the dma address.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-20 15:09:57 +08:00
Masahiro Yamada
a7b2b6cc0a mmc: add mmc_get_dma_dir() helper
Copied from Linux kernel.
include/linux/mmc/host.h

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-02-20 15:09:56 +08:00
Masahiro Yamada
fdd84c8be4 mmc: sdhci: remove unneeded casts
host->mmc is already (struct mmc *).

memalign() returns an opaque pointer, so there is no need for casting.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-02-20 15:09:56 +08:00
Masahiro Yamada
a2b0221c9c mmc: sdhci: use lower_32_bit2() and upper_32_bits() for setting adma_addr
Use {lower,upper}_32_bits() instead of the combination of cast
and shift.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-02-20 15:09:55 +08:00
Masahiro Yamada
f5df6aa1e6 mmc: sdhci: reduce code duplication for aligned buffer
The same code is run for both SDHCI_QUIRK_32BIT_DMA_ADDR and
define(CONFIG_FIXED_SDHCI_ALIGNED_BUFFER).

Unify the code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-02-20 15:09:55 +08:00
Masahiro Yamada
c8cc18b7a7 mmc: sdhci: put the aligned buffer pointer to struct sdhci_host
Using the global variable does not look nice.

Add a new field sthci::align_buffer to point to the bounce buffer.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-02-20 15:09:54 +08:00
Masahiro Yamada
057516308a dma-mapping: add <asm/dma-mapping.h> for all architectures
To avoid "asm/dma-mapping.h: No such file or directory" error,
we need something.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-20 15:09:54 +08:00
Peter Robinson
f9561d8e36 arch: arm: rockchip: order the rk3399 entries alphabetically
Put the target entries for rk3399 devices in alphabetical order.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-02-20 09:18:14 +08:00
Kever Yang
dfb2889cd4 rockchip: rk3399: add target type for evb based board
There are many boards share the board file and device header file with
rk3399 evb, add target type MACRO so that it is fixed instead of default
to the first target in "RK3399 board select".

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-02-20 09:18:14 +08:00
Tom Rini
9770f92d02 Pull request for UEFI sub-system for efi-2020-04-rc3
* Update the Kconfig description of CONFIG_EFI_RNG_PROTOCOL
 * Fix a function comment resolving a warning in 'make htmldocs'
 -----BEGIN PGP SIGNATURE-----
 
 iQIyBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl5NgEcACgkQxIHbvCwF
 GsToUg/4mA5RSAri053hz94Y2kd2W6FCB7op+6qFLkW+7eUNuJtuY5adl6LtZouv
 C0T/UyjouZNszBRG+gssJfM6zdVeJdfxo/TKF4C8Xx3/8khr/3bH3FQO/HSE9Rzs
 0LehV8ADTQtdR/1In01yWrny48gVCl6O5FLLXWg5OouoKr4rrQsAVSwW4FoWVvfQ
 MiBY/TAu/FVQchvhBgV8Mp42MdxZ55MZqru+dariZW9EAVERNDg4wUBl0SryRrY8
 s/mT284RKAgEunKQ1+GdHqeUZO0J2mes7pLxgB5W61Q+xWcryCmReuZ7BAQeAwIn
 IshPghmZ7OErRwxeOLDTXmtQ1VvU6fEWffB69k5l+3Vr9IdfmP9mevmppTj50Zvz
 +nQWKKYV1WTS/sJ8uOXmiIvlpPUTuDe8XCdb3NsM4uB3vsYc8q4NZVjAGH+l3rQh
 uFW7qIM9/uPEfFccOLoQPpZ1k9uQ2m4DlvL4utSpzHEMRjedG5xJpB2e9DLeCmtA
 0k+Nlef8/biOsdUl43rwF2aGMEcE17vhCQaHgdygYXa2gWi5Zm/iLfsmjvfqCw54
 RaVls9t7APdvAmE8Gkvg55sV+NmmpQM/VKDayvL49Vfp0BYQU/pmeKQMt4Na9SlH
 mrAFHm74R2iIDtFGVKRGIxybOfc6XeK1HUBF4WF5HdiBHrvLxQ==
 =ea2S
 -----END PGP SIGNATURE-----

Merge tag 'efi-2020-04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-04-rc3

* Update the Kconfig description of CONFIG_EFI_RNG_PROTOCOL
* Fix a function comment resolving a warning in 'make htmldocs'
2020-02-19 17:25:26 -05:00
Masahiro Yamada
9d86b89c59 dma-mapping: move dma_map_(un)single() to <linux/dma-mapping.h>
The implementation of dma_map_single() and dma_unmap_single() is
exactly the same for all the architectures that support them.

Factor them out to <linux/dma-mapping.h>, and make all drivers to
include <linux/dma-mapping.h> instead of <asm/dma-mapping.h>.

If we need to differentiate them for some architectures, we can
move the generic definitions to <asm-generic/dma-mapping.h>.

Add some comments to the helpers. The concept is quite similar to
the DMA-API of Linux kernel. Drivers are agnostic about what is
going on behind the scene. Just call dma_map_single() before the
DMA, and dma_unmap_single() after it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-19 21:27:30 +08:00
Masahiro Yamada
950c596867 dma-mapping: fix the prototype of dma_unmap_single()
dma_unmap_single() takes the dma address, not virtual address.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-19 21:27:30 +08:00
Masahiro Yamada
c22c0dbd7d dma-mapping: fix the prototype of dma_map_single()
Make dma_map_single() return the dma address, and remove the
pointless volatile.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-19 21:27:30 +08:00