summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lib: select BASE64 if BLOBGEN is selectedRouven Czerwinski2019-05-241-0/+1
| | | | | | | | Blobgen requires the BASE64 libraries, select them to provide them if BLOBGEN is selected. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: imx8mq-evk: collapse BMOD switch superpositionAhmad Fatoum2019-05-231-1/+1
| | | | | | | | | | Table 3. Boot mode setting in the user's guide[1] lists 0010 as 'Boot from EMMC'. Adjust diagram accordingly. [1]: https://www.mouser.com/ds/2/302/IMX8MDQLQEVKHUG-1280333.pdf Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: kindle mx50: adapt MCI name to DTSAlexander Kurz2019-05-213-4/+4
| | | | | | | | The MCI instances got aliases in the DTS from linux upstream which changed the eMMC devicename e.g. from disk0 to mmc2. Adapt to this. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: include: dma: Zero out DMA coherent memory in no-MMU caseAndrey Smirnov2019-05-211-0/+2
| | | | | | | | Add code to match the behavior of dma_alloc_coherent() when CONFIG_MMU is selected. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* LICENSES: remove empty other, exceptions directoriesAhmad Fatoum2019-05-212-0/+0
| | | | | | | | | | | | | | | | | These directories were originally added as they were required for spdxcheck.py, which upstream checkpatch.pl invokes. As git doesn't index empty directories, they contained empty .gitignore files. As these files were 0 bytes, make distclean now removes them. We already patch checkpatch.pl, so we will just patch spdxcheck.py when we add it and get rid of these directories. They can be added back should the need arise. Reported-by: Geordan Neukum <gneukum1@gmail.com> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: spi: fix NULL pointer dereferenceSteffen Trumtrar2019-05-171-0/+1
| | | | | | | | | | | | | | | The renaming of "master" to "controller" done in 812a9ddcdf211302a050cf8f61f7af577bc29a23 spi: Generalize SPI "master" to "controller" breaks the spi command, because the spi.master pointer is not assigned. The pointer is kept for backwards compatability. Assign it, so that spi drivers that are still using "spi->master" can be used. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serdev: Do not call .receive_buf() callback recursivelyAndrey Smirnov2019-05-152-0/+8
| | | | | | | | | | | | Code implementing .receive_buf() callback can potentially call serdev_device_write(), which will call serdev_device_poller(). We need to make sure that such a call is a no-op in order to prevent corrupting shared data buffer as well as breaking .receive_buf callback that most likely does not expect that to happen. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Tested-by: Cory Tusar <cory.tusar@zii.aero> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* spi: Kconfig: remove dependency list from Freescale QSPI controllerSascha Hauer2019-05-151-1/+0
| | | | | | | | The dependency list for the Freescale QSPI controller doesn't match the SoCs the hardware is in at all. Remove the dependency entirely as the driver builds on all machines. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ubifs'Sascha Hauer2019-05-1013-75/+585
|\
| * fs: ubifs: Add authentication supportSascha Hauer2019-04-2413-75/+585
| | | | | | | | | | | | | | | | | | | | | | | | This adds UBIFS authentication support. For now, we do not do any authentication even on authenticated UBIFS images. Since this behaviour is not what the user normally expects when mounting authenticated images we only do this when the user explicitly allows it in "global.ubifs.allow_authenticated_unauthenticated". If the flag is false then we refuse mounting such an image and return -EPERM instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/qspi'Sascha Hauer2019-05-1013-480/+2781
|\ \
| * | mtd: spi-nor: Add support for more Macronix devicesSascha Hauer2019-05-081-0/+3
| | | | | | | | | | | | | | | | | | Add support for the Macronix mx66u51235f, mx66l1g45g and mx66l1g55g. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: devices: m25p80: use the spi_mem_xx() APISteffen Trumtrar2019-05-082-82/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the barebox adoption of the linux v4.16 patch 4120f8d158ef904fb305b27e4a4524649faf3096 Author: Boris Brezillon <bbrezillon@kernel.org> AuthorDate: Thu Apr 26 18:18:19 2018 +0200 Commit: Mark Brown <broonie@kernel.org> CommitDate: Fri May 11 11:33:51 2018 +0900 mtd: spi-nor: Use the spi_mem_xx() API The spi_mem_xxx() API has been introduced to replace the spi_flash_read() one. Make use of it so we can get rid of spi_flash_read(). Note that using spi_mem_xx() also simplifies the code because this API takes care of using the regular spi_sync() interface when the optimized ->mem_ops interface is not implemented by the controller. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@exceet.de> Tested-by: Frieder Schrempf <frieder.schrempf@exceet.de> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: spi-nor: provide default erase_sector implementationSteffen Trumtrar2019-05-082-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the Linux v4.4 patch commit c67cbb839da9cc2757eabfa128556db6a2baf160 Author: Brian Norris <computersforpeace@gmail.com> AuthorDate: Tue Nov 10 12:15:27 2015 -0800 Commit: Brian Norris <computersforpeace@gmail.com> CommitDate: Thu Nov 19 13:34:44 2015 -0800 mtd: spi-nor: provide default erase_sector implementation Some spi-nor drivers perform sector erase by duplicating their write_reg() command. Let's not require that the driver fill this out, and provide a default instead. Tested on m25p80.c and Medatek's MT8173 SPI NOR flash driver. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocolsSteffen Trumtrar2019-05-084-230/+679
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync the driver with Linux v4.12 and apply the patch commit cfc5604c488ccd17936b69008af0c9ae050f4a08 Author: Cyrille Pitchen <cyrille.pitchen@atmel.com> AuthorDate: Tue Apr 25 22:08:46 2017 +0200 Commit: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr> CommitDate: Mon May 15 21:56:17 2017 +0200 mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocols This patch changes the prototype of spi_nor_scan(): its 3rd parameter is replaced by a 'struct spi_nor_hwcaps' pointer, which tells the spi-nor framework about the actual hardware capabilities supported by the SPI controller and its driver. Besides, this patch also introduces a new 'struct spi_nor_flash_parameter' telling the spi-nor framework about the hardware capabilities supported by the SPI flash memory and the associated settings required to use those hardware caps. Then, to improve the readability of spi_nor_scan(), the discovery of the memory settings and the memory initialization are now split into two dedicated functions. 1 - spi_nor_init_params() The spi_nor_init_params() function is responsible for initializing the 'struct spi_nor_flash_parameter'. Currently this structure is filled with legacy values but further patches will allow to override some parameter values dynamically, for instance by reading the JESD216 Serial Flash Discoverable Parameter (SFDP) tables from the SPI memory. The spi_nor_init_params() function only deals with the hardware capabilities of the SPI flash memory: especially it doesn't care about the hardware capabilities supported by the SPI controller. 2 - spi_nor_setup() The second function is called once the 'struct spi_nor_flash_parameter' has been initialized by spi_nor_init_params(). With both 'struct spi_nor_flash_parameter' and 'struct spi_nor_hwcaps', the new argument of spi_nor_scan(), spi_nor_setup() computes the best match between hardware caps supported by both the (Q)SPI memory and controller hence selecting the relevant settings for (Fast) Read and Page Program operations. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | spi: add driver for Freescale QSPI controllerSteffen Trumtrar2019-05-083-0/+881
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on the Linux v5.1-rc1 driver introduced with the commit: commit 84d043185dbe0d1b4f6db575bd91c834d37e2f78 Refs: v5.0-rc1-1-g84d043185dbe Author: Frieder Schrempf <frieder.schrempf@kontron.de> AuthorDate: Mon Jan 7 09:29:47 2019 +0000 Commit: Mark Brown <broonie@kernel.org> CommitDate: Mon Jan 7 16:56:24 2019 +0000 spi: Add a driver for the Freescale/NXP QuadSPI controller This driver is derived from the SPI NOR driver at mtd/spi-nor/fsl-quadspi.c. It uses the new SPI memory interface of the SPI framework to issue flash memory operations to up to four connected flash chips (2 buses with 2 CS each). The controller does not support generic SPI messages. This patch also disables the build of the "old" driver and reuses its Kconfig option CONFIG_SPI_FSL_QUADSPI to replace it. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Acked-by: Han Xu <han.xu@nxp.com> Reviewed-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> Tested-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> Tested-by: Han Xu <han.xu@nxp.com> Reviewed-by: Boris Brezillon <bbrezillon@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: spi-nor: remove unused read_xfer/write_xfer hooksSteffen Trumtrar2019-05-081-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the Linux v4.3 patch: commit 79c452adb159dc9abc507ea13faec8d115a78758 Author: Cyrille Pitchen <cyrille.pitchen@atmel.com> AuthorDate: Fri Sep 18 17:49:25 2015 +0200 Commit: Brian Norris <computersforpeace@gmail.com> CommitDate: Mon Sep 21 16:49:52 2015 -0700 mtd: spi-nor: remove unused read_xfer/write_xfer hooks struct spi_nor_xfer_cfg and read_xfer/write_xfer hooks were never used by any driver. Do some cleanup by removing them. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: spi-nor: remove unused write_enable from write_regSteffen Trumtrar2019-05-084-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the Linux v4.2 commit: commit f9f3ce835ddce3c669eee869253105f88819888b Author: Jagan Teki <jteki@openedev.com> AuthorDate: Wed Aug 19 15:26:44 2015 +0530 Commit: Brian Norris <computersforpeace@gmail.com> CommitDate: Fri Sep 11 16:04:55 2015 -0700 mtd: spi-nor: Zap unneeded write_enable from write_reg The 'write_enable' argument is unused and unneeded, so remove it from the API. Signed-off-by: Jagan Teki <jteki@openedev.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Han Xu <han.xu@freescale.com> [Brian: fixed for nxp-spifi.c] Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | spi: Extend the core to ease integration of SPI memory controllersSteffen Trumtrar2019-05-087-23/+948
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync with Linux v5.1-rc1. This is the barebox adoption of the commit commit c36ff266dc82f4ae797a6f3513c6ffa344f7f1c7 Author: Boris Brezillon <boris.brezillon@bootlin.com> Date: Thu Apr 26 18:18:14 2018 +0200 spi: Extend the core to ease integration of SPI memory controllers Some controllers are exposing high-level interfaces to access various kind of SPI memories. Unfortunately they do not fit in the current spi_controller model and usually have drivers placed in drivers/mtd/spi-nor which are only supporting SPI NORs and not SPI memories in general. This is an attempt at defining a SPI memory interface which works for all kinds of SPI memories (NORs, NANDs, SRAMs). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@exceet.de> Tested-by: Frieder Schrempf <frieder.schrempf@exceet.de> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | spi: Import more spi mode defines from LinuxSteffen Trumtrar2019-05-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Sync with Linux v5.1-rc1. Define more spi mode flags. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | spi: Generalize SPI "master" to "controller"Steffen Trumtrar2019-05-083-55/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync with Linux v5.1-rc1. This is the barebox adoption of the commit commit 8caab75fd2c2a92667cbb1cd315720bede3feaa9 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue Jun 13 13:23:52 2017 +0200 spi: Generalize SPI "master" to "controller" Now struct spi_master is used for both SPI master and slave controllers, it makes sense to rename it to struct spi_controller, and replace "master" by "controller" where appropriate. For now this conversion is done for SPI core infrastructure only. Wrappers are provided for backwards compatibility, until all SPI drivers have been converted. Noteworthy details: - SPI_MASTER_GPIO_SS is retained, as it only makes sense for SPI master controllers, - spi_busnum_to_master() is retained, as it looks up masters only, - A new field spi_device.controller is added, but spi_device.master is retained for compatibility (both are always initialized by spi_alloc_device()), - spi_flash_read() is used by SPI masters only. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: spi-nor: cadence: add cqspi_set_protocolSteffen Trumtrar2019-05-081-63/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync up the driver with the original linux v4.7 driver version. As only Quad-SPI mode is/was supported, the function was not ported in the initial move to barebox. To make future synchronizations with the kernel driver easier, add this function and reorder the functions in the driver accordingly. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/ppc'Sascha Hauer2019-05-1014-17/+20
|\ \ \
| * | | owc: remove references to GE.Barbier, Renaud2019-05-085-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per contactual requirement, remove references to GE in the code. Signed-off-by: Renaud Barbier <renaud.barbier@abaco.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | owc: directories and files renamingBarbier, Renaud2019-05-0814-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | As the company changed name to Abaco Systems Inc, we have a contractual requirement to remove GE references. Start by renaming files and directories using a neutral name. Signed-off-by: Renaud Barbier <renaud.barbier@abaco.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mvebu'Sascha Hauer2019-05-1010-12/+105
|\ \ \
| * | | ARM: mvebu: defconfig: updateSascha Hauer2019-05-071-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | Enable remaining boards and enable some more features. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | arm: add basic support for the Armada XP DB platformSascha Hauer2019-05-079-1/+95
| | |/ | |/| | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mmc'Sascha Hauer2019-05-106-6/+652
|\ \ \
| * | | ARM: rpi3: remove swapped sdhci and sdhostLucas Stach2019-05-061-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have a sdhost driver there is no need to swap those peripherals. As the sdhci peripheral is only used for SDIO, which isn't supported in Barebox disable it. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rpi: enable sdhost driver in defconfigLucas Stach2019-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rpi: add clock for sdhostLucas Stach2019-05-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The sdhost is driven by the core clock. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: add driver for BCM283x sdhost coreLucas Stach2019-05-063-0/+643
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | The sdhost is a simple MMC controller found on the Broadcom BCM283x line of SoCs. The driver code was ported from U-Boot and then simplified a bit, by dropping a lot of the state tracking. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2019-05-108-29/+31
|\ \ \
| * | | commands/hwclock: align -n option helpAntony Pavlov2019-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Help string for hwclock -n option isn't aligned: barebox@barebox sandbox:/ help hwclock hwclock - query or set the hardware clock (RTC) Options: -f NAME RTC device name (default rtc0) -e VARNAME store RTC readout into variable VARNAME -n NTPSERVER set RTC from NTP server -s ccyymmddHHMM[.SS] set time Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | crypto: digest: fix digesting file windowsSascha Hauer2019-05-091-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When digesting a file we always try toread PAGE_SIZE bytes. When we get a short read because we reached the file end then the code works correctly. If instead we only want to digest a part of the file then we must make sure to only read up to 'size' bytes. Fixes: b77582effd ("crypto: digest: Split memory vs. file code into separate functions") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | UBI: remove Kconfig entry from includeJan Remmet2019-05-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_MTD_UBI_WL_THRESHOLD can be set via Kconfig. default there is also 4096. So remove the leftover here. Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: nfs: ensure rpc_req message is sendMarco Felsch2019-04-291-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we send a rpc message without checking if the send was succesful and poll for a answer from the server. If the server didn't answer within the NFS_TIMEOUT window we send the package again. In case the package send wasn't successful we always run in that timeout. This gets even worse if the package send fails more than one time. Check if the package send was successful and resend the package if it wasn't to fix this behaviour. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | doc: clarify state framework driver requirementMoritz Augsburger2019-04-261-1/+7
| | | |
| * | | doc: variables: nv vars are saved automatically.Tomaz Solc2019-04-231-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In recent barebox versions, nv variables are saved automatically upon reset or kernel start (console message "nv variable modified, will save nv variables on shutdown" warns about that). There is no need to explicitly call saveenv. This change was introduced in 3fadbdae. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: socfpga: Cyclone5: remove watchdog_disable()Ian Abbott2019-04-231-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | watchdog_disable() is left over from the original SoCFPGA commit and nothing calls it. Remove it to avoid a '-Wmissing-prototypes' warning from the compiler. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ddr_spd: Fix mod_ranks test张忠山2019-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ((x & 0x10) == 1) can never be true. Test for the bit at 0x10 instead. Signed-off-by: 张忠山 <zzs213@126.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/mips'Sascha Hauer2019-05-1028-36/+778
|\ \ \ \
| * | | | MIPS: remove request_sdram_region "fdt"Oleksij Rempel2019-04-231-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is actually not needed at barebox runtime Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MIPS: relocation: do not use configurable memory layoutOleksij Rempel2019-04-236-12/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The relocator is not able to patch properly new location of the stack. To make it work properly it is better to disable HAVE_CONFIGURABLE_MEMORY_LAYOUT. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MIPS: relocation: add relocation supportOleksij Rempel2019-04-2312-7/+712
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: relocation: pass ram size to pbl_main_entryOleksij Rempel2019-04-2312-13/+25
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | To make barebox dynamically relocatable it should know the RAM size to be able to calculate proper new location. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/layerscape'Sascha Hauer2019-05-1028-206/+413
|\ \ \ \
| * | | | ARM: Layerscape: Add device tree compatible to image metadataSascha Hauer2019-05-102-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enrich the image metadata with the device tree compatible string the image supports. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: Layerscape: TQMLS1046a: Add environment and update handlersSascha Hauer2019-05-102-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TQMLS1046a can boot from QSPI and SD/MMC. Add partitioning for these devices and barebox environment / barebox update handlers on them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>