summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | ppc: remove unused variables from linker scriptsSascha Hauer2019-10-142-4/+0
| | | | | | | | | | | | | | | | | | __initcall_entries and __exitcall_entries are unused. Remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | barebox.lds: Remove unnecessary bracesSascha Hauer2019-10-146-11/+11
| | | | | | | | | | | | | | | | | | | | | The BAREBOX_CLK_TABLE and BAREBOX_DTB macros are defines that do not take a parameter, so we can remove the braces. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | command: Use array of pointers to commandsSascha Hauer2019-10-142-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to store the commands as a linker array. One problem with this is that on X86_64 for unknown reasons the linker uses a different struct alignment than the compiler, so when we use the linker to compose the array and the compiler to iterate over it we have to play tricks with manually adjusting the alignment. The other problem is that we declare the commands as const (and also put it in .rodata), but in fact we do not treat it as const: we put the commands onto a list which modifies the struct list_head list member of struct command. With this patch we no longer put the command themselves into an array, but instead create an array of pointers to the commands. This inherently solves the second issue as well. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/remoteproc'Sascha Hauer2019-10-1711-2/+775
|\ \ \
| * | | port reduced version of remoteproc framework from linuxOleksij Rempel2019-09-269-0/+772
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I tested it on phytec imx7 board with remoteproc ELF image previously used on Linux. Linux would load this image, create appropriate resource (if defined in image) and boot it. The barebox version is only loading image and boot it. Currently barebox version do not extract resources defined by rproc ELF image. On this early stage it is hard to say, if it is needed. Previously there was an attempt to port bootaux command from u-boot. Porting of remoteproc framework is my attempt to lead this topic in to the (IMO) right direction. To start remoteproc image, firmwareload command should be used: firmwareload /mnt/tftp/rproc-imx-rproc-fw Since firmwareload already support multiple targets, it is possible to specify which exact cortex m4 CPU should be started (if multiple CPU are present). This example shows the list of available firmware targets: barebox@Phytec i.MX7 phyBOARD-Zeta:/ firmwareload -l firmware programming handlers: name: model: soc:imx7d-rp0@0.of Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: base: don't try to read cells_name property if no cells_name setOleksij Rempel2019-09-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some device tree node parsed by of_count_phandle_with_args() have no #*-cells parameter. To make linux device trees work with barebox, we should accept cells_name set to NULL, so sync this behavior with linux. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | elf: add missing elf32_shdrOleksij Rempel2019-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | needed for remoteproc port Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/of-overlay'Sascha Hauer2019-10-1714-0/+906
|\ \ \ \
| * | | | dtc: optionally add add __symbols__ to build-in devicetreeMichael Tretter2019-09-162-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The devicetree overlay driver requires the __symbols__ node to resolve phandles to the base devicetree. If Barebox has to apply the overlay to the live devicetree, the build-in devicetree must be built with the __symbols__ node. It is configurable, because adding __symbols__ significantly increases the size of the devicetree binary. When configuring Barebox, a developer should be able to enable or disable devicetree overlay support and as this only affects the build-in devicetree, which is linked to the image anyway, use a Kconfig item for configuring the __symbols__. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | commands: add of_overlay command for device tree overlaysMichael Tretter2019-09-163-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new command "of_overlay" for applying device tree overlays, because it does not really fit into any other device tree related command and would create a mess with the command options. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | blspec: load firmware if specified in dt overlayMichael Tretter2019-09-161-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a device tree overlay referenced by the blspec depends on firmware, try to load the firmware from the default Linux firmware search path /lib/firmware in the about to be started rootfs. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | firmware: add support to load firmware from dt overlayMichael Tretter2019-09-163-1/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fpga-region device tree nodes have the firmware-name property that contains the file name of firmware in the firmware search path (but not the path) that shall be loaded before the overlay is applied. Add the of_firmware_load_overlay() function that accepts an overlay and a firmware search path, finds the responsible firmware_mgr and loads the firmware. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | firmware: add function to find firmware by devicetree nodeMichael Tretter2019-09-162-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows to get the firmware manager using a phandle from the devicetree. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | of: add iterator for overlaysMichael Tretter2019-09-162-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device tree overlays (the dto files) may contain multiple fragments for different target nodes. Each fragment contains a __overlay__ node that is applied to target node specified in the fragment. Add a helper to call a function for each fragment in a device tree overlay to avoid having device tree overlay internal information in other modules. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | blspec: add support for devicetree overlaysMichael Tretter2019-09-162-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Read the devicetree-overlay property from the blspec entry and register the overlays when booting the blspec entry. Do not fail the boot if an overlay cannot be loaded, because if Linux fails to boot without an overlay, the base device tree is broken. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | of: add support for devicetree overlaysMichael Tretter2019-09-165-0/+525
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The devicetree overlay support is based on the Linux driver for device tree overlays, but many features that are not required in Barebox are left out. Unlike Linux, which applies the overlay to the live devicetree, Barebox registers a fixup for the overlay which is applied with other fixups to whatever tree is fixed. This is necessary to apply the overlay to devicetrees that are passed to Linux, which might differ from the devicetree that is currently live in Barebox. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/of'Sascha Hauer2019-10-175-12/+258
|\ \ \ \
| * | | | add of_diff commandSascha Hauer2019-09-123-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The of_diff command compares two device trees against each other and prints a diff-like result. This can be handy to find out the differences between the barebox live tree and the one we start the kernel with. Another usecase would be to examine the changes our of_fixup process introduces (of_diff - +) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | of: add of_diff()Sascha Hauer2019-09-122-10/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_diff compares two device trees against each other and prints a diff-like result. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | of: Fix memory hole in of_find_node_by_reproducible_name()Sascha Hauer2019-09-121-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_get_reproducible_name() returns an allocated string, so we must free it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/mxs'Sascha Hauer2019-10-1724-342/+138
|\ \ \ \ \
| * | | | | ARM: add common i.MX23 defconfig fileSascha Hauer2019-10-023-97/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge the defconfigs for the i.MX23 boards into a common imx23_defconfig. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: add common i.MX28 defconfig fileSascha Hauer2019-10-024-221/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge the defconfigs for the i.MX28 boards into a common imx28_defconfig. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: mxs: Allow to compile all boards for a SoC togetherSascha Hauer2019-10-021-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All boards in mach-mxs support multi image, so we no longer have to make the board type a choice. Let the user compile all boards for a SoC together. We cannot compile i.MX23 together with i.MX28 though, there are still many conflicting defines which use the IMX_ namespace which are really SoC specific. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: mxs: Move HAVE_PBL_MULTI_IMAGES up to ARCHSascha Hauer2019-10-022-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that all boards in mach-mxs select HAVE_PBL_MULTI_IMAGES we can move it up to ARCH_MXS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: mxs: chumby: Switch to multi image supportSascha Hauer2019-10-023-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build the Chumby as multi image. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: mxs: imx23-evk: Switch to multi image supportSascha Hauer2019-10-023-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build the i.MX23 EVK as multi image. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: mxs: cfa10036: Switch to multi image supportSascha Hauer2019-10-023-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build the cfa10036 as multi image. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: Freescale i.MX23 evk: Check machine type in initcallsSascha Hauer2019-10-022-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for the right machine type in initcalls before executing them to make the board multi image safe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX23 Chumby: Check machine type in initcallsSascha Hauer2019-10-022-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for the right machine type in initcalls before executing them to make the board multi image safe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: Crytalfonts cfa10036: Check machine type in initcallsSascha Hauer2019-10-022-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for the right machine type in initcalls before executing them to make the board multi image safe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX23 olinuxino: Check machine type in initcallsSascha Hauer2019-10-022-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for the right machine type in initcalls before executing them to make the board multi image safe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: Freescale mx28evk: Check machine type in initcallsSascha Hauer2019-10-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for the right machine type in initcalls before executing them to make the board multi image safe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: duckbill: Check machine type in initcallsSascha Hauer2019-10-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for the right machine type in initcalls before executing them to make the board multi image safe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: tx28: Make locally used function staticSascha Hauer2019-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: tx28: Pass and check machine typeSascha Hauer2019-10-023-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass MACH_TYPE_TX28 to barebox_arm_entry() and check for it in initcalls to make the board multi image safe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: start: Allow to pass machine type as boarddataSascha Hauer2019-10-021-1/+13
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to pass a machine type number as directly as boarddata. This makes it easy for non device tree boards to pass a machine type and to identify themselves during runtime. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/mmc'Sascha Hauer2019-10-177-9/+252
|\ \ \ \ \
| * | | | | mci: implement command to switch a mmc device to enhanced modeUwe Kleine-König2019-09-124-0/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command structure allows adding more subcommands and is designed to match the Linux program mmc from the mmc-utils. So later more commands can easily be added if need be. Compared to mmc-utils' mmc enh_area set <-y|-n|-c> <start KiB> <length KiB> <device> the command that is implemented here ( mmc enh_area [-c] <device> ) is easier to use (because you don't have to check the maximal allowed size by reading some registers and calculate the available size from them (which then must be calculated back to register values by the mmc command)) but less flexible as it doesn't allow all the crazy possibilities specified in the eMMC standard (yet?) but just creates an enhanced area with maximal size. In the future something like mmc enh_area -s 30k <device> could be used to not use the maximal but an explicit size. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mci: provide wrapper for mci_get_device_by_name ∘ devpath_to_nameUwe Kleine-König2019-09-122-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also convert the only user of mci_get_device_by_name to this new wrapper. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mci: imx-esdhc: fix error handling during probeMarco Felsch2019-09-121-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the the driver don't handle any error and return immediately. Handling the errors correctly is a must to support defered probing. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mci: core: make mci_register -EPROBE_DEFER sensitiveMarco Felsch2019-09-121-0/+4
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the current regulator can't be requested because of -EPROBE_DEFER we shouldn't print a error and ignore it. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/misc'Sascha Hauer2019-10-1755-518/+1664
|\ \ \ \ \
| * | | | | Documentation: boards: stm32mp: document environment partitionAhmad Fatoum2019-10-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have barebox get its environment out of a "barebox-environment" partition. The BootROM and first stage bootloader both select partitions on name not UUID, so we're following suit. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: stm32mp: dk2: rename function according to init levelAhmad Fatoum2019-10-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dk2_postcore_init is not at postcore init level like the name would suggest, but at mem init level. Rename it accordingly. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: dts: stm32mp: add barebox-enviroment on DK boardsOleksij Rempel2019-10-151-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | fs: devfs-core: have device_find_partition search symlinksAhmad Fatoum2019-10-151-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The barebox,environment binding documentation notes following for the device-path property's second string: > <partname> can be the label for MTD partitions, the number for DOS > partitions (beginning with 0) or the name for GPT partitions. This doesn't work currently because the named partitions are realized as symlinks and those aren't searched by device_find_partition. Fix this by having symlinks feature an appropriate partname if the cdev they link at has one and then have device_find_partition search those as well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | Merge branch 'imx_gpt_file_header_fix' of ↵Sascha Hauer2019-10-141-1/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | https://github.com/KLSMartin/barebox into for-next/misc
| | * | | | | common/partitions/efi: fix gpt detectionLeif Middelschulte2019-10-141-1/+1
| | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some boards (such as i.MX) the buffer might contain both: A barebox image *and* a GPT partition table. Thus, irrelevant filetypes should be ignored.
| * | | | | mfd: superio: add base SMSC MFD driverAhmad Fatoum2019-10-143-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SMSC FDC37C93xAPM is the Super I/O chip on the Dell Latitude 7490. This adds device detection for it and its siblings, so device drivers can be written against it or init scripts can use its regmap interface. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>