summaryrefslogtreecommitdiffstats
path: root/arch/mips
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/mvebu'Sascha Hauer2017-01-111-0/+1
|\
| * MIPS: qemu-malta_defconfig: set MAX_IMAGE_SIZE = 4 MiBAntony Pavlov2017-01-101-0/+1
| | | | | | | | | | | | | | | | If barebox binary image size exceeds the 4 MiB then qemu exits with the 'Could not load MIPS bios' message. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | MIPS: drop redundant debug_ll_outhexw macro definesAntony Pavlov2017-01-103-64/+31
|/ | | | | | | | | | | | The debug_ll_outhexw macro has no dependency on UART model so we can remove it from UART-dependent header files (debug_ll_ns16550.h and mach-ath79/.../debug_ll.h). On the other hand the only debug_ll_outhexw user is MIPS nmon monitor so we can move the debug_ll_outhexw macro to pbl_nmon.h. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mips'Sascha Hauer2016-11-141-1/+0
|\
| * MIPS: drop redundant start_barebox() declarationAntony Pavlov2016-11-081-1/+0
| | | | | | | | | | | | | | The start_barebox() function is defined in the <common.h> header file. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | arch: refresh defconfigsSascha Hauer2016-10-126-36/+35
|/ | | | | | | | | | | | | | | | | | | | | | The defconfig files are long untouched and a make xy_defconfig; make savedefconfig usually generates quite a different looking file. Refresh them to make it easier to generate patches against the configs using make xy_defconfig; make menuconfig; make savedefconfig This has been done with the following script. for a in arch/*; do arch=$(basename $a) for c in $a/configs/*; do config=$(basename $c) export ARCH=$arch make $config && make savedefconfig && mv defconfig $c done done Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mips'Sascha Hauer2016-09-131-67/+1
|\
| * MIPS: dts: reuse TP-LINK MR3020 dts file from linuxAntony Pavlov2016-08-181-67/+1
| | | | | | | | | | | | | | | | | | | | At the moment barebox tplink-mr3020.dts file has almost the same content as linux ar9331_tl_mr3020.dts file so we can reuse linux dts-file and drop duplicated lines from barebox dts-file. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | of_unflatten_dtb(): Check return value with IS_ERRAndrey Smirnov2016-09-051-1/+1
|/ | | | | | | | Of_unflatten_dtb returns a ERR_PTR value so checking it against NULL is incorrect. Fix it in all of the places where this was happening. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* include: Move bulk of boot.h to bootm.hSascha Hauer2016-07-261-0/+1
| | | | | | | | The majority of the stuff currently in include/boot.h is about bootm code implemented common/bootm.c. To be more consistent move it to a new file include/bootm.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: csrc-r4k: get cp0 counter rate from devicetreeAntony Pavlov2016-07-071-2/+22
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: tplink-mr3020: pbl: init WMACYegor Yefremov2016-06-281-0/+2
| | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: black-swift: pbl: init WMACYegor Yefremov2016-06-281-0/+2
| | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: ath79: pbl: add pbl_ar9331_wmac_enable macroYegor Yefremov2016-06-282-0/+77
| | | | | | | | | | AR9331's WMAC module requires triple WMAC reset as also working RTC subsystem. The code is taken as is from upstream U-Boot repository. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mips'Sascha Hauer2016-06-143-62/+30
|\
| * MIPS: ath79: dts: use ar9331.dtsi from linux v4.7-rc2Antony Pavlov2016-06-143-61/+2
| | | | | | | | | | | | | | | | Nowadays we have AR9331 devicetree from linux v4.7-rc2 in the file dts/src/mips/qca/ar9331.dtsi. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: ath79: dts: tplink-mr3020.dts: sync with linux v4.7-rc2Antony Pavlov2016-06-142-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also sync black-swift.dts with tplink-mr3020.dts. And also see this linux kernel commit: commit 2c3694d2e6ead3964aafb31e4e529de219ced92b Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:19 2016 +0300 MIPS: ath79: add initial support for TP-LINK MR3020 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: ath79: dts: sync spi stuff with linux v4.7-rc2Antony Pavlov2016-06-141-2/+7
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: ath79: dts: sync uart stuff with linux v4.7-rc2Antony Pavlov2016-06-143-3/+3
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: ath79: dts: sync clk stuff with linux v4.7-rc2Antony Pavlov2016-06-143-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Please see these linux kernel ath79 commits: commit 1e6a3492e7bb12aa8ee26050ff6829c39ebaa152 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:17 2016 +0300 MIPS: dts: qca: introduce AR9331 devicetree commit 5ae5c452e3361612cd8182eb8bdfecf0ebf42288 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:18 2016 +0300 MIPS: ath79: update devicetree clock support for AR9331 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/bootm'Sascha Hauer2016-06-145-13/+13
|\ \
| * | bootm: Move bootm options to common/KconfigSascha Hauer2016-05-105-13/+13
| |/ | | | | | | | | | | | | | | | | | | | | | | bootm has a C API, so the bootm options have to depend on the option providing the bootm code (CONFIG_BOOTM), not on the option providing the command (CONFIG_CMD_BOOTM). Fixing the dependencies makes it possible to fully use bootm from C without enabling the bootm command support. This also removes the CMD_ prefix from the options which means we have to update the defconfigs aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / MIPS: dts: add generated files to clean ruleAntony Pavlov2016-06-131-1/+1
|/ | | | | | | | | | | | | | | | | | | This commit is based on Sascha's ARM commits: commit a9e7e68279de3aec38b038211a15a80cfc612c4e Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Fri Dec 11 08:02:02 2015 +0100 ARM: dts: Add *.dtb.lzo to clean files commit f5b552f1fe02a0a39ae859dbc7e7facefe022e3a Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Fri May 9 09:11:49 2014 +0200 ARM: dts: Add generated files to clean rule Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* include: Move ns16550 serial platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mips'Sascha Hauer2016-03-1119-12/+510
|\
| * MIPS: tplink-mr3020: fix "WPS" and "3G" LEDsAntony Pavlov2016-03-101-0/+6
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: black-swift_defconfig: enable gpio-related stuffAntony Pavlov2016-03-101-0/+6
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: black-swift: enable GPIO keyAntony Pavlov2016-03-101-0/+11
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: black-swift: enable GPIO LEDAntony Pavlov2016-03-092-0/+21
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: ath79: pbl: add pbl_ar9331_mdio_gpio_enable macroAntony Pavlov2016-03-091-0/+8
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: black-swift_defconfig: use cached memory regionAntony Pavlov2016-03-091-0/+2
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: tplink-mr3020_defconfig: use cached memory regionAntony Pavlov2016-03-091-0/+2
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: dtb: register only one memory bankPeter Mamonov2016-03-091-5/+7
| | | | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: implement dma_sync_* functionsPeter Mamonov2016-03-094-1/+69
| | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: flush cache on shutdownAntony Pavlov2016-03-094-0/+43
| | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: add initial R4000-style cache supportAntony Pavlov2016-03-093-0/+57
| | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: tplink-mr3020: pbl: init cacheAntony Pavlov2016-03-091-0/+6
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: black-swift: pbl: init cacheAntony Pavlov2016-03-091-0/+6
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: pbl: import cache init code from U-Boot v2016.01-212-ga3ab2aeAntony Pavlov2016-03-093-0/+170
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: probe_scache(): use MIPS_CONF_M linux kernel macroAntony Pavlov2016-03-091-3/+2
| | | | | | | | | | | | | | | | | | We already have MIPS_CONF_M macro in <asm/mipsregs.h> so we have no need in homebrew CONFIG_M macro. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: black-swift: pbl: use more lowlevel init code from U-Boot_modAntony Pavlov2016-02-261-1/+3
| | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: tplink-mr3020: pbl: use more lowlevel init code from U-Boot_modAntony Pavlov2016-02-261-1/+3
| | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: ath79: pbl: import hornet_1_1_war routine from U-Boot_modAntony Pavlov2016-02-261-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot_mod is a popular bootloader for Atheros AR93xx chips, please see https://github.com/pepe2k/u-boot_mod for details. It's reasonable to import some lowlevel AR9331 initialization code from U-Boot_mod. AR9331 (Hornet) 1.1 currently needs an additional reset at 1st boot. This patch imports necessary code from u-boot_mod/u-boot/cpu/mips/start_bootstrap.S. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: ath79: pbl: import AR9331 CP0 init routine from U-Boot_modAntony Pavlov2016-02-261-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot_mod is a popular bootloader for Atheros AR93xx chips, please see https://github.com/pepe2k/u-boot_mod for details. It's reasonable to import some lowlevel AR9331 initialization code from U-Boot_mod. This patch imports AR9331 MIPS24K coprocessor0 initialization code from u-boot_mod/u-boot/cpu/mips/start_bootstrap.S. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * MIPS: dts: ar9331.dtsi: fix whitespaceAntony Pavlov2016-02-251-1/+1
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | driver: replace dev_request_mem_region with dev_request_mem_resourceSascha Hauer2016-03-071-3/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_request_mem_region doesn't work properly one some SoCs on which PTR_ERR() values clash with valid return values from dev_request_mem_region. Replace them with dev_request_mem_resource where possible. This patch has been generated with the following semantic patch: // <smpl> @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { ... - return PTR_ERR(io); -} + return PTR_ERR(iores); +} +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) - return PTR_ERR(io); -} + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { - ret = PTR_ERR(io); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { + ret = PTR_ERR(iores); ... } +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ identifier func; @@ func(...) { <+... struct resource *iores; -struct resource *iores; ...+> } // </smpl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Push dryrun to handlersSascha Hauer2016-01-261-0/+6
| | | | | | | We can make the dryrun option more useful by calling into the handlers. With this we can detect more cases that can go wrong during boot. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: import optimized string functions from LinuxAleksey Kuleshov2015-11-265-1/+441
| | | | | | | | | 10x performance gain according to simple test on QEMU malta: barebox:/ time memcpy 0xa0000000 0xa0001000 0x100000 Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru> Acked-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: tplink-mr3020: skip pbl lowlevel init if running from RAMAntony Pavlov2015-11-131-0/+3
| | | | | | | | | | TP-Link MR3020 has 4 MiB flash boot ROM. Usually boot ROM is mapped to 0xbfc00000. However, as AR9331 allows to remap boot ROM to 0xbf000000 it's better to assume that boot ROM starts at 0xbf000000. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: black-swift: skip pbl lowlevel init if running from RAMAntony Pavlov2015-11-131-0/+3
| | | | | | | | | Black Swift has 16 MiB flash boot ROM. The standard board's bootloader (U-Boot_mod) remaps boot ROM to 0xbf000000. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Tested-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>