summaryrefslogtreecommitdiffstats
path: root/arch/mips/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* MIPS: relocation: add relocation supportOleksij Rempel2019-04-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this patch i a port of following patch from u-boot with some additional integration changes and fixes of original code: | Subject: [PATCH] MIPS: Stop building position independent code | | 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> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: remove HAS_NO_BOARD_HL_CODE supportOleksij Rempel2018-12-171-2/+0
| | | | | | | | With multiimage support it makes no more sense, every board should have Makefile and some lowlevel code. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: port all mach* to multiimageOleksij Rempel2018-12-171-25/+4
| | | | | Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make: Add -Wmissing-prototypesSascha Hauer2018-11-191-1/+1
| | | | | | | | | | | | | | -Wmissing-prototypes is a useful warning, so add it to the build. With this we can detect conflicting function prototypes. When a file implements a function but doesn't include the header file which provides the prototype for it then conflicting prototypes would go unnoticed without this warning. MIPS already had that warning, so we can remove it from the MIPS Makefile. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: ath79: fix different typosOleksij Rempel2018-03-021-2/+2
| | | | | | | | | the CONFIG typos was not real issue. The defconfig typo i detected only after clean compile. I hope we can migrate barebox MIPS to multiimage soon. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add initial 8devices-lima boardOleksij Rempel2018-02-131-0/+1
| | | | | | | | More information about this board can be found here: https://www.8devices.com/products/lima Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add support for DPTechnics DPT-Module v1Oleksij Rempel2018-01-051-0/+1
| | | | | | | | This product can be found here: https://dptechnics.com/en/products/dpt-module-v1.html Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: provide HAS_NO_BOARD_HL_CODEOleksij Rempel2018-01-051-1/+5
| | | | | | | | | | some boards have PBL code, but no board specific high level code. Instead of creating dummy.c files, better provide config to avoid compiling of board code. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: ath79: add TP-Link WDR4300 board supportOleksij Rempel2017-08-151-0/+1
| | | | | | | | | This provides low level initialization of pll and ddr2. Resulting binary should work from SRAM, DDR2 and SPI flash. If started from DDR2 RAM level initialization will skipped. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* MIPS: ath79: add black-swift board supportAntony Pavlov2015-11-031-0/+1
| | | | | | | | | | | Black Swift is a tiny coin-sized embedded computer based on AR9331 SoC. See http://www.black-swift.com/ for details. See also Black Swift kickstarter page: https://www.kickstarter.com/projects/1133560316/black-swift-tiny-wireless-computer Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* kbuild: move asm-offsets.h rule to ./KbuildMasahiro Yamada2015-01-081-43/+0
| | | | | | | | | | | | | | | Currently, MIPS is the only architecture that needs include/generated/asm-offsets.h, but we have got ./Kbuild file now. It is a good reason to move asm-offsets.h rule from arch/mips/Makefile to ./Kbuild and add dummy asm-offsets.c for the other architectures. asm-offsets.h would be useful for all the architectures. This commit does not implement include/generated/bounds.h, but if necessary, it is easy to implement it. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add MIPS Creator CI20 board supportAntony Pavlov2014-09-111-0/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mips: Fix dtb build rulesSascha Hauer2014-06-111-5/+0
| | | | | | | | Add intermediate .S files to .SECONDARY. Otherwise make deletes them and regenerates them each build. Also remove KBUILD_DTBS since the make system descends in dts/ anyway. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: ath79: add tplink-mr3020 board supportAntony Pavlov2014-03-281-0/+1
| | | | | | | | | | | | | | | | This board support code can be used for TP-LINK WR703 too. TP-LINK WR703 is very similar to TP-LINK MR3020, there are some non-essential differences: * WR703 is smaller and cheaper; * WR703 has only one led, but MR3020 has five leds; * MR3020 uses mini-USB connector, WR703 uses micro-USB connector. See https://forum.openwrt.org/viewtopic.php?id=45159 for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add Atheros ar933x family supportDu Huanpeng2014-03-281-0/+2
| | | | | | | | | Use the mach-ath79 name for compatibility with linux kernel. Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: boards: rename rzx50 -> ritmix-rzx50Antony Pavlov2014-03-261-1/+1
| | | | | | | | All MIPS board use <vendor>-<model> name template save Ritmix RZX-50. This commit fixes this inconsistency. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: mach-loongson: add loongson-ls1b boardAntony Pavlov2014-01-301-0/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add Loongson-1B CPU Kbuild stuffAntony Pavlov2014-01-211-0/+3
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add initial Loongson-based boards supportAntony Pavlov2014-01-211-0/+2
| | | | | | | | | | | Loongson (simplified Chinese: 龙芯; pinyin: Lóngxīn; literally: "Dragon Core") is a family of general-purpose MIPS CPUs developed at the Institute of Computing Technology (ICT), Chinese Academy of Sciences (CAS) in the People's Republic of China. See http://en.wikipedia.org/wiki/Loongson for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add asm-offsets.h generationAntony Pavlov2013-12-041-0/+43
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: ar231x: add netgear-wg102Oleksij Rempel2013-05-311-0/+1
| | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add Atheros ar531x family supportOleksij Rempel2013-05-311-0/+2
| | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add initial device tree supportAntony Pavlov2013-05-131-0/+12
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add pre-bootloader (pbl) image supportAntony Pavlov2012-12-141-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is based on ARM pbl support and allows creating a pre-bootloader binary for compressed image. For different MIPS SoCs (or even for different boards based on the same SoC) the operations carried on in start-pbl.S can be very different. The additional constraints can be imposed on the size of the boot code or the special magic labels in the beginning of the boot code; In some cases it could be necessary to show CPU is alive as early as possible (transmit a char via UART or blink a LED). So the demands for pbl start operation can be very different. E.g. malta board store boot code at the NOR flash mapped to the MIPS power-on address (0xbfc00000); it is the most simple case: we need just copy pbl image from direct-mapped flash to RAM and jump there. The XBurst-powered boards store boot code in the beginning of a NAND flash or in the beginning of SD/MMC card. In this case we must use simple and short NAND or SD/MMC access routines to copy pbl image to RAM. To meet so different demands a simple technique is selected: * MIPS pbl entry point located in file arch/mips/boot/start-pbl.S. * MIPS pbl code (see start-pbl.S) assumes that every pbl-enabled board has a arch/mips/boards/<BOARD>/include/board/board_pbl_start.h header file. This file must contain definition of the board_pbl_start macro. This macro is used as start of pbl image; * the most popular asm routines (stack setup, relocation to link address, NS16550 initialization (WIP) and so on) are containt in the arch/mips/include/asm/pbl_macros.h header file. So board pbl macro can use it if necessary. It is possible to create similar headers with macros for each specific SoC; so even if we have many different boards based on the same SoC the board_pbl_start macro for every board can be short and clear. * after board-specific initialization the stack pointer is initialized and pbl C code is started. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: fix out-of-tree buildAntony Pavlov2012-12-031-2/+6
| | | | | | | | | | | | | | | | | | | | The commit commit d25d94bea67308e29db895d418f3f1f8153ae2ea Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Fri Jun 1 13:23:20 2012 +0400 MIPS: make possible board-specific header files This patch makes possible to put a board-specific header file (e. g. foobar.h) to arch/mips/boards/*/include/board/. breaks the out-of-tree build for the boards that use it (rzx50). Reported-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Makefile: generate a barebox-flash-image linkSascha Hauer2012-08-121-2/+0
| | | | | | | | | | | | Depending on the SoC a barebox.bin, barebox.netx, barebox.s5p, MLO image is generated. With pbl support there now is an additional arch/arm/pbl/zbarebox.bin image. To help the user to determine which image should be flashed to his device, generate a barebox-flash-image link. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* MIPS: make possible board-specific header filesAntony Pavlov2012-06-051-0/+2
| | | | | | | | | | | This patch makes possible to put a board-specific header file (e. g. foobar.h) to arch/mips/boards/*/include/board/. Header file usage: #include <board/foobar.h> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: XBurst: add Ritmix RZX-50 board supportAntony Pavlov2012-05-171-0/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add XBurst processor family supportAntony Pavlov2012-05-171-0/+2
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add initial D-Link DIR-320 wireless router supportAntony Pavlov2011-08-051-0/+1
| | | | | | | | | | Can be started from CFE using tftp, e.g.: CFE> ifconfig eth0 -addr=192.168.0.99 CFE> boot -tftp -addr=a0800000 -raw 192.168.0.1:barebox.bin Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add initial BCM47xx-based boards supportAntony Pavlov2011-08-051-0/+2
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add qemu malta board support to bareboxAntony Pavlov2011-08-051-0/+1
| | | | | | | The only supported peripheral is ns16550 serial port. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add Malta machine support to bareboxAntony Pavlov2011-08-051-0/+2
| | | | | | | | | The machine uses only big-endian mode. Only supported peripheral is serial port. The machine supports only MIPS32 CPUs. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: add common MIPS stuffAntony Pavlov2011-08-051-0/+99
Add start.S, CP0 clocksource, Makefile, linker script and memory layout function. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>