Anatolij Gustschin [Mon, 3 Aug 2020 13:45:33 +0000 (15:45 +0200)]
video: ipuv3: fix framebuffer base address init with multiple IPUs
Since commit
7812bbdc3732 ("video: Correctly handle multiple
framebuffers") the vidconsole output is missing on the primary
display on boards with two IPU units (all i.MX6Q/D based boards).
The base address of the allocated framebuffer is not correctly
programmed in the display controller. Fix it.
Reported-by: Soeren Moch <smoch@web.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Tested-by: Soeren Moch <smoch@web.de>
Soeren Moch [Thu, 30 Jul 2020 12:11:57 +0000 (14:11 +0200)]
board: tbs2910: Fix video output with existing environments
Migration to DM_VIDEO changed the output device name (in stout, stderr)
from 'vga' to 'vidconsole'. This also was adapted in the default environment.
However, existing user defined environments still use 'vga'. Enable this
workaround to map the 'vga' name to 'vidconsole'. So we get HDMI video
output also with existing legacy environments.
Signed-off-by: Soeren Moch <smoch@web.de>
Tom Rini [Mon, 3 Aug 2020 14:25:47 +0000 (10:25 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- ApolloLake: add u64 parameters support for FSP2 bindings
- ApolloLake: add missing parameters to support full configuration of
the latest FSP MR6 release
- Append appropriate suffixes in various assembly codes
Tom Rini [Mon, 3 Aug 2020 12:01:08 +0000 (08:01 -0400)]
Merge tag 'efi-2020-10-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-10-rc2
This series comprises error corrections for the UEFI subsystem:
* make the memory size reserved for the U-Boot stack customizable
and reduce it for the MAIX board
* correct build dependencies for UEFI unit test
* enable read-only UEFI variable are enabled with the TEE backend
* add 10 ms wait to sysreset to fix a problem with unit testing
Andy Shevchenko [Tue, 28 Jul 2020 09:56:26 +0000 (12:56 +0300)]
x86: call32: Append appropriate suffixes
Assembler is not happy:
arch/x86/cpu/call32.S: Assembler messages:
arch/x86/cpu/call32.S:36: Warning: no instruction mnemonic suffix given and no register operands; using default for `retf'
Fix this by adding appropriate suffixes to the assembler commands.
Fixes:
6f92ed8f1abf ("x86: Add a way to call 32-bit code from 64-bit mode")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Andy Shevchenko [Tue, 28 Jul 2020 09:56:25 +0000 (12:56 +0300)]
x86: sipi_vector: Append appropriate suffixes
Assembler is not happy:
arch/x86/cpu/sipi_vector.S: Assembler messages:
arch/x86/cpu/sipi_vector.S:134: Warning: no instruction mnemonic suffix given and no register operands; using default for `cmp'
arch/x86/cpu/sipi_vector.S:139: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
arch/x86/cpu/sipi_vector.S:157: Warning: no instruction mnemonic suffix given and no register operands; using default for `cmp'
Fix this by adding appropriate suffixes to the assembler commands.
Fixes:
45b5a37836d5 ("x86: Add multi-processor init")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Bernhard Messerklinger [Wed, 22 Jul 2020 07:29:39 +0000 (09:29 +0200)]
arch: x86: apl: Update FSP parameters
Add missing parameters to support full configuration of the latest FSP
MR6 release.
Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bernhard Messerklinger [Wed, 22 Jul 2020 07:29:38 +0000 (09:29 +0200)]
x86: apl: fsp_bindings: Add support for u64 parameters
Add FSP_UINT64 read support as preparation for FSP-M and FSP-S parameter
update.
Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Wolfgang Wallner [Tue, 21 Jul 2020 11:01:45 +0000 (13:01 +0200)]
x86: irq: Fix some typos
Fix some typos in arch/x86/include/asm/irq.h.
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Heinrich Schuchardt [Wed, 29 Jul 2020 10:43:41 +0000 (12:43 +0200)]
efi_selftest: block device test requires CONFIG_DOS_PARTITION
Do not execute the block device test if CONFIG_DOS_PARTITION=n.
Imply CONFIG_DOS_PARTITION in Kconfig.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Wed, 29 Jul 2020 10:32:49 +0000 (12:32 +0200)]
efi_selftest: SNP test depends on network
If CONFIG_NET=n, testing the simple network protocol makes no sense.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Wed, 29 Jul 2020 10:13:41 +0000 (12:13 +0200)]
dm: sysreset: wait after reset message
In our Python tests we expect to see the word "resetting". It may be
truncated if we reset before the serial console buffer is transferred.
Wait for 100 ms between the "resetting ..." message and the actual reset
like we do when powering off.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Wed, 29 Jul 2020 10:53:05 +0000 (12:53 +0200)]
configs: reduce stack size of Sipeed MAIX
The K210 has only 8 MiB RAM thereof 2 MiB reserved for AI.
Allow only 1 MiB for the stack.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Wed, 29 Jul 2020 10:37:35 +0000 (12:37 +0200)]
efi_loader: use CONFIG_STACK_SIZE in the UEFI sub-system
The Kconfig symbol CONFIG_STACK_SIZE is used both by ARM and Microblaze
with the same meaning. Move it to menu 'General setup' so that we can use
it for all architectures.
Use the value of CONFIG_STACK_SIZE instead of a hard coded 16 MiB value for
reserving memory in the UEFI sub-system.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Wed, 29 Jul 2020 10:31:17 +0000 (12:31 +0200)]
x86: rename CONFIG_STACK_SIZE
Configuration variables should have the same meaning independent of the
architecture. x86 and ARM both use CONFIG_STACK_SIZE:
* x86: U-Boot's runtime stack size during reboot
* ARM: max stack size that can be used by U-Boot
Rename the x86 configuration variable to CONFIG_STACK_SIZE_REBOOT
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Ilias Apalodimas [Thu, 23 Jul 2020 12:49:49 +0000 (15:49 +0300)]
efi_loader: Enable run-time variable support for tee based variables
We recently added functions for storing/restoring variables
from a file to a memory backed buffer marked as __efi_runtime_data
commit
f1f990a8c958 ("efi_loader: memory buffer for variables")
commit
5f7dcf079de8 ("efi_loader: UEFI variable persistence")
Using the same idea we now can support GetVariable() and GetNextVariable()
on the OP-TEE based variables as well.
So let's re-arrange the code a bit and move the commmon code for
accessing variables out of efi_variable.c. Create common functions for
reading variables from memory that both implementations can use on
run-time. Then just use those functions in the run-time variants of the
OP-TEE based EFI variable implementation and initialize the memory
buffer on ExitBootServices()
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Ilias Apalodimas [Tue, 21 Jul 2020 22:50:37 +0000 (01:50 +0300)]
efi_loader: Trim output buffer size correctly for tee variables
The current code does not trim the output buffer correctly.
In fact it doesn't trim the buffer at all, since it calculates a wrong
value for it, which isn't even applied.
So let's remove the unused temporary size variable and trim the buffer
correctly.
Since we are editing efi_get_next_variable_name_int(), fix an indentation
error along the way.
Fixes:
f042e47e8fb43 ("efi_loader: Implement EFI variable handling via OP-TEE")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Remove superfluous conversion to (u8 *) for memcpy argument.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tom Rini [Fri, 31 Jul 2020 14:13:07 +0000 (10:13 -0400)]
Merge branch '2020-07-31-more-env-updates'
- Fix EFI selftest to not force setting serial# environment (and also
get the U-Boot prompt dynamically).
- Support for append only environment and other related features.
- Improved ext4 environment support
- Fix the case of fw_setenv being used on flash devices that were not
already locked.
Ivan Mikhaylov [Fri, 10 Jul 2020 16:54:18 +0000 (19:54 +0300)]
fw_setenv: lock the flash only if it was locked before
With current implementation of fw_setenv, it is always locks u-boot-env
region if lock interface is implemented for such mtd device. You can
not control lock of this region with fw_setenv, there is no option for
it in config or in application itself. Because of this situation may
happen problems like in this thread on xilinx forum:
https://forums.xilinx.com/t5/Embedded-Linux/Flash-be-locked-after-use-fw-setenv-from-user-space
/td-p/1027851
A short summary of that link is: some person has issue with some spi
chip which has lock interface but doesn't locks properly which leads to
lock of whole flash memory on lock of u-boot-env region. As resulted
solution hack was added into spi-nor.c driver for this chip with lock
disablement.
Instead fix this problem by adding logic to fw_setenv only lock the
flash if it was already locked when we attempted to use it.
Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
Marek Vasut [Tue, 7 Jul 2020 18:51:39 +0000 (20:51 +0200)]
env: Add support for explicit write access list
This option marks any U-Boot variable which does not have explicit 'w'
writeable flag set as read-only. This way the environment can be locked
down and only variables explicitly configured to be writeable can ever
be changed by either 'env import', 'env set' or loading user environment
from environment storage.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Marek Vasut [Tue, 7 Jul 2020 18:51:38 +0000 (20:51 +0200)]
env: Add option to only ever append environment
Add configuration option which prevents the environment hash table to be
ever cleared and reloaded with different content. This is useful in case
the first environment loaded into the hash table contains e.g. sensitive
content which must not be dropped or reloaded.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Marek Vasut [Tue, 7 Jul 2020 18:51:35 +0000 (20:51 +0200)]
env: Discern environment coming from external storage
Add another custom environment flag which discerns environment coming
from external storage from environment set by U-Boot itself.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Marek Vasut [Tue, 7 Jul 2020 18:51:34 +0000 (20:51 +0200)]
env: Add H_DEFAULT flag
Add another internal environment flag which indicates that the operation
is resetting the environment to the default one. This allows the env code
to discern between import of external environment and reset to default.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Marek Vasut [Tue, 7 Jul 2020 18:51:33 +0000 (20:51 +0200)]
env: Warn on force access if ENV_ACCESS_IGNORE_FORCE set
If the ENV_ACCESS_IGNORE_FORCE is set, inform user that the variable
cannot be force-set if such attempt happens.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:27 +0000 (11:51 +0200)]
test: sandbox: add test for erase command
Add test for the erase command tested on ENV in EXT4.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:26 +0000 (11:51 +0200)]
env: ext4: add support of command env erase
Add support of opts erase for env in ext4,
this opts is used by command 'env erase'.
This command only fill the env file (CONFIG_ENV_EXT4_FILE)
with 0, the CRC and the saved environment becomes invalid.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:25 +0000 (11:51 +0200)]
env: ext4: introduce new function env_ext4_save_buffer
Split the function env_ext4_save to prepare the erase support.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:24 +0000 (11:51 +0200)]
test: environment in ext4
Add basic test to persistent environment in ext4:
save and load in host ext4 file 'uboot.env'.
On first execution an empty EXT4 file system is created in
persistent data dir: env.ext4.img.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:23 +0000 (11:51 +0200)]
configs: sandbox: activate command env select and env load
Add support of environment location with the new env command:
'env select' and 'env load'
The ENV backend is selected by priority order
- 0 = "nowhere" (default at boot)
- 1 = "EXT4"
To test EXT4 env support, this backend is selected by name:
> env select EXT4
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:22 +0000 (11:51 +0200)]
configs: sandbox: activate env in ext4 support
Activate ENV in EXT4 support in sandbox.
The sandbox behavior don't change; the default environment with
the nowhere backend (CONFIG_ENV_IS_NOWHERE)is still used:
the weak function env_get_location() return ENVL_NOWHERE for priority 0.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:21 +0000 (11:51 +0200)]
cmd: env: add env select command
Add the new command 'env select' to force the persistent storage
of environment, saved in gd->env_load_prio.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:20 +0000 (11:51 +0200)]
cmd: env: add env load command
Add the new command env load to load the environment from
the current location gd->env_load_prio.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:19 +0000 (11:51 +0200)]
env: the ops driver load becomes mandatory in struct env_driver
The ops driver load becomes mandatory in struct env_drive,
change the comment for this ops and remove unnecessary test.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:18 +0000 (11:51 +0200)]
env: nowhere: add .load ops
Add the ops .load for nowhere ENV backend to load the
default environment.
This ops is needed for the command 'env load'
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:17 +0000 (11:51 +0200)]
env: correctly handle env_load_prio
Only update gd->env_load_prio in generic function env_load()
and no more in the weak function env_get_location() which is
called in many place (for example in env_driver_lookup, even
for ENVOP_SAVE operation).
This patch is a preliminary step to use env_driver_lookup()/
env_get_location() in new function env_select() without
updating gd->env_load_prio.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:16 +0000 (11:51 +0200)]
env: sf: avoid space in backend name
Remove space in ENV backend name for SPI Flash (SF)
to avoid issue with env select command.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:15 +0000 (11:51 +0200)]
env: ext4: set gd->env_valid
Add a missing initialization of gd->env_valid in env_ext4_load
as it is already done in some other env device.
Set gd->env_valid = ENV_VALID in env_ext4_save() and env_ext4_load().
This patch allows to have a correct information in 'env info' command.
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Tue, 28 Jul 2020 09:51:14 +0000 (11:51 +0200)]
env: add absolute path at CONFIG_ENV_EXT4_FILE
Add the absolute path to the default value of
CONFIG_ENV_EXT4_FILE = "/uboot.env".
This patch avoid the error :
Saving Environment to EXT4... File System is consistent
Please supply Absolute path
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Mon, 15 Jun 2020 14:52:17 +0000 (16:52 +0200)]
env: add prototypes for weak function
This patch adds prototypes for several weak functions:
- env_ext4_get_intf
- env_ext4_get_dev_part
- env_get_location
It solves the following warnings when compiling with W=1
on stm32mp1 board:
board/st/stm32mp1/stm32mp1.c:849:19: warning: no previous prototype for 'env_get_location' [-Wmissing-prototypes]
enum env_location env_get_location(enum env_operation op, int prio)
^~~~~~~~~~~~~~~~
board/st/stm32mp1/stm32mp1.c:876:13: warning: no previous prototype for 'env_ext4_get_intf' [-Wmissing-prototypes]
const char *env_ext4_get_intf(void)
^~~~~~~~~~~~~~~~~
board/st/stm32mp1/stm32mp1.c:889:13: warning: no previous prototype for 'env_ext4_get_dev_part' [-Wmissing-prototypes]
const char *env_ext4_get_dev_part(void)
^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Tom Rini [Fri, 31 Jul 2020 13:45:02 +0000 (09:45 -0400)]
test: efi_selftest: Do not force serial# setting
As part of the EFI self test we set and check the serial# variable.
However, we should not be forcing this setting. In the case where we
are allowed to change the variable it will change, and we will pass the
test. In the case where we cannot change it, force may or may not be
allowed, depending on further environment restrictions. Drop the -f
flag here as we do not need it.
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Heinrich Schuchardt [Fri, 24 Jul 2020 18:55:37 +0000 (20:55 +0200)]
test: do not rely on => being the prompt
In our tests we should use the customized prompt for testing.
Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 30 Jul 2020 01:16:08 +0000 (21:16 -0400)]
Merge tag 'dm-pull-28jul20' of git://git.denx.de/u-boot-dm
Use binman instead of one of the Rockchip build scripts
Refactor to allow any arch to create SPI-flash images
New button uclass
Tom Rini [Wed, 29 Jul 2020 20:30:45 +0000 (16:30 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-stm
- fix SPL boot issue due to early dbgmcu_init() call
- fix SPL boot issue due to dcache memory region configuration
- add support of CONFIG_ENV_IS_IN_MMC
- add specific SD/eMMC partition for U-Boot enviromnent
- enable env in SPL
- use "env info -q" to remove log during boot
- remove env location override for dh_stm32mp1
- update management of misc_read
- check result of find_mmc_device in stm32prog
- use regulator_set_enable_if_allowed for disabling vdd supply in usbphyc
- enable CMD_ADTIMG flag to handle Android images
- device tree alignment with Linux Kernel v5.8-rc1
- remove hnp-srp-disable for usbotg on dk1
- add reset support to uart nodes on stm32mp15x
- use correct weak function name spl_board_prepare_for_linux
- use cd-gpios for ST and DHSOM boards
- add seeed studio odyssey-stm32mp157c board support
- move ethernet PHY into SoM DT
- add DHSOM based DRC02 board support
Tom Rini [Wed, 29 Jul 2020 18:24:17 +0000 (14:24 -0400)]
Merge branch '2020-07-29-add-brcm-ns3-support'
- Add initial Broadcom NS3 SoC support.
Rayagonda Kokatanur [Sun, 26 Jul 2020 17:07:33 +0000 (22:37 +0530)]
arch: arm: use dt and UCLASS_SYSCON to get gic lpi details
Use device tree and UCLASS_SYSCON driver to get
Generic Interrupt Controller (GIC) lpi address and
maximum GIC redistributors count.
Also update Kconfig to select REGMAP and SYSCON when
GIC_V3_ITS is enabled.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Sun, 26 Jul 2020 17:07:32 +0000 (22:37 +0530)]
arch: arm: use dt and UCLASS_IRQ to get gic details
Use device tree and UCLASS_IRQ driver to get following
Generic Interrupt Controller (GIC) details,
-GIC Distributor interface (GICD) base address and
-GIC Redistributors (GICR) base address.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:27:20 +0000 (22:57 +0530)]
configs: ns3: enable tee and optee driver
Enable tee and optee drivers.
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Vikas Gupta [Wed, 15 Jul 2020 17:27:19 +0000 (22:57 +0530)]
drivers: tee: broadcom: add optee based bnxt fw load driver
Add optee based bnxt fw load driver.
bnxt is Broadcom NetXtreme controller Ethernet card.
This driver is used to load bnxt firmware binary using OpTEE.
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Pramod Kumar [Wed, 15 Jul 2020 17:25:41 +0000 (22:55 +0530)]
board: ns3: add development keys used in FIT
Add development keys used in FIT.
Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Pramod Kumar [Wed, 15 Jul 2020 17:25:40 +0000 (22:55 +0530)]
board: ns3: add FIT image its file
Add FIT image its file.
Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:25:39 +0000 (22:55 +0530)]
configs: ns3: enable FIT config
Enable FIT config for NS3.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:07 +0000 (22:53 +0530)]
configs: ns3: enable sp805 watchdog driver
Enable sp805 watchdog driver for ns3.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:06 +0000 (22:53 +0530)]
configs: ns3: enable EXT4 and FAT fs support
Enable EXT4 and FAT fs support for ns3.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:05 +0000 (22:53 +0530)]
configs: ns3: enable gpt commands
Enable gpt commands for ns3.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:04 +0000 (22:53 +0530)]
configs: ns3: enable mmc commands
Enable mmc commands for NS3.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:03 +0000 (22:53 +0530)]
configs: ns3: enable BCM IPROC mmc driver
Enable BCM IPROC mmc driver ns3.
Enable DMA for MMC Host to have better reads and writes.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:02 +0000 (22:53 +0530)]
dt-bindings: pinctrl: add ns3 pads definition
Add NS3 pads definitions.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:01 +0000 (22:53 +0530)]
configs: ns3: enable pinctrl driver
Enable pinctrl driver for ns3.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Tue, 5 May 2020 17:56:47 +0000 (23:26 +0530)]
gpio: do not include <asm/arch/gpio.h> on TARGET_BCMNS3
As no gpio.h is defined for this architecture, to avoid
compilation failure, do not include <asm/arch/gpio.h> for
arch bcmns3.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Tue, 5 May 2020 17:56:46 +0000 (23:26 +0530)]
drivers: gpio: add broadcom iproc gpio driver support
Add gpio driver support for Broadcom iproc-based socs.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:09 +0000 (22:49 +0530)]
MAINTAINERS: update maintainers for broadcom ns3 platform
Update MAINTAINERS for broadcom ns3 platform (TARGET_NS3).
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:08 +0000 (22:49 +0530)]
doc: add README doc for bcmns3 platform
Add README doc for bcmns3 platform.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bharat Gooty [Wed, 15 Jul 2020 17:19:07 +0000 (22:49 +0530)]
include/configs: ns3: add support for flashing images
Add support for flashing images into QSPI and eMMC.
Signed-off-by: Bharat Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bharat Gooty [Wed, 15 Jul 2020 17:19:06 +0000 (22:49 +0530)]
include/configs: ns3: add env variables for Linux boot
Add env variables and commands for booting Linux.
Signed-off-by: Bharat Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bharat Kumar Reddy Gooty [Wed, 15 Jul 2020 17:19:05 +0000 (22:49 +0530)]
board: ns3: limit U-boot relocation within 16MB memory
By default relocation happens to a higher address of DDR,
i.e, DDR start + DDR size.
U-Boot shall be used to collect the ramdump.
Restrict U-Boot to use only the 16MB memory, so that this
memory can be reserved. Limit relocation to happen within
16MB memory, start 0xFF00_0000 and end 0x1_0000_0000
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:04 +0000 (22:49 +0530)]
board: ns3: define ddr memory layout
Add both DRAM banks memory information and
the corresponding MMU page table mappings.
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:03 +0000 (22:49 +0530)]
dt-bindings: memory: ns3: add ddr memory definition
Add ddr memory definitions.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:02 +0000 (22:49 +0530)]
configs: ns3: enable GIC_V3 ITS
Enables the Generic Interrupt Controller (GIC) V3
Interrupt Translation Service (ITS) Locality-specific Peripheral
Interrupts (LPI) configuration table and LPI table.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:01 +0000 (22:49 +0530)]
board: ns3: program GIC LPI tables
U-boot programs the GIC LPI configuration tables and enables
the LPI table.
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:00 +0000 (22:49 +0530)]
board: ns3: default reset type to L3
Default "reset" from U-Boot to L3 reset.
"reset" command with argument will trigger L1 reset.
Signed-off-by: Rajesh Ravi <rajesh.ravi@broadcom.com>
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Abhishek Shah [Wed, 15 Jul 2020 17:18:59 +0000 (22:48 +0530)]
board: ns3: add api to save boot parameters passed from BL31
Add API to save boot parameters passed from BL31
Use assembly implementation of save_boot_params instead of c function.
Because generally ATF does not set up SP_EL2 on exiting.
Thus, usage of a C function immediately after exiting with no stack
setup done by ATF explicitly, may cause SP_EL2 to be not sane,
which in turn causes a crash if this boot was not lucky to get
an SP_EL2 in valid range. Replace C implementation with assembly one
which does not use stack this early, and let u-boot to set up its stack
later.
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
Signed-off-by: Rajesh Ravi <rajesh.ravi@broadcom.com>
Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:18:58 +0000 (22:48 +0530)]
dt-bindings: memory: ns3: add memory definitions
Add NS3 memory definitions.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:18:57 +0000 (22:48 +0530)]
configs: ns3: enable clock subsystem
Enable clock subsystem for ns3.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:18:56 +0000 (22:48 +0530)]
arm: cpu: armv8: add L3 memory flush support
Add L3 memory flush support for NS3.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:18:55 +0000 (22:48 +0530)]
board: ns3: add support for Broadcom Northstar 3
Add support for Broadcom Northstar 3 SoC.
NS3 is a octo-core 64-bit ARMv8 Cortex-A72 processors
targeting a broad range of networking applications.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Wed, 29 Jul 2020 13:26:11 +0000 (09:26 -0400)]
Merge branch '2020-07-28-misc-soc-improvements'
- Assorted MediaTek improvements
- s5p4418 support
- QEMU ARM platform improvements
- Qualcomm IPQ40xx support
David Woodhouse [Sun, 12 Jul 2020 22:33:03 +0000 (23:33 +0100)]
board: mediatek: Add support for UniElec U7623 board
This is an MT7623A-based board, very similar to the Banana Pi R2.
http://www.unielecinc.com/q/news/cn/p/product/detail.html?qd_guid=OjXwKCaRlN
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Sun, 12 Jul 2020 22:33:02 +0000 (23:33 +0100)]
board: mediatek: Use CONFIG_DEFAULT_FDT_FILE for default environment
Rather than hard-coding it to the Banana Pi R2.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Sun, 12 Jul 2020 22:33:01 +0000 (23:33 +0100)]
board: mediatek: fix mmc_get_boot_dev() for platforms without external SD
On the UniElec U7623 board there is no external SD slot and the preloader
doesn't fill in the magic field at 0x81dffff0 to indicate that it was
booted from eMMC.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Stefan Bosch [Fri, 10 Jul 2020 17:07:38 +0000 (19:07 +0200)]
arm: add (default) config for nanopi2 board
Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- Configuration changed, mainly several "CONFIG_..." moved from
s5p4418_nanopi2.h to s5p4418_nanopi2_defconfig and USB related
configs removed because USB is not supported yet.
- s5p4418_nanopi2.h: "CONFIG_" removed from several s5p4418/nanopi2
specific defines because the appropriate values do not need to be
configurable.
- pinctrl is supported now, therefore "CONFIG_PINCTRL=y" added to
s5p4418_nanopi2_defconfig.
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:37 +0000 (19:07 +0200)]
arm: add support for SoC s5p4418 (cpu) / nanopi2 board
Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- SPL not supported yet --> no spl-dir in arch/arm/cpu/armv7/s5p4418/.
Appropriate line in Makefile removed.
- cpu.c: '#include <cpu_func.h>' added.
- arch/arm/cpu/armv7/s5p4418/u-boot.lds removed, is not required
anylonger.
- "obj-$(CONFIG_ARCH_NEXELL) += s5p-common/" added to
arch/arm/cpu/armv7/Makefile since s5p-common/pwm.c is used instead
of drivers/pwm/pwm-nexell.c.
- s5p4418.dtsi: '#include "../../../include/generated/autoconf.h"'
removed, is not necessary, error at out-of-tree building.
'#ifdef CONFIG_CPU_NXP4330'-blocks (2x) removed. Some minor changes
regarding mmc. 'u-boot,dm-pre-reloc' added to dp0 because of added
DM_VIDEO support.
- board/s5p4418/ renamed to board/friendlyarm/
- All s5p4418-boards except nanopi2 removed because there is no
possibility to test the other boards.
- Kconfig: Changes to have a structure like mach-bcm283x (RaspberryPi),
e.g. "config ..." entries moved from/to other Kconfig.
- "CONFIG_" removed from several s5p4418/nanopi2 specific defines
because the appropriate values do not need to be configurable.
- nanopi2/board.c: All getenv(), getenv_ulong(), setenv() and saveenv()
renamed to env_get(), env_get_ulong(), env_set() and env_save(),
respectively. MACH_TYPE_S5P4418 is not defined anymore, therefore
appropriate code removed (not necessary for DT-kernels).
- nanopi2/onewire.c: All crc8() renamed to crc8_ow() because crc8() is
already defined in lib/crc8.c (with different parameters).
- dts: "nexell,s5pxx18-i2c" used instead of "i2c-gpio", i2c0 and
i2c1 added. gmac-, ehci- and dwc2otg-entries removed because the
appropriate functionality is not supported yet. New mmc-property
"mmcboost" added.
s5p4418-pinctrl.dtsi: gmac-entries removed, mmc- and i2c-entries
added.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
possible (and similar).
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:36 +0000 (19:07 +0200)]
video: add nexell video driver (display/video driver)
Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- nexell_display.c: Changed to DM, CONFIG_FB_ADDR can not be used
anymore because framebuffer is allocated by video_reserve() in
video-uclass.c. Therefore code changed appropriately.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
possible (and similar).
- livetree API (dev_read_...) is used instead of fdt one (fdt...).
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:35 +0000 (19:07 +0200)]
video: add nexell video driver (soc: dpc, makefile)
Low level functions for DPC (Display Controller) and Makefile for all
nexell video low level functions.
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:34 +0000 (19:07 +0200)]
video: add nexell video driver (soc: lvds, hdmi)
Low level functions for LVDS and HDMI display interfaces.
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:33 +0000 (19:07 +0200)]
video: add nexell video driver (soc: mlc, mipi)
Low level functions for MLC (Multi Layer Control) and MIPI (Mobile
Industry Processor Interface).
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:32 +0000 (19:07 +0200)]
video: add nexell video driver (soc: displaytop)
Low level functions for DisplayTop (Display Topology).
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:31 +0000 (19:07 +0200)]
pwm: add driver for nexell
Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- Since drivers/pwm/pwm-nexell.c is an adapted version of
s5p-common/pwm.c an appropriately changed version of s5p-common/pwm.c
is used instead. Therefore arch/arm/mach-s5pc1xx/include/mach/pwm.h
copied to arch/arm/mach-nexell/include/mach and s5p-common/Makefile
changed appropriately.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
possible (and similar).
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:30 +0000 (19:07 +0200)]
pinctrl: add nexell driver
Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- livetree API (dev_read_...) is used instead of fdt one (fdt...).
- doc/device-tree-bindings/pinctrl/nexell,s5pxx18-pinctrl.txt added.
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:29 +0000 (19:07 +0200)]
mmc: add nexell driver
Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- driver changed to DM.
- pinctrl-driver/dt is used now instead of configuring the mmc I/O-pins
in the mmc-driver.
- nexell_dwmmc_ofdata_to_platdata() reworked, i.e. valid default values
are used now (where possible) and the appropriate if-blocks have
been removed.
- new dt-property "mmcboost" is used now instead of "CONFIG_BOOST_MMC"
which was not defined anywhere.
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:28 +0000 (19:07 +0200)]
i2c: add nexell driver
Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- i2c/nx_i2c.c: Some adaptions mainly because of changes in
"struct udevice".
- several Bugfixes in nx_i2c.c.
- the driver has been for s5p6818 only. Code extended appropriately
in order s5p4418 is also working.
- "probe_chip" added.
- pinctrl-driver/dt is used instead of configuring the i2c I/O-pins
in the i2c-driver.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
possible (and similar).
- livetree API (dev_read_...) is used instead of fdt one (fdt...).
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:27 +0000 (19:07 +0200)]
gpio: add nexell driver
Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- livetree API (dev_read_...) is used instead of fdt one (fdt...).
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:26 +0000 (19:07 +0200)]
arm: add mach-nexell (all files except header files)
Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- SPL not supported yet --> no spl-directory in arch/arm/mach-nexell.
Appropriate line in Makefile removed.
- clock.c: 'section(".data")' added to declaration of clk_periphs[] and
core_hz.
- Kconfig: Changes to have a structure like in mach-bcm283x/Kconfig,
e.g. "config ..." entries moved from other Kconfig.
- timer.c: 'section(".data")' added to declaration of timestamp and
lastdec.
- arch/arm/mach-nexell/serial.c removed because this is for the UARTs
of the S5P6818 SoC which is not supported yet. S5P4418 UARTs are
different, here the (existing) PL011-code is used.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
possible (and similar).
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Stefan Bosch [Fri, 10 Jul 2020 17:07:25 +0000 (19:07 +0200)]
arm: add mach-nexell (header files)
Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- DM_VIDEO support (display_dev.h).
- boot0.h added, handles NSIH --> tools/nexell obsolete.
- gpio.h: Include-path to errno.h changed.
Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:11 +0000 (12:07 +0200)]
arm: qemu: override flash accessors to use virtualizable instructions
Some instructions in the ARM ISA have multiple output registers, such
as ldrd/ldp (load pair), where two registers are loaded from memory,
but also ldr with indexing, where the memory base register is incremented
as well when the value is loaded to the destination register.
MMIO emulation under KVM is based on using the architecturally defined
syndrome information that is provided when an exception is taken to the
hypervisor. This syndrome information describes whether the instruction
that triggered the exception is a load or a store, what the faulting
address was, and which register was the destination register.
This syndrome information can only describe one destination register, and
when the trapping instruction is one with multiple outputs, KVM throws an
error like
kvm [615929]: Data abort outside memslots with no valid syndrome info
on the host and kills the QEMU process with the following error:
U-Boot 2020.07-rc3-00208-g88bd5b179360-dirty (Jun 06 2020 - 11:59:22 +0200)
DRAM: 1 GiB
Flash: error: kvm run failed Function not implemented
R00=
00000001 R01=
00000040 R02=
7ee0ce20 R03=
00000000
R04=
7ffd9eec R05=
00000004 R06=
7ffda3f8 R07=
00000055
R08=
7ffd9eec R09=
7ef0ded0 R10=
7ee0ce20 R11=
00000000
R12=
00000004 R13=
7ee0cdf8 R14=
00000000 R15=
7ff72d08
PSR=
200001d3 --C- A svc32
QEMU: Terminated
This means that, in order to run U-Boot in QEMU under KVM, we need to
avoid such instructions when accessing emulated devices. For the flash
in particular, which is a hybrid between a ROM (backed by a read-only
KVM memslot) when in array mode, and an emulated MMIO device (when in
write mode), we need to take care to only use instructions that KVM can
deal with when they trap.
So override the flash read accessors that are used when running on QEMU
under KVM. Note that the the 64-bit wide read and write accessors have
been omitted: they are never used when running under QEMU given that it
does not emulate CFI flash that supports it.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:10 +0000 (12:07 +0200)]
arm: qemu: disable the EFI workaround for older GRUB
The QEMU/mach-virt targeted port of u-boot currently only runs on
QEMU under TCG emulation, which does not model the caches at all,
and so no users can exist that are relying on the GRUB hack for
EFI boot.
We will shortly enable support for running under KVM, but the GRUB
hack (which disables all caches without doing cache cleaning by VA
during ExitBootServices()) is likely to cause more problems than it
solves, given that KVM hosts require correct maintenance if they
incorporate non-architected system caches.
So let's disable the GRUB hack by default on the QEMU/mach-virt
port.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:09 +0000 (12:07 +0200)]
arm: qemu: implement enable_caches()
Add an override for enable_caches to enable the I and D caches, along
with the cached 1:1 mapping of all of DRAM. This is needed for running
U-Boot under virtualization with QEMU/kvm.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:08 +0000 (12:07 +0200)]
arm: qemu: enable LPAE on 32-bit
QEMU's mach-virt machine only supports selecting CPU models that
implement the virtualization extensions, and are therefore guaranteed
to support LPAE as well.
Initially, QEMU would not allow emulating these CPUs running in HYP
mode (or EL2, for AArch64), but today, it also contains a complete
implementation of the virtualization extensions themselves.
This means we could be running U-Boot in HYP mode, in which case the
LPAE long descriptor page table format is the only format that is
supported. If we are not running in HYP mode, we can use either.
So let's enable CONFIG_ARMV7_LPAE for qemu_arm_defconfig so that we
get the best support for running with the MMU and caches enabled at
any privilege level.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:07 +0000 (12:07 +0200)]
arm: enable allocate-on-read for LPAE's DCACHE_WRITEBACK/_WRITETHROUGH
The LPAE versions of DCACHE_WRITEBACK and DCACHE_WRITETHROUGH are currently
defined as no-allocate for both reads and writes, which deviates from the
non-LPAE definition, and mostly defeats the purpose of enabling the caches
in the first place.
So align LPAE with !LPAE, and enable allocate-on-read for both. And while
at it, add some clarification about the meaning of the chosen values.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Robert Marko [Mon, 6 Jul 2020 08:37:56 +0000 (10:37 +0200)]
msm_gpio: Add support for Qualcomm IPQ40xx
Snapdragon SoCs and IPQ40xx use common TLMM IP,
so existing driver supports IPQ40xx as well.
So lets simply add a compatible for IPQ40xx.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-By: Ramon Fried <rfried.dev@gmail.com>
Robert Marko [Mon, 6 Jul 2020 08:37:55 +0000 (10:37 +0200)]
msm_serial: Read bit rate register value from DT
IPQ40xx and currently supported Snapdragon boards don't use the same one
so enable reading it from DT, if no DT property is found default value
is the same as the previous define.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-By: Ramon Fried <rfried.dev@gmail.com>