summaryrefslogtreecommitdiff
path: root/board/armltd
AgeCommit message (Collapse)Author
2023-01-20global: Finish CONFIG -> CFG migrationTom Rini
At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-23global: Migrate CONFIG_PL011_CLOCK to CFGTom Rini
Perform a simple rename of CONFIG_PL011_CLOCK to CFG_PL011_CLOCK Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-07global: Remove extraneous DM_ETH imply/selectTom Rini
We only need to enable DM_ETH if we have a networking driver. All networking drivers depend on DM_ETH being enabled, and their selection ensures DM_ETH will be enabled. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-05global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_SDRAM namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-29vexpress64: also consider DTB pointer in x1Andre Przywara
Commit c0fce929564f("vexpress64: fvp: enable OF_CONTROL") added code to consider a potential DTB address being passed in the x0 register, or revert to the built-in DTB otherwise. The former case was used when using the boot-wrapper, to which we sell U-Boot as a Linux kernel. The latter was meant for TF-A, for which we couldn't find an easy way to use the DTB it uses itself. We have some quirk to filter for a valid DTB, as TF-A happens to pass a pointer to some special devicetree blob in x0 as well. Now the TF-A case is broken, when enabling proper emulation of secure memory (-C bp.secure_memory=1). TF-A carves out some memory at the top of the first DRAM bank for its own purposes, and configures the TrustZone DRAM controller to make this region secure-only. U-Boot will then hang when it tries to relocate itself exactly to the end of DRAM. TF-A announces this by carving out that region of the /memory node, in the DT it passes on to BL33 in x1, but we miss that so far. Instead of repeating this carveout in our DT copy, let's try to look for a DTB at the address x1 points to as well. This will let U-Boot pick up the DTB provided by TF-A, which has the correct carveout in place, avoiding the hang. While we are at it, make the detection more robust: the length test (is the DT larger than 256 bytes?) is too fragile, in fact the TF-A port for a new FVP model already exceeds this. So we test x1 first, consider 0 an invalid address, and also require a /memory node to detect a valid DTB. And for the records: Some asking around revealed what is really going on with TF-A and that ominous DTB pointer in x0: TF-A expects EDK-2 as its non-secure payload (BL33), and there apparently was some long-standing ad-hoc boot protocol defined just between the two: x0 would carry the MPIDR register value of the boot CPU, and the hardware DTB address would be stored in x1. Now the MPIDR of CPU 0 is typically 0, plus bit 31 set, which is defined as RES1 in the ARMv7 and ARMv8 architectures. This gives 0x80000000, which is the same value as the address of the beginning of DRAM (2GB). And coincidentally TF-A put some DTB structure exactly there, for its own purposes (passing it between stages). So U-Boot was trying to use this DTB, which requires the quirk to check for its validity. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Tested-by: Peter Hoyes <peter.hoyes@arm.com>
2022-08-12net: Remove smc91111 ethernet driverTom Rini
This driver has not been converted to DM_ETH. The migration deadline passed 2 years ago. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: David Feng <fenghua@phytium.com.cn> Cc: Liviu Dudau <liviu.dudau@foss.arm.com> Cc: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Ramon Fried <rfried.dev@gmail.com>
2022-06-22corstone1000: Convert to text file environmentTom Rini
Convert this platform to using the text file environment rather than defining CONFIG_EXTRA_ENV_SETTINGS. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-22arm: add support to corstone1000 platformRui Miguel Silva
Corstone1000 is a platform from arm, which includes pre verified Corstone SSE710 sub-system that combines Cortex-A and Cortex-M processors [0]. This code adds the support for the Cortex-A35 implementation at host side, it contains also the necessary bits to support the Corstone 1000 FVP (Fixed Virtual Platform) [1] and also the FPGA MPS3 board implementation of this platform. [2] 0: https://developer.arm.com/documentation/102360/0000 1: https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps 2: https://developer.arm.com/documentation/dai0550/c/ Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-04-08arm: integrator: Migrate platform-specific options and cleanup armcoremodule.hTom Rini
This converts the following to Kconfig: CONFIG_CM_INIT CONFIG_CM_REMAP CONFIG_CM_SPD_DETECT CONFIG_CM_MULTIPLE_SSRAM CONFIG_CM_TCRAM We make the first three of these options be always enabled, as that matches usage. We select the last two based on how they were defined in armcoremodule.h. This also allows us to remove some unused code in board/armltd/integrator/lowlevel_init.S Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01vexpress64: Add ARMv8R-64 board variantPeter Hoyes
The ARMv8-R64 architecture introduces optional VMSA (paging based MMU) support in the EL1/0 translation regime, which makes that part mostly compatible to ARMv8-A. Add a new board variant to describe the "BASE-R64" FVP model, which inherits a lot from the existing v8-A FVP support. One major difference is that the memory map in "inverted": DRAM starts at 0x0, MMIO is at 2GB [1]. * Create new TARGET_VEXPRESS64_BASER_FVP target, sharing most of the exising configuration. * Implement inverted memory map in vexpress_aemv8.h * Create vexpress_aemv8r defconfig * Provide an MMU memory map for the BASER_FVP * Update vexpress64 documentation At the moment the boot-wrapper is the only supported secure firmware. As there is no official DT for the board yet, we rely on it being supplied by the boot-wrapper into U-Boot, so use OF_HAS_PRIOR_STAGE, and go with a dummy DT for now. [1] https://developer.arm.com/documentation/100964/1114/Base-Platform/Base---memory/BaseR-Platform-memory-map Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com> [Andre: rebase and add Linux kernel header] Signed-off-by: Andre Przywara <andre.przywara@arm.com> [trini: Add MAINTAINERS entry for Peter]
2022-04-01vexpress64: pick DRAM size from DTAndre Przywara
So far the DRAM size for both the Juno and the FVP model were hardcoded in our config header file. For the Juno this is fine, as all models have 8 GiB of DRAM, but the DRAM size can be configured on the model command line. Drop the fixed DRAM size setup, instead look up the size in the device tree, that we now have for every board. This allows a user to inject a DT with the proper size, and be able to use the full amount of DRAM. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-04-01vexpress64: generalise page table generationAndre Przywara
In preparation for the ARMv8-R64 FVP support, which has DRAM mapped at 0x0, generalise the page table generation, by using symbolic names for the address ranges instead of fixed numbers. We already define the base of the DRAM and MMIO regions, so just use those symbols in the page table description. Rename V2M_BASE to the more speaking V2M_DRAM_BASE on the way. On the VExpress memory map, the address space right after 4GB is of no particular interest to software, as the whole of DRAM is mapped at 32GB instead. The first 2 GB alias to the lower 2GB of DRAM mapped below 4GB, so we skip this part and map some more of the high DRAM, should anyone need it. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-04-01vexpress64: move hardware setting from defconfig to KconfigAndre Przywara
The defconfigs for the Arm Juno board and the FVP model are quite large, setting a lot of platform-fixed variables like SYS_TEXT_BASE. As those values are not really a user choice, let's provide default values for them in our Kconfig file, so a lot of cruft can be removed from the defconfig files. This also moves the driver selection out of there, since this is again not something a user should really decide on. Instead we allow users to enable or disable subsystems, and select the appropriate drivers based on that in the Kconfig file. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-04-01vexpress64: fvp: enable OF_CONTROLAndre Przywara
The FVP base model is relying on a DT for Linux operation, so there is no reason we would need to rely on hardcoded information for U-Boot. Letting U-Boot use a DT will open up the usage of actual peripherals, beyond the support for semihosting only. Enable OF_CONTROL in the Kconfig, and use the latest dts files from Linux. Depending on whether we use the boot-wrapper or TF-A, there is already a DTB provided or not, respectively. To cover the boot-wrapper, we add an arm64 Linux kernel header, which allows the boot-wrapper to treat U-Boot like a Linux kernel. U-Boot will find the pointer to the DTB in x0, and will use it. Even though TF-A carries a DT, at the moment this is not made available to non-secure world, so to not break users, we use the U-Boot provided DTB copy in that case. For some reason TF-A puts some DT like structure at the address x0 is pointing at, but that is very small and doesn't carry any hardware information. Make the code to ignore those small DTBs. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-04-01vexpress64: Kconfig: move board definitions out of arch/armAndre Przywara
At the moment we define three "VExpress64" boards in arch/arm/Kconfig, plus have a second Kconfig file in board/armltd/Kconfig. One of those three boards is actually bogus (TARGET_VEXPRESS64_AEMV8A), that stanza looks like being forgotten in a previous cleanup. To remove the clutter from the generic Kconfig file, just define some ARCH_VEXPRESS64 symbol there, enable some common options, and do the board/model specific configuration in the board/armltd Kconfig file. That allows to streamline and fine tune the configuration later, and to also pull a lot of "non user choices" out of the defconfigs. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-25pci: Add defines for normal and subtractive PCI bridgesPali Rohár
Add following two new PCI class codes defines into pci_ids.h include file: PCI_CLASS_BRIDGE_PCI_NORMAL PCI_CLASS_BRIDGE_PCI_SUBTRACTIVE And use these defines in all U-Boot code for describing PCI class codes for normal and subtractive PCI bridges. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-12vexpress64: Remove unused macro XR3PCI_ECAM_OFFSETPali Rohár
Macro XR3PCI_ECAM_OFFSET is unused and in case it would be needed in future it can be replaced by standard PCIE_ECAM_OFFSET macro from pci.h file. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-01-04vexpress64: Enable VIRTIO_NET network driverPeter Hoyes
The SMSC driver is using the old driver model. Init the virtio system in vexpress64.c so that the network device is discovered. Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2022-01-04vexpress64: Enable OF_CONTROL and OF_BOARD for VExpress64Peter Hoyes
Capture x0 in lowlevel_init.S as potential fdt address. Modify board_fdt_blob_setup to use fdt address from either vexpress_aemv8.h or lowlevel_init.S. Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2022-01-04vexpress64: Refactor header file to make it easier to add new FVPsPeter Hoyes
Rename from vexpress_aemv8a.h -> vepxress_aemv8.h as new FVPs may not be v8-A. No change in behavior. This is towards future work to enable support for the FVP_BaseR. Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2021-10-27sandbox: Remove OF_HOSTFILEIlias Apalodimas
OF_HOSTFILE is used on sandbox configs only. Although it's pretty unique and not causing any confusions, we are better of having simpler config options for the DTB. So let's replace that with the existing OF_BOARD. U-Boot would then have only three config options for the DTB origin. - OF_SEPARATE, build separately from U-Boot - OF_BOARD, board specific way of providing the DTB - OF_EMBED embedded in the u-boot binary(should not be used in production Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-19arm: total_compute: increase DRAM to 8GBUsama Arif
The extra 6GB start at 0x8080000000. Signed-off-by: Usama Arif <usama.arif@arm.com>
2021-09-24ARM: vexpress_ca9x4: Reintroduce board in order to use with QEMU.Kristian Amlie
vexpress_ca9x4 is seemingly the only board except for qemu_arm which is able to run U-Boot correctly, using the `-M vexpress-a9` option to QEMU. Building for qemu_arm and running qemu-system-arm with the `-M virt` argument has a number of downsides, most importantly that it only supports virtio storage drivers. This significantly reduces its usefulness in testing memory card and Flash solutions, especially when the tested images are from a third party source. So therefore we reintroduce the vexpress_ca9x4 board in this commit, with the explicit goal of using it with QEMU. A number of differences to note from the original: * Since the board was apparently unmaintained, I have now set myself as the maintainer. * The board has been converted to use the driver model, which was the reason it was removed in the first place. * The vexpress_ca15_tc2 and vexpress_ca5x2 boards, which were removed in the same commit, are not necessary for the QEMU use case, and have been omitted. * An `mmc0` alias was introduced in the dts file. The mmc is not detected correctly without this, now that it's based on the device tree instead of the board's init function. * A couple of other nodes were removed because they were problematic when trying to run the UEFI bootmgr. Once again, the primary use case here is QEMU, and these nodes are not needed for that to work. * Unnecessary board init code has been removed, thanks to driver model and device tree. * `CONFIG_OF_EMBED` has been enabled. I know this goes against recommended practice, but there doesn't seem to be any other way to pass the dtb to U-Boot in the QEMU scenario. Using the -dtb argument does not work, I suppose because U-Boot doesn't use the same mechanics as the kernel when it's booting. * Load addresses have been changed to fit QEMU use case. People wanting to get a more detailed, yet somewhat isolated, diff between this and the original, can run this command: git diff c6c26a05b89f25a06e7562f8c2071b60fd0c9eac~1 -- \ $( git diff-tree --diff-filter=A -r --name-only HEAD~1 HEAD) (Make sure to either check out this commit first, or replace HEAD with the commit ID of this commit) Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
2021-09-03Revert most of the series for adding vexpress_aemv8r supportTom Rini
Per a request from Andre Przywara and agreed with by Peter Hoyes, the vexpress aemv8r support wasn't quite ready to be merged, but the discussion had moved off list. We should keep the first patch in the series for now, but revert the rest. This reverts the following commits: e0bd6f31ce41 doc: Add documentation for the Arm vexpress board configs 30e5a449e8c7 arm: Use armv8_switch_to_el1 env to switch to EL1 b53bbca63bf4 vexpress64: Add BASER_FVP vexpress board variant 2f5b7b74903f armv8: Add ARMv8 MPU configuration logic 37a757e227cc armv8: Ensure EL1&0 VMSA is enabled Signed-off-by: Tom Rini <trini@konsulko.com>
2021-09-02vexpress64: Add BASER_FVP vexpress board variantPeter Hoyes
The BASER_FVP board variant is implemented on top of the BASE_FVP board config (which, in turn, is based on the Juno Versatile Express board config). They all share a similar memory map - for BASER_FVP the map is inverted from the BASE_FVP (https://developer.arm.com/documentation/100964/1114/Base-Platform/Base---memory/BaseR-Platform-memory-map) * Create new TARGET_VEXPRESS64_BASER_FVP target, which uses the same board config as BASE_FVP and JUNO * Adapt vexpress_aemv8a.h header file to support BASER_FVP (and rename to vexpress_aemv8.h) * Enable config to switch to EL1 for the BASER_FVP * Create vexpress_aemv8r defconfig * Provide an MPU memory map for the BASER_FVP For now, only single core boot is supported. Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com> [trini: Add MAINTAINERS, move BOOTCOMMAND to defconfig] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-06ARM: integrator: Drop PCI supportLinus Walleij
We didn't convert the Integrator to use DM for PCI in time, and we don't use it either so let's just drop PCI support from the Integrator. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-04-10arm: Remove vexpress_ca15_tc2 boardTom Rini
This board has not been converted to CONFIG_DM_MMC by the deadline. Remove it. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-03-02reset: Remove addr parameter from reset_cpu()Harald Seiler
Historically, the reset_cpu() function had an `addr` parameter which was meant to pass in an address of the reset vector location, where the CPU should reset to. This feature is no longer used anywhere in U-Boot as all reset_cpu() implementations now ignore the passed value. Generic code has been added which always calls reset_cpu() with `0` which means this feature can no longer be used easily anyway. Over time, many implementations seem to have "misunderstood" the existence of this parameter as a way to customize/parameterize the reset (e.g. COLD vs WARM resets). As this is not properly supported, the code will almost always not do what it is intended to (because all call-sites just call reset_cpu() with 0). To avoid confusion and to clean up the codebase from unused left-overs of the past, remove the `addr` parameter entirely. Code which intends to support different kinds of resets should be rewritten as a sysreset driver instead. This transformation was done with the following coccinelle patch: @@ expression argvalue; @@ - reset_cpu(argvalue) + reset_cpu() @@ identifier argname; type argtype; @@ - reset_cpu(argtype argname) + reset_cpu(void) { ... } Signed-off-by: Harald Seiler <hws@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-05dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()Simon Glass
The current macro is a misnomer since it does not declare a device directly. Instead, it declares driver_info record which U-Boot uses at runtime to create a device. The distinction seems somewhat minor most of the time, but is becomes quite confusing when we actually want to declare a device, with of-platdata. We are left trying to distinguish between a device which isn't actually device, and a device that is (perhaps an 'instance'?) It seems better to rename this macro to describe what it actually is. The macros is not widely used, since boards should use devicetree to declare devices. Rename it to U_BOOT_DRVINFO(), which indicates clearly that this is declaring a new driver_info record, not a device. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename 'platdata' variables to just 'plat'Simon Glass
We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-19arm: vexpress: don't reset flags in board_init to avoid losing previous onesArnaud Aujon Chevallier
Re-submitted because of missing description and signed-off. flags reset in board_init caused bugs when executing command like editenv because the reallocated flag was lost. Tested-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Arnaud Aujon Chevallier <arnaud@intelibre.fr>
2020-08-24board: armltd: Add support for Total Compute platformUsama Arif
Total Compute is based on ARM architecture and has the following features enabled in u-boot: - PL011 UART - PL180 MMC - NOR Flash - FIT image with Signature - AVB Signed-off-by: Usama Arif <usama.arif@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-07-07arm: juno: Enable PCIAndre Przywara
The ARM Juno boards in their -r1 and -r2 variants sport a PCIe controller, which we configure already in board specific code to be ECAM compliant. Hence we can just enable the generic ECAM driver to let U-Boot use PCIe devices. Add the respective options to the Juno defconfig to enable the PCI framework and the generic ECAM driver, and initialise the driver upon loading U-Boot. Make some functions in the Juno PCIe init code static on the way. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2020-07-07arm: juno: Enable DM_ETHAndre Przywara
The smc911X driver is now DM enabled, so we can switch the Juno board over to use DM_ETH for the on-board Fast Ethernet device. Works out of the box by using the DT. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2020-05-18common: Drop linux/delay.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop linux/bug.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop log.h from common headerSimon Glass
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop init.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop bootstage.h from common headerSimon Glass
Move this fairly uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop net.h from common headerSimon Glass
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-07arm: juno: Use PSCI based resetAndre Przywara
So far the Juno board wasn't implementing reset. Let's just use the already existing PSCI_RESET based method to avoid any extra code. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-05-07arm: juno: Enable OF_CONTROLAndre Przywara
The Arm Juno board was still somewhat stuck in "hardcoded land", even though there are stable DTs around, and one happens to actually be on the memory mapped NOR flash. Enable the configuration options to let the board use OF_CONTROL, and add a routine to find the address of the DTB partition in NOR flash, to use that for U-Boot's own purposes. This can also passed on via $fdtcontroladdr to any kernel or EFI application, removing the need to actually load a device tree. Since the existing "afs" command and its flash routines require flash_init() to be called before being usable, and this is done much later in the boot process, we introduce a stripped-down partition finder routine in vexpress64.c, to scan the NOR flash partitions for the DT partition. This location is then used for U-Boot to find and probe devices. The name of the partition can be configured, if needed, but defaults to "board.dtb", which is used by Linaro's firmware image provided. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-01-17common: Move RAM-sizing functions to init.hSimon Glass
These functions relate to memory init so move them into the init header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17common: Move reset_cpu() to the CPU headerSimon Glass
Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17common: Move get_tbclk() to time.hSimon Glass
This function related to timer and most of the timer functions are in time.h, so move this function there. Signed-off-by: Simon Glass <sjg@chromium.org>