summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2018.02.0v2018.02.0Sascha Hauer2018-02-061-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: mtd: partition: Use reproducible node names for fixupSascha Hauer2018-02-061-1/+4
| | | | | | | | | | The full names of device nodes are not as stable as we like them to be. Lately the leading zeroes in the i.MX6 device trees were removed which led to the result that we can no longer find the partition nodes in the to be fixed tree. Use reproducible names to overcome this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Add function to find the same node in another treeSascha Hauer2018-02-062-1/+67
| | | | | | | | | | | | For our device tree fixups we have to find a node corresponding to another node in another device tree. We used to use the full name to match the nodes, but this falls apart when nodes get renamed or for example a new bus hierarchy is introduced. To make this more robust we create reproducible names from device nodes which mostly depend on the address in MMIO space, the reg property and as a last resort the name of the device node. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: ar8327: fix ar8327n_reg_readOleksij Rempel2018-02-051-1/+1
| | | | | | | Actual read value was lost and only by accident worked properly. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: add missing stub for reset_control_getLucas Stach2018-02-051-0/+7
| | | | | | Fixes: 45b95b50cd0b (reset: add reset controller framework) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: designware: add missing headersLucas Stach2018-02-052-2/+2
| | | | | | | | | As the eth_device and mii_bus structs are allocated inside the dw_eth_dev struct a forward declaration isn't enough. Fixes: c1f902841ce3 (net: designware: move probe to generic driver) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: base: fix segfault in of_get_machine_compatible()Aleksander Morgado2018-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | This is running the barebox sandbox: Thread 1 "barebox" received signal SIGSEGV, Segmentation fault. 0x0000555555579e2b in _strchr (s=s@entry=0x0, c=c@entry=44) at lib/string.c:251 251 for(; *s != (char) c; ++s) (gdb) bt #0 0x0000555555579e2b in _strchr (s=s@entry=0x0, c=c@entry=44) at lib/string.c:251 #1 0x000055555556fd91 in of_get_machine_compatible () at drivers/of/base.c:2380 #2 0x000055555556fda8 in of_init_hostname () at drivers/of/base.c:2389 #3 0x000055555555f9e6 in start_barebox () at common/startup.c:106 #4 0x00005555555a291a in main () (gdb) fr 1 #1 0x000055555556fd91 in of_get_machine_compatible () at drivers/of/base.c:2380 2380 p = strchr(name, ','); Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/Kconfig: fix copy'n'paste error in CMD_GPIO helpUlrich Ölmann2018-01-251-1/+1
| | | | | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/socfpga'Sascha Hauer2018-01-227-29/+76
|\
| * reset: reset-socfpga: sync driver with linuxSteffen Trumtrar2018-01-111-10/+10
| | | | | | | | | | | | | | Sync the SoCFPGA reset driver with Linux v4.14-rc1. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: socfpga: move environment from dtsi to board dtsSteffen Trumtrar2018-01-115-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | Currently all upstream boards use the same barebox-environment setup. It is however problematic to add new boards, that have a different setup. Instead of having to /delete-node/ the file-path property in those boards, move the environment to the specific board files. This also has the charme of - maybe one day - getting rid of a barebox-version of socfpga.dtsi :-) Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: socfpga: get rid of clock-frequency assignmentsSteffen Trumtrar2018-01-111-11/+0
| | | | | | | | | | | | | | | | | | The clock framework used to need the clock-frequency property, even if 0, to work correctly. This is no longer necessary. So, get rid of the assignments. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * i2c: designware: evaluate i2c-sda-hold-time propertySteffen Trumtrar2018-01-111-0/+40
| | | | | | | | | | | | | | | | | | | | Newer designware i2c controllers allow setting the SDA hold time. Evaluate the devicetree property "i2c-sda-hold-time" and set the value accordingly. The code is an adaption of the Linux v4.12 driver. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net-designware'Sascha Hauer2018-01-228-91/+310
|\ \
| * | net: designware: add warning for drvdataSteffen Trumtrar2018-01-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of silently using a wrong value, check if drvdata is defined before use. Print a warning if there is no drvdata found. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: SoCFPGA: remove emac init codeSteffen Trumtrar2018-01-111-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | There is a proper driver now that handles the PHY setup for SoCFPGA. Get rid of the code from mach-socfpga. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: add SoCFPGA-specific designware driverSteffen Trumtrar2018-01-114-0/+195
| | | | | | | | | | | | | | | | | | | | | Add a driver for the SoCFPGA-specific version of the designware ethernet ip core. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: designware: move probe to generic driverSteffen Trumtrar2018-01-115-55/+110
| |/ | | | | | | | | | | | | | | | | The designware ethernet core is used on multiple different SoCs. The linux kernel has a generic driver and SoC-specific drivers. Do the same here. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2018-01-2228-155/+387
|\ \
| * | mci: drop unused parameter from mci_switch()Uwe Kleine-König2018-01-223-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SWITCH command has two purposes: a) switch the command set b) Write to the EXT_CSD register If the access field (bits [25:24]) in the argument are b00, we're in case a), otherwise in b). As mci_switch() always passes MMC_SWITCH_MODE_WRITE_BYTE (0b3) in the access field, only case b) is relevant here. According to the eMMC specification[1] the command set field is ignored in case b) and so the respective parameter (that is unused already now) can be dropped. [1] Embedded Multi-Media Card (e•MMC) Electrical Standard (5.1), February 2015; paragraph 6.6.1 Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | partitions: dos: Treat all extended partition types equallyAndrey Smirnov2018-01-221-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating logical DOS partitions with fdisk (Fedora 27, fdisk from util-linux 2.30.2) results in extended partition of type 0x05 being created on the device. Partitioned like this, device is succesfully recognized by Linux, but, due to algorithm in dos_partition(), not Barebox. Looking closer at the actual contents of MBR shows that while marked as "Extended partition with CHS addressing" that partition still have all of the LBA adressed fields filled correctly. Given the above and the fact that similar code in Linux kernel (block/partitions/msdos.c) does not make a distinction between types 0x0f and 0x05, port Linux's is_extended_partition() and convert the code to treat types 0x05, 0x0f and 0x85 the same way. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | FIT: export fit_open_configuration() and fit_open_image()Sascha Hauer2018-01-183-23/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently only fit_open() is exported which only opens the predefined images "kernel", "dtb" and "ramdisk". To make the FIT code more usable for other code which may want to open other images export fit_open_configuration() and fit_open_image(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | parseopt: introduce parseopt_u16() and parseopt_str()Antony Pavlov2018-01-172-0/+66
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | include/parseopt.h: add guard macroAntony Pavlov2018-01-171-0/+5
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | move parseopt to lib/Antony Pavlov2018-01-176-5/+4
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: base: use root_node compatible as suggestion for a hostnameOleksij Rempel2018-01-174-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on some SoCs we can use generic PLL and RAM initialization. In this cases we create board file only to provide a host name. With this patch host name will be created from device tree compatible. For example: compatible = "board_vendor,board", "chip_vendor,soc" the host name will be: "board" This function will not overwrite a host name which is already set by board or machine code. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib: parse_area_spec: no extra symbols after area spec are allowed except ↵Peter Mamonov2018-01-171-5/+10
| | | | | | | | | | | | | | | | | | | | | for spaces Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib: parse_area_spec: part of the area spec after -/+ should start with a digitPeter Mamonov2018-01-171-0/+6
| | | | | | | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib: parse_area_spec: don't modify *start value if parse failedPeter Mamonov2018-01-171-7/+11
| | | | | | | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Kconfig: drop unused HAS_POWEROFFAntony Pavlov2018-01-111-1/+0
| | | | | | | | | | | | | | | | | | 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>
| * | usbgadget: Update command help textSascha Hauer2018-01-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Do not use BAREBOX_CMD_HELP_OPT with an empty option to extend the previous option text. It confuses the rst converter - Add a '\t' to the options to align the option help texts in the barebox command help Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ubiformat: Lower message printing frequencySascha Hauer2018-01-112-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | During scanning and formatting printing the messages on a serial line has significant overhead up to the point where it takes longer to print the messages than it takes to do the work. Lower the message printing frequency to improve performance. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | device parameters: Allow dots in device names for setenv aswellSascha Hauer2018-01-101-19/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since f5d77d80f5 Allow device parameters for devices with dots in name Devices can have dots in their name and we can still read its device parameters. Do the same change for writing parameters so they can be written aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | linux/kernel.h: move ALIGN_DOWN() to include/linux/kernel.hMasahiro Yamada2018-01-052-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux commit ed067d4a859f ("linux/kernel.h: Add ALIGN_DOWN macro") moved ALIGN_DOWN to include/linux/kernel.h. Let's do likewise. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | string.h: Implement strndupUwe Kleine-König2018-01-052-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | I implemented this while trying to import mmc-utils into barebox. While I didn't finish this import this function might still be useful for someone?! Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2018-01-227-3/+15
|\ \ \
| * | | Revert "mci: imx-esdhc: Enable clock"Andrey Smirnov2018-01-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 61c6c24958934b6b226aa37b3b3a2c089189f52b which is pretty much a duplicate of: a97345102 "i.MX: esdhc: Enable host->clk during initialization" Since we don't need to enable that clock twice reverse the former and keep the latter. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i.MX: Select DRIVER_SPI_IMX_2_3 for i.MX7Andrey Smirnov2018-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Select DRIVER_SPI_IMX_2_3 for i.MX7 since that is the variant that's being used. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i.MX: ecspi: Enable imx->clk as a part of initializationAndrey Smirnov2018-01-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some SoCs (e. g. i.MX7) do not enable this clock by default, so add code to take care of that in the driver. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i.MX7: Add CCM definitions for UART2Andrey Smirnov2018-01-111-0/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i.MX: Fix MX7_UART2_BASE_ADDRAndrey Smirnov2018-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Despite what the Reference Manual says, experiment on i.MX7 SabreSD shows that that UART2's base is located at offset 0x90000. This is also corroborated by the offset used in dts/src/arm/imx7s.dtsi in uart2. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: i.MX6: add new silicon revision number 1.6Christoph Fritz2018-01-112-0/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | This patch adds new silicon revision number 1.6 as specified in document IMX6DQCEC.pdf. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/fastboot-sparse'Sascha Hauer2018-01-2215-33/+687
|\ \ \
| * | | usb: gadget: fastboot: Add sparse image supportSascha Hauer2018-01-183-23/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sparse images are needed for fastboot to flash images that do not fit into memory. Android fastboot is kind of a dumb protocol. It first sends you a big image and afterwards it tells you where to put this image. This of course limits fastboot to files smaller than the available memory. To bypass this issue fastboot has so called Sparse image support. This is a new image format that can contain holes in the data so a big image can be written in multiple steps with holes in other areas each step. Implementing this for UBI images is kind of tricky since ubiformat normally expects to get a single image. Preparations to ubiformat a device in multiple parts have been done in previous patches. It is however, only for the first part possible to detect if it is a UBI image. The other parts are just binary data and we cannot know if we have to pass this data raw to the flash or use ubiformat. For this reason this patch makes the 'u' flag in the partition description mandatory for proper UBI image flashing on MTD devices. fastboot passes a max_download_size variable to the host. This variable contains the image size fastboot can take in one go. We have to choose a good compromise here. On one hand we do not want to risk that we actually do not have enough memory to hold the transferred image, on the other hand we want images like bootloaders not as sparse images, but in one go instead to make atomic exchange of the bootloader possible. Right now we have chosen 8MiB which should be big enough for all bootloaders. The value is configurable via global.usbgadget.fastboot_max_download_size. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | file_list: Add ubi flagSascha Hauer2018-01-172-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flag is added to better support flashing UBI image with Android sparse images. Android fastboot splits images which are bigger than the free memory into multiple images which are then transferred in multiple fastboot sessions. In a session which is not the first one we can no longer detect if an image is a UBI image or not, so we need a flag to make this explicit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | filetype: Add fastboot sparse format detectionSascha Hauer2018-01-172-0/+6
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Add support for fastboot sparse imagesSascha Hauer2018-01-174-0/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for reading Android fastboot sparse images. This code is based on the corresponding U-Boot code, but has been heavily modified to provide a read-like API which better fits into barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Documentation: USB gadget: Add section for partition descriptionSascha Hauer2018-01-111-10/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Partition descriptions are used with both fastboot and DFU, so add a separate section describing them and remove it from the DFU section. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ubiformat: Add ubiformat write functionSascha Hauer2018-01-112-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ubiformat C API expects an image file as argument. With upcoming Android fastboot sparse image support we can no longer provide a complete image anymore. With this patch we can write an image in multiple chunks after we've formatted a MTD device with ubiformat. ubiformat_write will skip the EC header in both the MTD device we write to and also the image we read from, so we can flash an image on a MTD device containing EC headers already. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: implement ftruncateSascha Hauer2018-01-102-0/+23
| |/ / | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>