summaryrefslogtreecommitdiff
path: root/arch/mips
AgeCommit message (Collapse)Author
2017-07-27mips: spl: configure SYS_MALLOC_F_LEN independently for SPL and full U-BootAndy Yan
Some platforms have very limited SRAM to run SPL code, so there may not be the same amount space for a malloc pool before relocation in the SPL stage as the normal U-Boot stage. Make SPL and (the full) U-Boot stage use independent SYS_MALLOC_F_LEN, so the size of pre-relocation malloc pool can be configured memory space independently. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Acked-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> [fixed up commit-message:] Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-07-26Merge git://git.denx.de/u-boot-mipsTom Rini
2017-07-26Convert CONFIG_ENV_IS_IN_FLASH to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_ENV_IS_IN_FLASH Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-26Convert CONFIG_ENV_IS_IN_MMC/NAND/UBI and NOWHERE to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_ENV_IS_IN_MMC CONFIG_ENV_IS_IN_NAND CONFIG_ENV_IS_IN_UBI CONFIG_ENV_IS_NOWHERE In fact this already exists for sunxi as a 'choice' config. However not all the choices are available in Kconfig yet so we cannot use that. It would lead to more than one option being set. In addition, one purpose of this series is to allow the environment to be stored in more than one place. So the existing choice is converted to a normal config allowing each option to be set independently. There are not many opportunities for Kconfig updates to reduce the size of this patch. This was tested with ./tools/moveconfig.py -i CONFIG_ENV_IS_IN_MMC And then manual updates. This is because for CHAIN_OF_TRUST boards they can only have ENV_IS_NOWHERE set, so we enforce that via Kconfig logic now. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-25MIPS: bootm: Fix broken boot_env_legacy codepathZubair Lutfullah Kakakhel
This patch fixes 2 bugs introduced by the following commit 2bb5b63 MIPS: bootm: rework and fix broken bootm code The CONFIG_IS_ENABLED macro prepends 'CONFIG_' Hence, remove CONFIG_ from CONFIG_MIPS_BOOT_ENV_LEGACY usage. Also, 2bb5b63 reworks bootm so that linux_env_legacy runs before linux_cmdline_legacy. However, linux_env_legacy depends on linux_cmdline_legacy running first as linux_cmdline_init initialilzes linux_argp which linux_env_legacy later depends on during its initialization. Reorder the code so that linux_cmdline_legacy runs before linux_env_legacy. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
2017-07-25MIPS: Stop building position independent codePaul Burton
U-Boot has up until now built with -fpic for the MIPS architecture, producing position independent code which uses indirection through a global offset table, making relocation fairly straightforward as it simply involves patching up GOT entries. Using -fpic does however have some downsides. The biggest of these is that generated code is bloated in various ways. For example, function calls are indirected through the GOT & the t9 register: 8f998064 lw t9,-32668(gp) 0320f809 jalr t9 Without -fpic the call is simply: 0f803f01 jal be00fc04 <puts> This is more compact & faster (due to the lack of the load & the dependency the jump has on its result). It is also easier to read & debug because the disassembly shows what function is being called, rather than just an offset from gp which would then have to be looked up in the ELF to discover the target function. Another disadvantage of -fpic is that each function begins with a sequence to calculate the value of the gp register, for example: 3c1c0004 lui gp,0x4 279c3384 addiu gp,gp,13188 0399e021 addu gp,gp,t9 Without using -fpic this sequence no longer appears at the start of each function, reducing code size considerably. This patch switches U-Boot from building with -fpic to building with -fno-pic, in order to gain the benefits described above. The cost of this is an extra step during the build process to extract relocation data from the ELF & write it into a new .rel section in a compact format, plus the added complexity of dealing with multiple types of relocation rather than the single type that applied to the GOT. The benefit is smaller, cleaner, more debuggable code. The relocate_code() function is reimplemented in C to handle the new relocation scheme, which also makes it easier to read & debug. Taking maltael_defconfig as an example the size of u-boot.bin built using the Codescape MIPS 2016.05-06 toolchain (gcc 4.9.2, binutils 2.24.90) shrinks from 254KiB to 224KiB. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: u-boot@lists.denx.de Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2017-06-05mips: Make u-boot-mips.h a private headerSimon Glass
Rather than including this arch-specific header file in common.h, include it from within mips's u-boot.h header. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2017-05-31mips: bmips: fix BCM3380 periph clock frequencyÁlvaro Fernández Rojas
Instead of having a peripheral clock of 50 MHz like the BCM63xx family, it has a 48 MHz clock. This fixes uart baud rate calculation for BCM3380. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-05-31mips: bmips: add board descriptionsÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31MIPS: add BMIPS Sagem F@ST1704 boardÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31MIPS: add support for Broadcom MIPS BCM6338 SoC familyÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31MIPS: add BMIPS Netgear CG3100D boardÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31MIPS: add support for Broadcom MIPS BCM3380 SoC familyÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31MIPS: add BMIPS Comtrend CT-5361 boardÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31MIPS: add support for Broadcom MIPS BCM6348 SoC familyÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31mips: bmips: add wdt-reboot driver support for BCM63268Álvaro Fernández Rojas
This driver allows rebooting the SoC by calling wdt_expire_now op. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31mips: bmips: add wdt-reboot driver support for BCM6328Álvaro Fernández Rojas
This driver allows rebooting the SoC by calling wdt_expire_now op. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31mips: bmips: add wdt-reboot driver support for BCM6358Álvaro Fernández Rojas
This driver allows rebooting the SoC by calling wdt_expire_now op. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31mips: bmips: add bcm6345-wdt driver support for BCM63268Álvaro Fernández Rojas
This driver controls the watchdog present on this SoC. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31mips: bmips: add bcm6345-wdt driver support for BCM6328Álvaro Fernández Rojas
This driver controls the watchdog present on this SoC. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-31mips: bmips: add bcm6345-wdt driver support for BCM6358Álvaro Fernández Rojas
This driver controls the watchdog present on this SoC. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-12boston: Setup memory ranges in FDT provided to LinuxPaul Burton
The boston memory map isn't suited to the simple "all memory starting from 0" approach that the MIPS arch_fixup_fdt() implementation takes. Instead we need to indicate the first 256MiB of DDR from 0 and the rest from 0x90000000. Implement ft_board_setup to do that. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-12boston: Move CM GCRs away from flashPaul Burton
Move the MIPS Coherence Manager (CM) Global Configuration Registers (GCRs) away from the region of the physical address space which the Boston board's parallel flash is found in, such that we can access all of flash without clobbering GCRs. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-12MIPS: Make CM GCR base configurablePaul Burton
Without adding a prompt for CONFIG_MIPS_CM_BASE, Kconfig doesn't allow defconfigs to set it. Provide the prompt in order to allow for that. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-12mips: bmips: add missing SFR NeufBox 4 configÁlvaro Fernández Rojas
Fixes commit a186d26, which missed including SFR NeufBox config from bmips Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-05-12mips: bmips: bcm63268: fix brcm, bcm6328-mc sizeÁlvaro Fernández Rojas
Shrink brcm,bcm6328-mc size to avoid overlapping with other controllers Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-05-12mips: bmips: bcm6328: fix brcm, bcm6328-mc sizeÁlvaro Fernández Rojas
Shrink brcm,bcm6328-mc size to avoid overlapping with other controllers Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-05-12mips: bmips: bcm6358: fix brcm, bcm6358-mc sizeÁlvaro Fernández Rojas
Shrink brcm,bcm6358-mc size to avoid overlapping with other controllers Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-05-10mips: bmips: add bcm6328-power-domain driver support for BCM63268Álvaro Fernández Rojas
This driver can control up to 32 power domains. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-05-10mips: bmips: add bcm6328-power-domain driver support for BCM6328Álvaro Fernández Rojas
This driver can control up to 32 power domains. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-05-10mips: bmips: add bcm6345-rst driver support for BCM63268Álvaro Fernández Rojas
This driver can control up to 32 clocks. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add bcm6345-rst driver support for BCM6328Álvaro Fernández Rojas
This driver can control up to 32 clocks. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add bcm6345-rst driver support for BCM6358Álvaro Fernández Rojas
This driver can control up to 32 resets. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add bcm6345-clk driver support for BCM63268Álvaro Fernández Rojas
This driver can control up to 32 clocks. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add bcm6345-clk driver support for BCM6328Álvaro Fernández Rojas
This driver can control up to 32 clocks. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add bcm6345-clk driver support for BCM6358Álvaro Fernández Rojas
This driver can control up to 32 clocks. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add NeufBox 4 (Sercomm) boardÁlvaro Fernández Rojas
This serves as an example for bcm6358-leds. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add bcm6358-led driver support for BCM6358Álvaro Fernández Rojas
This driver can control up to 32 serial leds. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add Comtrend VR-3032u bcm6328-ledsÁlvaro Fernández Rojas
This board has several LEDs attached to its BCM6328 led controller. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add Comtrend AR-5387un bcm6328-ledsÁlvaro Fernández Rojas
This board has several LEDs attached to its BCM6328 led controller. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add bcm6328-led driver support for BCM63268Álvaro Fernández Rojas
This driver can control up to 24 LEDs and supports HW blinking and serial leds. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add bcm6328-led driver support for BCM6328Álvaro Fernández Rojas
This driver can control up to 24 LEDs and supports HW blinking and serial leds. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add Huawei HG556a gpio-ledsÁlvaro Fernández Rojas
This board has several LEDs attached to gpio0. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add bcm6345-gpio driver support for BCM63268Álvaro Fernández Rojas
This SoC has one gpio bank divided into two 32 bit registers, with a total of 52 GPIOs. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add bcm6345-gpio driver support for BCM6328Álvaro Fernández Rojas
This SoC has one gpio bank with a total of 32 GPIOs. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10mips: bmips: add bcm6345-gpio driver support for BCM6358Álvaro Fernández Rojas
This SoC has one gpio bank divided into two 32 bit registers, with a total of 40 GPIOs. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10MIPS: add BMIPS Comtrend VR-3032u boardÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10MIPS: add support for Broadcom MIPS BCM63268 SoC familyÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10MIPS: add BMIPS Comtrend AR-5387un boardÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-10MIPS: add support for Broadcom MIPS BCM6328 SoC familyÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>