aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-uniphier
AgeCommit message (Collapse)Author
2020-05-22ARM: uniphier: remove board_eth_init()Masahiro Yamada
This platform completely migrated to CONFIG_DM_ETH. board_eth_init() is only called from net/eth_legacy.c Remove the legacy hook. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-05-22ARM: uniphier: delete or replace <common.h> includesMasahiro Yamada
<common.h> pulls in a lot of bloat. <common.h> is unneeded in most of places. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-05-22ARM: uniphier: drop #include <log.h> againMasahiro Yamada
I do not understand the changes made to these files by commit f7ae49fc4f36 ("common: Drop log.h from common header"). git show f7ae49fc4f36 -- arch/arm/mach-uniphier/ None of them uses the log function feature. Simply revert the changes made to these files. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-05-22ARM: uniphier: drop #include <init.h> again from umc-pxs2.cMasahiro Yamada
I do not understand the change made to this file by commit 691d719db718 ("common: Drop init.h from common header"). git show 691d719db718 -- arch/arm/mach-uniphier/dram/umc-pxs2.c This file does not call or define any functions declared in <init.h> Simply revert the change made to this file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-05-22ARM: uniphier: remove #include <net.h> again from micro-support-card.cMasahiro Yamada
I do not understand the changes made to this file by commit 90526e9fbac4 ("common: Drop net.h from common header"). git show 90526e9fbac4 -- arch/arm/mach-uniphier/micro-support-card.c The necessary declaration is already included by <netdev.h> at line 112. It also moved the <dm/of.h> inclusion, but I do not understand the motivation of doing so, either. Simply revert the changes made to this file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-05-22ARM: uniphier: include <asm/system.h> instead of <asm/cache.h> from psci.cMasahiro Yamada
I do not understand the change made to this file by commit 90526e9fbac4 ("common: Drop net.h from common header"). git show 90526e9fbac4 -- arch/arm/mach-uniphier/arm32/psci.c It added <asm/cache.h> while this file does not call the standard cache functions at all. All the uniphier-specific cache functions, uniphier_cache_*() are declared in cache-uniphier.h, which is already included from this file. Including <asm/system.h> is sensible to fix the -Wmissing-prototypes warnings because this file defines psci_cpu_on and psci_system_reset(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop linux/bitops.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/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-18command: Remove the cmd_tbl_t typedefSimon Glass
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. 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 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-15spl: Always define preloader_console_initSamuel Holland
A large number of boards call preloader_console_init unconditionally. Currently, they fail to build with CONFIG_SPL_SERIAL=n, because the function is undefined in that case. To fix the build, always define preloader_console_init, but make it no-op when CONFIG_SPL_SERIAL=n. For the few boards that did check for CONFIG_SPL_SERIAL before calling preloader_console_init, remove the checks, since the function can now be called unconditionally. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-04-22spl: mmc: Rename spl_boot_mode() to spl_mmc_boot_mode()Harald Seiler
The function's name is misleading as one might think it is used generally to select the boot-mode when in reality it is only used by the MMC driver to find out in what way it should try reading U-Boot Proper from a device (either using a filesystem, a raw sector/partition, or an eMMC boot partition). Rename it to spl_mmc_boot_mode() to make it more obvious what this function is about. Link: https://lists.denx.de/pipermail/u-boot/2020-April/405979.html Signed-off-by: Harald Seiler <hws@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-02-28ARM: uniphier: detect the base of micro support card at run-timeMasahiro Yamada
The base address 0x43f00000 is no longer true for the future SoC. Extract the base address from the device tree. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-28ARM: uniphier: remove workaround for the NAND write protectMasahiro Yamada
This workaround was previously needed for LD4, Pro4, sLD8, Pro5 SoCs. The boot ROM does not touch this register for PXs2/LD6b or later. Now that the reset signal of the Denali NAND controller is always asserted in board_init() then deasserted in the driver, the WRITE_PROTECT register gets back to the default value, which means the write protect is deasserted. This workaround can go away entirely. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-28ARM: uniphier: move NAND reset assertion to U-Boot proper from SPLMasahiro Yamada
The comment /* deassert reset */ is wrong. It asserts the reset. It no longer needs to stay in SPL. The NAND controller reset is handled in the driver. So, this assert can be moved to the board_init() of U-Boot proper. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-28ARM: uniphier: add sdscript, sdboot, sdupdate environment variablesMasahiro Yamada
Add handy macros: - sdscript: source boot.scr in the file system of the SD media - sdboot : boot the kernel using the images in the file system of the SD media - sdscript: update the boot firmware in the SD media (in raw block sectors) Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-01ARM: uniphier: set gd->ram_base correctlyMasahiro Yamada
gd->ram_base is not set at all if the end address of the DRAM ch0 exceeds the 4GB limit. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-01ARM: uniphier: remove adhoc reset deassertion for the NAND controllerMasahiro Yamada
Now that the reset controlling of the Denali NAND driver (denali_dt.c) works for this platform, remove the adhoc reset deassert code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-01-17common: Move hang() to the same header as panic()Simon Glass
At present panic() is in the vsprintf.h header file. That does not seem like an obvious choice for hang(), even though it relates to panic(). So let's put hang() in its own header. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Migrate a few more files] Signed-off-by: Tom Rini <trini@konsulko.com>
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>
2019-12-02common: Move some board functions out of common.hSimon Glass
A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move some cache and MMU functions out of common.hSimon Glass
These functions belong in cpu_func.h. Another option would be cache.h but that code uses driver model and we have not moved these cache functions to use driver model. Since they are CPU-related it seems reasonable to put them here. Move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move some SMP functions out of common.hSimon Glass
These functions belong in cpu_func.h so move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-10-08dm: core: Add device_foreach_child()Simon Glass
We have a 'safe' version of this function but sometimes it is not needed. Add a normal version too and update a few places that can use it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-08-11env: Move env_set_ulong() to env.hSimon Glass
Move env_set_ulong() over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-08-11env: Move env_set_hex() to env.hSimon Glass
Move env_set_hex() over to the new header file along with env_set_addr() which uses it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-07-24psci: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: arch/arm/mach-stm32mp/psci.c: warning: no previous prototype for ‘psci_set_state’ [-Wmissing-prototypes] warning: no previous prototype for ‘psci_arch_cpu_entry’ [-Wmissing-prototypes] warning: no previous prototype for ‘psci_features’ [-Wmissing-prototypes] warning: no previous prototype for ‘psci_version’ [-Wmissing-prototypes] warning: no previous prototype for ‘psci_affinity_info’ [-Wmissing-prototypes] warning: no previous prototype for ‘psci_migrate_info_type’ [-Wmissing-prototypes] warning: no previous prototype for ‘psci_cpu_on’ [-Wmissing-prototypes] warning: no previous prototype for ‘psci_cpu_off’ [-Wmissing-prototypes] warning: no previous prototype for ‘psci_system_reset’ [-Wmissing-prototypes] warning: no previous prototype for ‘psci_system_off’ [-Wmissing-prototypes] Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-10ARM: uniphier: set {kernel, ramdisk, fdt}_addr_r at boot-timeMasahiro Yamada
The base of DRAM will be changed for the next generation SoC. The addresses needed for booting the kernel should be shifted according to the DRAM base. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: set dram_base environment variableMasahiro Yamada
The base of DRAM will be changed for the next generation SoC. Set the base address to the 'dram_base' environment variable, which will be useful for scripting. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: set loadaddr at boot-timeMasahiro Yamada
The base of DRAM will be changed for the next generation SoC. To support it along with existing SoCs in the single defconfig, set 'loadaddr' at boot-time by adding the offset to the DRAM base. CONFIG_SYS_LOAD_ADDR is still hard-coded for compilation, but the value from environment variable 'loadaddr' should be used. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: turn uniphier_set_fdt_file() into void functionMasahiro Yamada
For consistency with a function that will be added. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: remove CONFIG_SYS_SDRAM_BASEMasahiro Yamada
The base address of DRAM was 0x80000000 for all the ARM SoCs of this family in the past. It will be changed to 0x20000000 for a planned new SoC. To support multiple SoCs by the single uniphier_v8_defconfig, the base must be run-time determined. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: make mem_map run-time configurableMasahiro Yamada
Currently, mem_map is hard-coded, and it worked well until the last SoC. For a planned new SoC, the addresses of peripherals and DRAM will be changed. Set it up run-time. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: make dram_init() more genericMasahiro Yamada
Make this function work with any channel being empty. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: make dram_init() independent of SG_MEMCONFMasahiro Yamada
Currently, dram_init() code relies on the fact the DRAM size configuration exists in the SG_MEMCONF register. This will no longer be true for a planned new SoC, which will replace SG_MEMCONF with a different register. Refactor the hook in a more generic way. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: detect register base addresses run-timeMasahiro Yamada
Until the last SoC, the register addresses have been hard-coded because they are always constant. For a planned new SoC, the register bases will be completely changed. I insist on supporting multiple SoCs/boards by a single defconfig (uniphier_v8_defconfig) since duplicating similar defconfig files is a maintenance burden. The base addresses must be fixed-up at run-time somehow. Previously, the board init code identified the SoC by reading out the SG_REVISION register. This is much easier than parsing DT. You cannot do it any more because the base address of SG will be changed. The SG_REVISION register exists to read out the SoC ID, but you never know its address before identifying the SoC. Oh well. So, the possible solution is to parse the DT, and find out the node with "*-soc-glue" compatible string. Then, sg_base is set to the value of the "reg" property. The sc_base is set up likewise. It is worth noting a pit-fall. Having sc_base and sg_base in the global scope will make the life easier, but the global variables are poorly supported before the relocation. In fact, the .bss section overwraps with DT. Allocating them in the .bss section would break DT. So, I gave dummy initializers to assign them in the .data section. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: de-couple SC macros into base address and offsetMasahiro Yamada
The SC_* macros represent the address of SysCtrl registers. For a planned new SoC, its base address will be changed. Turn the SC_* macros into the offset from the base address. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: de-couple SG macros into base address and offsetMasahiro Yamada
The SG_* macros represent the address of SoC-glue registers. For a planned new SoC, its base address will be changed. Turn the SG_* macros into the offset from the base address. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: detect SD boot modeMasahiro Yamada
The planned new SoC supports the SD boot mode. Detect and display it. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: make boot_is_swapped() code optionalMasahiro Yamada
The planned new SoC does not have SBC (System Bus Controller) block. Make boot_is_swapped() an optional hook. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: check DT to determine whether to initialize SBCMasahiro Yamada
If CONFIG_MICRO_SUPPORT_CARD is enabled, U-Boot initialize SBC (System Bus Controller), which may not be really necessary. Check the "socionext,uniphier-system-bus" node in DT run-time. If and only if it is found and its "status" property is okay, initialize the SBC block. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: check DT to determine whether to use support cardMasahiro Yamada
If CONFIG_MICRO_SUPPORT_CARD is enabled, U-Boot tries to get access to the devices on the support card, which may not actually exist. Check the DT and search for the on-board devices run-time. If the nodes are not found in DT, then disable the code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: include <linux/io.h> from boot-device.cMasahiro Yamada
This file calls readl(), so needs to include <linux/io.h>. Currently, it relies on someone else including it. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: use bool type for have_internal_stm parameterMasahiro Yamada
This is boolean logic. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: clean up clk/MakefileMasahiro Yamada
Now that 64-bit SoCs of this SoC family no longer support SPL, this Makefile can be slightly simpler. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10ARM: uniphier: remove unused uniphier_ld11_boot_device_fixup()Masahiro Yamada
The .boot_device_fixup() is only called by SPL. Now that 64-bit SoCs of this SoC family no longer support SPL, debug-uart-ld20.c is never compiled. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-06-29ARM: uniphier: move sg_set_{pinsel, iectrl} to more relevant placesMasahiro Yamada
Move the sg_set_pinsel macro to arch/arm/mach-uniphier/arm32/debug_ll.S since it is not used anywhere else. Move the C functions sg_set_{pinsel,iectrl} to debug-uart.c since they are not used anywhere else. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>