summaryrefslogtreecommitdiff
path: root/arch/mips
AgeCommit message (Collapse)AuthorFilesLines
2024-07-31Kconfig: Unify endian support optionJiaxun Yang6-31/+25
Move SUPPORT_BIG_ENDIAN, SUPPORT_LITTLE_ENDIAN to top-level arch Kconfig and let architectures select them as necessary. Remove if guard for Endianness selection choice so we can have one of SYS_BIG_ENDIAN, SYS_LITTLE_ENDIAN config symbol defined even on single endian system. Default endian to SYS_BIG_ENDIAN for MIPS || MICROBLAZE and LITTLE_ENDIAN for the rest to retain old config behaviour. Note: PPC, SH, Xtensa are technically bi-endian, but I checked compiled u-boot image with readelf, U-Boot currently only support little endian for SH and Xtensa, Big Endian for PPC. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
2024-07-15mips: Remove duplicate newlinesMarek Vasut6-12/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini3-1/+2
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini3-2/+1
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-07mmc: Migrate MMC_SUPPORTS_TUNING to KconfigTom Rini1-0/+1
The constraints on the MMC_SUPPORTS_TUNING symbol can easily be expressed in Kconfig (with the addition of SPL_MMC_SUPPORTS_TUNING). Furthermore, in order to remove <common.h> from the MMC subsystem, the way this symbol is used today needs to be changed in order to continue functioning. Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-06global: Make <asm/global_data.h> include <asm/u-boot.h>Tom Rini2-1/+1
This follows the example of RISC-V where <asm/global_data.h> includes <asm/u-boot.h> directly as "gd" includes a reference to bd_info already and so the first must include the second anyhow. We then remove <asm/u-boot.h> from all of the places which include references to "gd" an so have <asm/global_data.h> already. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-04-22Merge patch series "Kconfig: some cleanups"Tom Rini4-6/+6
Michal Simek <michal.simek@amd.com> says: I looked as cleaning up some dependencies and I found that qconfig is reporting some issues. This series is fixing some of them. But there are still some other pending. That's why please go and fix them if they are related to your board. UTF-8: I am using uni2ascii -B < file to do conversion. When you run it in a loop you will find some other issue with copyright chars or some issues in files taken from the Linux kernel like DTs. They should be likely fixed in the kernel first. Based on discussion I am ignoring names too.
2024-04-22common: Convert *.c/h from UTF-8 to ASCII enconfingMichal Simek4-6/+6
Convert UTF-8 chars to ASCII in cases where make sense. No Copyright or names are converted. Signed-off-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Marek Behún <kabel@kernel.org>
2024-04-18Revert "Merge patch series "pxe: Allow extlinux booting without CMDLINE ↵Tom Rini1-1/+1
enabled"" As reported by Jonas Karlman this series breaks booting on some AArch64 platforms with common use cases. For now the best path forward is to revert the series. This reverts commit 777c28460947371ada40868dc994dfe8537d7115, reversing changes made to ab3453e7b12daef47b9e91da2a2a3d48615dc6fc. Link: https://lore.kernel.org/u-boot/50dfa3d6-a1ca-4492-a3fc-8d8c56b40b43@kwiboo.se/ Signed-off-by: Tom Rini <trini@konsulko.com>
2024-04-10Merge patch series "pxe: Allow extlinux booting without CMDLINE enabled"Tom Rini1-1/+1
Simon Glass <sjg@chromium.org> says: This series is the culmanation of the current line of refactoring series. It adjusts pxe to call the booting functionality directly rather than going through the command-line interface. With this is is possible to boot using the extlinux bootmeth without the command line enabled. It also updates fastboot to do a similar thing.
2024-04-10treewide: Make arch-specific bootm code depend on BOOTMSimon Glass1-1/+1
Allow these functions to be compiled in when CONFIG_BOOTM is enabled, even if CONFIG_CMD_BOOTM is not. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Angelo Dureghello <angelo@kernel-space.org>
2024-03-19Merge tag 'u-boot-socfpga-next-20240319' of ↵Tom Rini3-3/+20
https://source.denx.de/u-boot/custodians/u-boot-socfpga into next - A new driver in the misc to register setting from device tree. This also provides user a clean interface and all register settings are centralized in one place, device tree. - Enable Agilex5 platform for Intel product. Changes, modification and new files are created for board, dts, configs and makefile to create the base for Agilex5. Build-tested on SoC64 boards, boot tested on some of them.
2024-03-13mips: fix change_k0_cca()Daniel Schwierzeck1-2/+2
The intention of change_k0_cca() is to read the C0.Config register into register $t0, update $t0 with the new cache coherency mode passed in $a0 and write back $t0 to C0.Config. With MIPS32 R2 or later instruction sets, this can be achieved with a single instruction with INS. The source and destination register of the INS instruction is passed as first parameter. In case of change_k0_cca() it is register $t0. But for writing back the updated value to C0.Config, the incorrect $a0 register is used. This is only correct in the MIPS32 R1 code path. Fix the `mtc0` instruction to write back the value of the $t0 register. Fix the MIPS32 R1 code path to also store the updated value in $t0. Reported by user ddqxy138 on Github. https://github.com/u-boot/u-boot/commit/b838586086af3278bcaead3720c7a18813cf4619 Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2024-03-13mips: implement __udivdi3Linus Walleij2-1/+18
Squashfs wasn't compiling because the lldiv() directives turn into __udivdi3 and we are using private libgcc. After this squashfs compiles for MIPS. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Bartel Eerdekens <barteleerdekens@gmail.com>
2024-03-13Kconfig: move CONFIG_32/64BIT to arch/KconfigDan Carpenter1-6/+0
These configs are used in multiple places so put them in a shared Kconfig file. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-02-27Kconfig: Centralize prompting for SYS_CONFIG_NAMETom Rini3-3/+0
Generally speaking, we do not prompt for this value and define it in the board specific Kconfig file. There are some valid use cases however today where we do prompt for this value, so instead of having this be done in a number of locations, do this at the top-level location only. This removes the question from a number of other locations and makes it consistent that when we do set the value directly, we always do it the same way. We don't need to specify the type, it's always string. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-29treewide: Remove clk_freeSean Anderson1-6/+1
This function is a no-op. Remove it. Signed-off-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20231216193843.2463779-3-seanga2@gmail.com
2024-01-22mtd: Make CONFIG_MTD be the gate symbol for the menuTom Rini1-0/+2
The help for CONFIG_MTD explains that it needs to be enabled for various things like NAND, etc to be available. It however then doesn't enforce this dependency and so if you have none of these systems present you still need to disable a number of options. Fix this by making places that select/imply one type of flash, but did not do the same, also do this for "MTD". Make boards which hadn't been enabling MTD already but need it now, do so. In a few places, disable CONFIG_CMD_MTDPARTS as it wasn't previously enabled but was now being implied. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-12-21Merge patch series "Complete decoupling of bootm logic from commands"Tom Rini2-4/+12
Simon Glass <sjg@chromium.org> says: This series continues refactoring the bootm code to allow it to be used with CONFIG_COMMAND disabled. The OS-handling code is refactored and a new bootm_run() function is created to run through the bootm stages. This completes the work. A booti_go() function is created also, in case it proves useful, but at last for now standard boot does not use this. This is cmdd (part d of CMDLINE refactoring) It depends on dm/bootstda-working which depends on dm/cmdc-working
2023-12-21bootm: Rename do_bootm_states() to bootm_run_states()Simon Glass1-1/+1
Rename the function to bootm_run_states() to better indicate ts purpose. The 'do_' prefix is used to indicate a command processor, which this is now not. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-12-21bootm: Adjust arguments of boot_os_fnSimon Glass1-2/+4
Adjust boot_os_fn to use struct bootm_info instead of the separate argc, argv and image parameters. Update the handlers accordingly. Few of the functions make use of the arguments, so this improves code size slightly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-12-21mips: Add a reset_cpu() functionSimon Glass1-1/+7
The current do_reset() is called from a command context. Add a function which can be used from anywhere, as is done on ARM. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-21global: Rework architecture global_data.h to include <linux/types.h>Tom Rini1-1/+1
In most cases, the architecture global data currently makes use of assorted linux types, but does not include <linux/types.h> to provide them. Add <linux/types.h> instead of relying on indirect inclusion. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-12-15clk: treewide: switch to clock dump from clk_opsIgor Prusov1-23/+0
Switch to using new dump operation in clock provider drivers instead of overriding soc_clk_dump. Tested-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru> Link: https://lore.kernel.org/r/20231109105516.24892-8-ivprusov@sberdevices.ru
2023-12-13boot: Drop size parameter from image_setup_libfdt()Simon Glass1-2/+2
The of_size parameter is not used, so remove it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-11-28mips: io.h: Add defines for read/write/in/out functionsIgor Prusov1-0/+32
Add defines for {read,write}{b,w,l,q}(), {read,write}s{b,w,l,q}() and {in,out}s{b,w,l,q}() functions to make asm-generic/io.h aware of them. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28mips: io.h: Add const to reads functions paramsIgor Prusov1-1/+2
Currently reads{b,w,l}() functions don't have const qualifier for their address parameter. Since asm-generic/io.h in Linux has const for all read functions, add it here as well to keep signatures in sync. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-06bmips: Add Inteno XG6846 boardLinus Walleij3-0/+70
This adds support for the Inteno XG6846 board based on the Broadcom MIPS 6328 SoC. The default boot will read a uImage from flash and boot it. Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-10-24mips: Remove common.h usageTom Rini46-47/+4
We can remove common.h from most cases of the code here, and only a few places need an additional header instead. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-06spl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LENSimon Glass2-4/+4
Use the new SPL/TPL/VPL_SYS_MALLOC_F symbols to determine whether the malloc pool exists. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2023-08-31event: Use an event to replace last_stage_init()Simon Glass2-2/+8
Add a new event which handles this function. Convert existing use of the function to use the new event instead. Make sure that EVENT is enabled by affected boards, by selecting it from the LAST_STAGE_INIT option. For x86, enable it by default since all boards need it. For controlcenterdc, inline the get_tpm() function and make sure the event is not built in SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-31event: Convert existing spy records to simpleSimon Glass1-8/+2
Very few of the existing event-spy records use the arguments they are passed. Update them to use a simple spy instead, to simplify the code. Where an adaptor function is currently used, remove it where possible. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-21Merge tag 'v2023.10-rc3' into nextTom Rini2-2/+2
Prepare v2023.10-rc3 Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-15common: return type board_get_usable_ram_topHeinrich Schuchardt2-2/+2
board_get_usable_ram_top() returns a physical address that is stored in gd->ram_top. The return type of the function should be phys_addr_t like the current type of gd->ram_top. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-09treewide: unify the linker symbol reference formatShiji Yang4-4/+4
Now all linker symbols are declared as type char[]. Though we can reference the address via both the array name 'var' and its address '&var'. It's better to unify them to avoid confusing developers. This patch converts all '&var' linker symbol refrences to the most commonly used format 'var'. Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-07-20mips: octeon: Correct types in cvmx-pko3-queueTom Rini2-6/+9
When building with gcc-13.1 we see that the prototype for cvmx_pko3_sq_config_children does not match the declaration. Make these match and correct a typo in the function's version of the docs that the prototype did not have, as part of keeping those in-sync. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-07-05Merge tag 'v2023.07-rc6' into nextTom Rini1-1/+1
Prepare v2023.07-rc6
2023-06-24mips: cpu: Use plain puts() in restart handlerMarek Vasut1-1/+1
This removes dependency on fprintf() , which is not available in SPL unless full printf support is enabled. Signed-off-by: Marek Vasut <marex@denx.de>
2023-06-12Merge tag v2023.07-rc4 into nextTom Rini1-1/+1
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-05-31mips: use asm-generic/unaligned.hJens Wiklander1-22/+1
Mips essentially duplicates the content of asm-generic/unaligned.h, so use that file directly instead. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-11dm: Emit the arch_cpu_init_dm() even only before relocationSimon Glass1-1/+1
The original function was only called once, before relocation. The new one is called again after relocation. This was not the intent of the original call. Fix this by renaming and updating the calling logic. With this, chromebook_link64 makes it through SPL. Fixes: 7fe32b3442f0 ("event: Convert arch_cpu_init_dm() to use events") Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-02-14dm: dts: Convert driver model tags to use new schemaSimon Glass33-113/+113
Now that Linux has accepted these tags, move the device tree files in U-Boot over to use them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL use of OCTEON_SERIAL_PCIE_CONSOLESimon Glass1-1/+1
This converts 1 usage of this option to the non-SPL form, since there is no SPL_OCTEON_SERIAL_PCIE_CONSOLE defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL use of OCTEON_SERIAL_BOOTCMDSimon Glass1-1/+1
This converts 1 usage of this option to the non-SPL form, since there is no SPL_OCTEON_SERIAL_BOOTCMD defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL use of MIPS_CMSimon Glass1-1/+1
This converts 1 usage of this option to the non-SPL form, since there is no SPL_MIPS_CM defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-09Correct SPL uses of BOOTSTAGE_REPORTSimon Glass1-1/+1
This converts 2 usages of this option to the non-SPL form, since there is no SPL_BOOTSTAGE_REPORT defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-09Correct SPL use of BOOTSTAGE_FDTSimon Glass1-1/+1
This converts 1 usage of this option to the non-SPL form, since there is no SPL_BOOTSTAGE_FDT defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-07gpio: Drop unused pca9698 driverSimon Glass1-42/+1
This is not used. Drop the driver and Kconfig option. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-20global: Finish CONFIG -> CFG migrationTom Rini1-4/+4
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>
2023-01-18event: Correct dependencies on the EVENT frameworkTom Rini1-1/+1
The event framework is just that, a framework. Enabling it by itself does nothing, so we shouldn't ask the user about it. Reword (and correct typos) around this the option and help text. This also applies to DM_EVENT and EVENT_DYNAMIC. Only EVENT_DEBUG and CMD_EVENT should be visible to the user to select, when EVENT is selected. With this, it's time to address the larger problems. When functionality uses events, typically via EVENT_SPY, the appropriate framework then must be select'd and NOT imply'd. As the functionality will cease to work (and so, platforms will fail to boot) this is non-optional and where select is appropriate. Audit the current users of EVENT_SPY to have a more fine-grained approach to select'ing the framework where used. Also ensure the current users of event_register and also select EVENT_DYNAMIC. Cc: AKASHI Takahiro <takahiro.akashi@linaro.org> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Reported-by: Oliver Graute <Oliver.Graute@kococonnector.com> Reported-by: Francesco Dolcini <francesco.dolcini@toradex.com> Fixes: 7fe32b3442f0 ("event: Convert arch_cpu_init_dm() to use events") Fixes: 42fdcebf859f ("event: Convert misc_init_f() to use events") Fixes: c5ef2025579e ("dm: fix DM_EVENT dependencies") Signed-off-by: Tom Rini <trini@konsulko.com> Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Fabio Estevam <festevam@denx.de>