summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/socfpga'Sascha Hauer2016-01-112-5/+7
|\
| * socfpga: Allow setting partition xloader boots from for mmcTrent Piepho2015-12-142-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The xloader boots the 2nd stage barebox from socfpga_barebox_part when using NOR. But when using MMC it boots from a hardcoded "disk0.1". Add the mmc device name to the partition description and use it for mmc booting. Add an extern declaration of socfpga_barebox_part to the socfpga header so that a board can change it to use a different partition. Initialize socfpga_barebox_part to the default value instead of NULL to avoid the NULL check later. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pstore'Sascha Hauer2016-01-115-66/+119
|\ \
| * | arm: Add RAMOOPS memory areaMarkus Pargmann2015-12-102-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RAMOOPS is a driver that uses a reserved static memory region to store the data from the last panic or boot. This helps to debug crashes at the next boot while preserving the boot messages. To guarantee a memory area that is not altered by barebox or the kernel, this area is located at the end of the RAM right after barebox and before the STACK. This ensures that changing barebox sizes do not interfere with RAMOOPS. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: start: Add visible sdram region for barebox board dataMarkus Pargmann2015-12-101-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | This helps to understand and find problems with the memory layout of barebox. It adds another entry for the board data that barebox allocated. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: Clarify memory layout calculationMarkus Pargmann2015-12-104-65/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The memory calculations used are all hardcoded into three different files, start-pbl.c, uncompress.c and start.c. To make this more readable and reliable, this patch gathers these information in barebox-arm.h with static inline functions for the calculation of the memory offsets. This patch also adds proper handling of different barebox/board data sizes. Currently only 1MB+Alignment of RAM is reserved for Barebox and board data. This could be too small for bigger devicetrees and barebox. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: boards: karo-tx6x remove definition of DIV_ROUND_UPMarkus Pargmann2015-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | DIV_ROUND_UP is defined in include/linux/kernel.h. Use that instead. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2016-01-116-42/+12
|\ \ \
| * | | OF: Fix fixups to fix Linux DT instead of Barebox DTTrent Piepho2016-01-082-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OF fixups cm_cogent_fixup() and hb_fixup() are supposed to modify the Linux device tree. And they did originally, but commit e520a8cc463760d21890b35218e4dac817e7c7e7 changed them to use for_each_compatible_node(), which iterates through the Barebox DT. Use new for_each_compatible_node_from() to specify the Linux DT root as the start point. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | socfpga: Find partition with environment via device treeTrent Piepho2016-01-083-38/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | socfpga would load the environment from a file named "barebox.env" located on the device "/dev/mmc0.1". Both those names are hard-coded in the socfpga code and can't be changed. Barebox supports selecting the location of the environment using a "barebox,environment" node in device tree's "chosen" node. And recently supports specifying that the env should come from a file on this device. Change socfpga to use this mechanism by adding the appropriate device node. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | cdev: When creating a new cdev, initialize device_nodeTrent Piepho2016-01-081-1/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a new cdev doesn't have a device_node defined when passed to devfs_create(), set it to the device_node of the parent device, if one exists. For non-partitions, like ocotp or eeprom devices, this is the correct thing to do. Partitions need to use, and do use, a different node. The code from commit 274e0b8dc48956babeaa2faf70bf8066e656b621 to set device_node in ocotp can be removed. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2016-01-111-4/+4
|\ \ \
| * | | ARM: i.MX6Q: Embedsky E9: Convert environment paths in DTS to a new bindingsAndrey Panov2015-12-111-4/+4
| |/ / | | | | | | | | | | | | Signed-off-by: Andrey Panov <rockford@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/gcc5'Sascha Hauer2016-01-112-2/+2
|\ \ \
| * | | ARM: Omap3: Remove useless inlineSascha Hauer2015-12-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silences gcc5 warning: In file included from arch/arm/mach-omap/gpmc.c:31:0: arch/arm/mach-omap/include/mach/sys_info.h:93:83: warning: inline function 'get_sysboot_value' declared but never defined Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/dts'Sascha Hauer2016-01-111-0/+1
|\ \ \ \
| * | | | dts: update to v4.3-rc1Sascha Hauer2015-12-101-0/+1
| | |_|/ | |/| | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | ARM: Fix exception table setup in MMU-less modeAndrey Smirnov2016-01-112-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add code necessary for correct initialization of exception vector table when MMU is disabled. Note: Only ARMv7 support is implemented Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | ARM: mmu: Add VBAR setupAndrey Smirnov2016-01-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add code to make sure that normal vector exception table, when it is used due to unavailability of the high vector table, was not re-mapped from 0x0 via VBAR by someone else before us. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | ARM: asm: Add convenience fucntions to access VBARAndrey Smirnov2016-01-111-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two functions to get/set VBAR register. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | arm: bcm283x: add rpi2 supportAlexander Aring2016-01-0711-290/+453
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds Raspberry Pi 2 support in barebox. The features should be the same like the current RPi status in barebox. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | rpi: sync revision detection with u-bootAlexander Aring2016-01-041-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds parts from u-boot code for doing RPi revision detection and take care about the "warranty bit". I got this bit on my RPi2. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | bcm283x: mbox: align to cachesizeAlexander Aring2016-01-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch change the align of mbox stack resource to 32. The reason is that I had some experience with bcm2836 and the mbox implementation, after setting the align to 64(on bcm2836) the issues was gone. I found these values inside the u-boot implementation, they use 32 (bcm2835) and 64 (bcm2836). Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | bcm2835: introduce mach-bcm283xAlexander Aring2016-01-0412-43/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the most part of mach-bcm2835 to mach-bcm283x. This prepares to add RPi2 support which is a bcm2836. This patch changes the Kconfig entry namens to BCM283X for drivers only. These drivers should working the same in bcm2836. While updating defconfig I added LED support/trigger option. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | arm: bcm2835: fix indentationAlexander Aring2016-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fix indentation in core.h of mach-bcm2835. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | bootstrap: Boot barebox with kernel calling conventionTrent Piepho2015-12-141-4/+4
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 8e3ddc13eb8239177ed20f119e3a3d02518b941d the bootm code was changed to boot barebox using the same calling convention as the kernel. Which on ARM is to pass three arguments which are zero, an architecture code, and a params pointer. A 2nd stage barebox can be booted using lib/bootstrap, which is different code from bootm. This code just leaves garbage in the first three parameters and so doesn't follow the convention. Change it to be compatible with the ARM kernel booting convention. This just sends a zero for the architecture, since the code for architectures depends on boot[zmu] and something using bootstrap wouldn't have those too. And it just passes NULL for the params since we don't have a way to pass a device tree from the preloader. All users of bootstrap are ARM based, but the code is in lib so a non-ARM board might someday make use of it. If the current code would work for them, then the change here will be ok too. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | ARM: dts: Add *.dtb.lzo to clean filesSascha Hauer2015-12-111-1/+1
| |/ |/| | | | | | | | | *.dtb.lzo are generated during compilatiion, delete them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: ccxmx53: properly guard initcall for multiimageLucas Stach2015-12-101-0/+3
|/ | | | | | | | Make sure to not run this board specific initcall on any other board. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/socfpga'Sascha Hauer2015-12-081-3/+31
|\
| * socfpga: Initialize emac physels to RGMII correctlyTrent Piepho2015-11-111-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A comment in the socfpga init said that it was "Clearing emac0 PHY interface select to 0", but this was doubly incorrect. It was setting physel for emac1, not emac0, and it was setting physel to 1 (RGMII) not 0 (GMII). All supported socfpga boards use RGMII, and use emac1, so fix the comment to reflect the code. But then extend the code to set the physel for both emac0 and emac1, so it can work on boards that use either or both emacs (which are called gmac0/1 in the dts). The Cyclone V datasheet, page 17-60 "EMAC HPS Interface Initialization", says to set physel while the EMAC is in reset. So place the EMAC in reset while changing physel. The emacs are not in reset as code earlier in the boot has already taken most of the modules out of reset. So put them back in reset while the physel is changed. The Linux kernel does it this way too. If barebox has no network support, there is not much point in configuring the emac physel lines. This would be the case for the xloader pre-bootloader config, which configures physel, doesn't use the network, loads the main barebox, which then reconfigures physel again. Make this code depend on CONFIG_NET so it's just done in the main barebox. The Linux kernel does not need barebox to do this initialization to use networking. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/omap'Sascha Hauer2015-12-081-14/+7
|\ \
| * | ARM: omap: Use correct device to mount on /bootSascha Hauer2015-11-101-14/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code tests if a partition (i.e. disk0.0) exists and instead of mounting boot from this partition it uses the whole device (disk0). This only works because the the FAT code accepts a MBR as input and automatically skips it. Let the code use the partition to mount /boot instead as it was intended. We don't have to stat() the partition device, since this error will be caught by mount() anyway, so remove the unnecessary stat(). Reported-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2015-12-085-6/+25
|\ \
| * | arm: pxa: Remove pxa_get_nandclk()Sebastian Hesselbarth2015-11-232-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With a common clock provided for NAND controller, get rid of the mach/clock.h way of getting the NAND clock. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: pxa: Add clock for Zylonite NFCSebastian Hesselbarth2015-11-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a clock with clk_add_physbase for the NAND flash controller on Zylonite board. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: pxa: Prepare for NAND clkdev lookup on PXA3xxSebastian Hesselbarth2015-11-233-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To allow PXA3xx nand driver to be reused on Marvell Armada 370/XP, prepare to provide a common clock for the NAND driver on PXA3xx. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mmc'Sascha Hauer2015-12-081-0/+2
|\ \ \
| * | | mci: dw_mmc: socfpga: Supply bus-width in platform_dataTrent Piepho2015-11-191-0/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there is no OF support in the xloader on socfpga it uses the platform_data system. There needs to be a way to supply the equivalent of the DT property bus-width this way to support devices that need to use a smaller bus. So that we don't need to put every flag that might get added to the MMC_CAP list into platform_data, just put the bus width ones into platform_data. The socfpga dts sources specify a bus-width of 4 so use that in the platform_data for socfpga. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mips'Sascha Hauer2015-12-0812-13/+609
|\ \ \
| * | | 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>
| * | | MIPS: pbl: add pbl_blt macroOleksij Rempel2015-11-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Barebox' PBL is able to initialize SoC's memory controller, but it can be used only if PBL runs from ROM or on-chip SRAM. MIPS architecture standard boot vector is 0xbfc00000 so on most MIPS SoCs all addresses higher than 0xbfc00000 belong to boot ROM or on-chip SRAM. Thus there's a simple criterion to check if PBL runs from ROM: just check if current PC is higher than 0xbfc00000. Some MIPS boards have ROM start address lower than 0xbfc00000 so it's reasonable to make ROM start address checking board-dependant. The pbl_blt macro checks if current pc is lower than the first argument (ROM start address). If so then next instruction executed is defined by the second argument of the macro. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Tested-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | MIPS: allow user to pass incorrect address to md commandAntony Pavlov2015-11-113-7/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes it possible to handle exception on incorrect data access so 'md' command just show 'xxxxxxxx' instead of crashing the system. barebox:/ md -l 0xa0000003+4 a0000003: xxxxxxxx .... Without this commit we will get this barebox:/ md -l 0xa0000003+4 a0000003: Ooops, address error on load or ifetch! ... ### ERROR ### Please RESET the board ### Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | MIPS: import exception registers restoring macros from linux kernelAntony Pavlov2015-11-111-0/+87
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | MIPS: avoid excessive exceptionAntony Pavlov2015-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit clears ERL (ERror Level) flag on start. If this flag is set then we get 'TLB miss on load or ifetch' just after return from exception. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | MIPS: traps.c: separate registers print stuff to show_regs()Antony Pavlov2015-11-111-7/+12
| | |/ | |/| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2015-12-0884-331/+1847
|\ \ \
| * | | imx: ocotp: Add code to initialize 'cdev->device_node'Andrey Smirnov2015-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for cdev_by_device_node() to be able to return approprate character device for <&ocotp> phandle cdev->device_node needs to be initialized with dev->device_node. This patche takes care of that Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | eukrea-cpuimx35: update defconfigFlorian Vallee2015-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | enable chipidea usb driver Signed-off-by: Florian Vallee <fvallee@eukrea.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>