summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dts: update to v5.3-rc5Sascha Hauer2019-09-123-15/+22
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: i.MX6qp: Fix location of the enfc_sel muxSascha Hauer2019-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | On the i.MX6qp the enfc_sel mux is at bits 15-17, not on 16-17. Fix this. During clock tree initialization we reparented the enfc_sel to: clk_set_parent(clks[IMX6QDL_CLK_ENFC_SEL], clks[IMX6QDL_CLK_PLL2_PFD2_396M]); This resulted in a register setting 0b110 for the enfc_sel mux which is reserved. Apparently this reserved setting resulted in the enfc clock being driven from pll3_pfd3_454m. This means our enfc clock was the factor 454/396 too high. With b534f79112f0 ("clk: imx6: Fix procedure to switch the parent of LDB_DI_CLK") we happened to disable pll3_pfd3_454m during init, so with this commit NAND stopped working entirely on i.MX6qp. Both issues are fixed with this patch Fixes: b534f79112f0 ("clk: imx6: Fix procedure to switch the parent of LDB_DI_CLK") Fixes: 92fd61d12723 ("clk: i.MX6: Fix enfc_sel for i.MX6dqp") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: release tee_resSascha Hauer2019-09-121-0/+2
| | | | | | | | When a tee_res has been acquired it must be released when bootm returns (for dryrun) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
* gcc-9: silence 'address-of-packed-member' warningSascha Hauer2019-09-121-0/+2
| | | | | | | | As done in the Linux Kernel. Most of the packed structures we have are optimized to not generate any unaligned accesses, so this warning produces a lot of false positives which are hard to fix in the code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tftp'Sascha Hauer2019-09-123-1/+12
|\
| * fs: tftp: don't maintain tftp dentries in dcacheAhmad Fatoum2019-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Currently a negative dentry is cached whenever a non-existing file was looked up over TFTP. Short of a barebox reset, there is no way to invalidate that dentry, so barebox retries the look up. Fix this by always reporting TFTP dentries as invalid in the d_revalidate callback. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: provide no_revalidate_d_ops for network file systemsAhmad Fatoum2019-08-232-0/+11
| | | | | | | | | | | | | | | | | | Networked file systems may wish to forego dentry caching altogether, so every lookup goes over the network and stale data is avoided. Provide a no_revalidate_d_ops helper object that does this. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: tftp: remove duplicate headerAhmad Fatoum2019-08-231-1/+0
| | | | | | | | | | | | | | <fs.h> is included again a few lines prior. Delete it here. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/stm32'Sascha Hauer2019-09-1211-0/+1286
|\ \
| * | watchdog: add support for STPMIC1 integrated watchdogAhmad Fatoum2019-09-093-0/+231
| | | | | | | | | | | | | | | | | | | | | | | | The driver adds support for the PMIC's watchdog, reset, poweroff and reset reason query capabilities. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mfd: add support for STPMIC1Ahmad Fatoum2019-09-093-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | The PMIC is addressable over I2C and, besides power management, integrates a watchdog, a user power on key handling and 64 bit of non-volatile memory. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | i2c: add stm32f7 I2C adapter driverAhmad Fatoum2019-09-093-0/+869
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds initial support for the STM32F7 I2C controller. It was tested to work with the STM32MP157C. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | i2c: port Linux i2c_parse_fw_timingsAhmad Fatoum2019-09-092-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | Linux has a generic function for extracting i2c timings parameters from device-associated firmware nodes. Port this function to barebox, but have it only work on device tree nodes for now. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/socfpga'Sascha Hauer2019-09-124-54/+73
|\ \ \
| * | | ARM: achilles: add bbu handlerSteffen Trumtrar2019-08-191-0/+26
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: Arria10: achilles: add named partitionsSteffen Trumtrar2019-08-191-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add labels for the barebox1/2 and bitstream1/2 partitions. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: Arria10: achilles: fix offsets in node namesSteffen Trumtrar2019-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The node names do not match the actual reg values. Fix this up. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: socfpga: fix xload on arria10Steffen Trumtrar2019-08-192-52/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the commit 5a1a5ed2537d7d12f851f3778707681d6c08d6e8 ARM: images: use piggydata the loading mechanism in the arria10 xload is neither functional nor needed. Now, barebox has/can be loaded like a normal image, so the filesize, that is written to the barebox header, can be evaluated. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/sandbox'Sascha Hauer2019-09-1213-9/+184
|\ \ \ \
| * | | | hwrng: add sandbox driver interface to host /dev/randomAhmad Fatoum2019-09-097-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux as well as other operating systems can provide /dev/random and /dev/urandom device to service userspace need for randomness. Add a driver to use /dev/random for blocking and /dev/urandom for non-blocking barebox random numbers. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | sandbox: dts: add example for barebox, hostfile backed stateAhmad Fatoum2019-09-091-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous commit now allows probing barebox,hostfile to be probed from device tree. Add a barebox state node that shows how to use it. It's not included by default, same as barebox-libftdi-example.dtsi in the same directory. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | sandbox: hostfile: allow probing from device treeAhmad Fatoum2019-09-093-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When testing things like barebox state in sandbox, it's nice to be able to refer to a partition on a hostfile by phandle. Support this by checking for reading the barebox,filename property. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | sandbox: compile with symbol -fvisibility=hiddenAhmad Fatoum2019-08-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | barebox defines many symbols that are reserved for the C implementation. This collides with the libc, when building barebox for ARCH=sandbox. Specify -fvsibility-hidden, so libraries barebox is linked against don't inadvertently use barebox' functions. This fixes a heap corruption occurring when issuing fb0.enable=1 on my system, because X11 used strdup out of barebox, but free out of glibc[1]: binding file /lib/x86_64-linux-gnu/libX11.so.6 [0] to ./barebox [0]: normal symbol l `strdup' [GLIBC_2.2.5] [...] binding file /lib/x86_64-linux-gnu/libc.so.6 [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `free' [GLIBC_2.2.5] [1]: cf. CFLAGS +=-Dfree=barebox_free in arch/sandbox/Makefile Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | sandbox: redefine optarg and optind to avoid collisionsAhmad Fatoum2019-08-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we don't do this, the barebox main may fail to parse arguments. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | sandbox: remove unused ARCH_LINUX Kconfig symbolAhmad Fatoum2019-08-281-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not referenced anywhere anymore, so drop it. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | sandbox: include header to provide missing prototypeAhmad Fatoum2019-08-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sandbox_add_device lacks a prototype. Include the appropriate header to fix this. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/reset-source'Sascha Hauer2019-09-127-40/+80
|\ \ \ \ \
| * | | | | oftree: expose reset_source device in device treeUwe Kleine-König2019-09-092-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mfd: da9063: use new reset_source_set_device()Uwe Kleine-König2019-09-091-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make use of the just introduced reset_source_set_device() to save some boilerplate. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mfd: da9053: use new reset_source_set_device()Uwe Kleine-König2019-09-091-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make use of the just introduced reset_source_set_device() to save some boilerplate. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | reset_source: implement helper to set a device as reset sourceUwe Kleine-König2019-08-282-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to remove some boilerplate from drivers. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | reset_source: drop reset_source_set_instance()Uwe Kleine-König2019-08-284-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The semantic of reset_source_set_instance() required a separate call to reset_source_set() (or reset_source_set_priority()) and checked right usage only using the type. Make the set of functions a bit easier to use by dropping reset_source_set_instance() and instead introduce a function that can set all relevant parameters (source, priority and instance) in one go. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | reset_source: fix ordering of exported functionsUwe Kleine-König2019-08-282-20/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare and implement getters first, then setters. This syncs the order of functions in reset_source.c and reset_source.h. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | reset_source: use instance = -1 as defaultUwe Kleine-König2019-08-283-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As with platform device id (does someone still remember?) 0 might be a valid id. So use -1 for "unknown" or "doesn't apply" instead of 0. Also don't pass the instance to the device tree if negative. (This ends up as 0xffffffff otherwise.) 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/qemu'Sascha Hauer2019-09-1255-651/+1193
|\ \ \ \ \ \
| * | | | | | ARM: i.MX: When generic DT image is enabled do not hardcode SoCSascha Hauer2019-08-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When only a single i.MX SoC is selected the cpu_is_mx?() macros expand to static 0 or 1. With the generic DT image enabled it could be though that the SoC is not a i.MX at all, so make sure that with the generic DT image enabled the cpu_is_mx?() macros always compare against __imx_cpu_type Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX: Do not hang() on unknown SoCsSascha Hauer2019-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic DT image built with CONFIG_ARCH_IMX has nothing really i.MX specific except that it has support for i.MX features. The DT image could be started with a non i.MX device tree which works as expected. imx_init() panics though when started with a non i.MX device tree. Remove the hang() so that we can just continue. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: Add generic device tree 2nd stage supportSascha Hauer2019-08-195-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for building a barebox image that boots with the Linux ARM Kernel booting convention. Support for this image can be enabled in Kconfig. It picks up a device tree passed in r2. This new image helps for example with qemu. It can be started with: qemu-system-aarch64 -m 2G -M virt -kernel images/barebox-dt-2nd.img -cpu cortex-a57 -serial stdio or: qemu-system-arm -m 1G -M sabrelite -kernel images/barebox-dt-2nd.img -nographic -dtb arch/arm/dts/imx6q-sabrelite.dtb Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | common: return "none" when board unsetSascha Hauer2019-08-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of returning NULL when board is not set return "none". Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | Compile libfdt for bareboxSascha Hauer2019-08-1912-68/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libfdt can be useful for very early device tree parsing, so compile it for barobox aswell. This is done the same way as done in the Kernel: we put C files with the same name as in libfdt into lib/ and just include the libfdt files from there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | pbl: Implement strrchrSascha Hauer2019-08-191-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strrchr is needed for libfdt. Add support for it to the pbl. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | scripts/dtc: Update to upstream version v1.5.0Sascha Hauer2019-08-1933-569/+926
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the following commits from upstream: d37f6b2 Bump version to v1.5.0 a4b1a30 pylibfdt:tests: Extend the way how to find a Python module 625dd8a pylibfdt: Change how passing tests are recognized 3646316 pylibfdt: Test fdt.setprop take bytes on Python 3, add error handling cb0f454 pylibfdt: check_err accepts only integer as a first argument. 4b68c6b pylibfdt: Proper handling of bytes/unicode strings and octal literals 78e113e Use PRIxPTR for printing uintptr_t values ea7a8f6 libfdt: Fix FDT_ERR_NOTFOUND typos in documentation 5aafd7c libfdt: Fix fdt_getprop_by_offset() parameter name in documentation 7cbc550 checks: Add unit address check if node is enabled f267e67 checks: Fix crash with multiple source annotations 3616b9a checks: Use source position information for check failures 2bdbd07 checks: Make each message output atomic a1eff70 util: Add xa{v}sprintf_append functions 82a52ce libfdt: Add a test for fdt_getprop_by_offset() 607b858 PEP8 / Flake8 cleanups for setup.py f9c0a42 Remove broken objdir / srcdir support 5182b5e pylibfdt: Use common PREFIX variable d45bf1f Refine make tests_clean target 99284c4 Refine pylibfdt_clean target a4629cf Refine libfdt_clean target 08380fc tests: Use modern octal literals for Python 8113c00 pylibfdt: Allow switch to Python 3 via environment variable PYTHON 11738cf libfdt: Don't use memcpy to handle unaligned reads on ARM 86a288a checks: Restructure check_msg to decrease indentation 5667e7e annotations: add the annotation functionality 8e20ccf annotations: add positions ca930e2 tests: Don't lose errors from make checkm 43366bb tests: Property count valgrind errors in wrapped tests 5062516 srcpos: Remove srcpos_empty a3143fa Revert "annotations: add positions" 403cc79 checks: Update SPI bus check for 'spi-slave' baa1d2c annotations: add positions ff2ad38 Merge remote-tracking branch 'origin/pr/18' aa7254d libfdt: return correct value if #size-cells property is not present 49903ae use ptrdiff_t modifier for printing pointer differences da2b691 treesource: Fix dts output for phandles in middle of a sequence of ints 8f8b77a tests: Wrap check_align() calls with base_run_test() 522d81d Fix dts output with a REF_PATH marker e45198c Added test cases for target references 0fcffda Merge nodes with local target label references 1e4a092 pylibfdt: Don't have setup.py depend on where it's invoked from ca399b1 pylibfdt: Eliminate run_setup make function 98972f1 pylibfdt: Improved version extraction 7ba2be6 pylibfdt: Don't silence setup.py when V=1 7691f9d pylibfdt: Make SETUP make variable 855b996 pylibfdt: Simpler CFLAGS handling 47cafbe pylibfdt: Link extension module with libfdt rather than rebuilding dd695d6 pylibfdt: Correctly set build output directory 5932752 pylibfdt: We don't need include files from the base directory e84742a checks: fix simple-bus compatible matching 8c59a97 Fix missing labels when emitting dts format d448f9a Revert dts output formatting changes of spaces around brackets c86da84 Add support for YAML encoded output 361b5e7 Make type_marker_length helper public bfbfab0 pylibfdt: Add a means to add and delete notes 9005f41 pylibfdt: Allow delprop() to return errors b94c056 Make valgrind optional fd06c54 tests: Better testing of dtc -I fs mode c3f50c9 tests: Allow dtbs_equal_unordered to ignore mem reserves 0ac9fde dtc: trivial '-I fs -O dts' test 0fd1c8c pylibfdt: fdt_get_mem_rsv returns 2 uint64_t values 04853ca pylibfdt: Don't incorrectly / unnecessarily override uint64_t typemap 9619c86 Kill bogus TYPE_BLOB marker type ac68ff9 parser: add TYPE_STRING marker to path references 90a190e checks: add SPI bus checks 53a1bd5 checks: add I2C bus checks Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | dtc: Update update-dtc-source.sh from LinuxSascha Hauer2019-08-191-12/+13
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates update-dtc-source.sh from Linux-5.3-rc4. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | | Merge branch 'for-next/omap'Sascha Hauer2019-09-1214-92/+1142
|\ \ \ \ \ \
| * | | | | | ARM: OMAP: bbu: Add an all-in-one NAND update handlerSascha Hauer2019-08-282-0/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a NAND update handler which automatically detects on the filetype which stage shall be updated. It takes a single partition for both the xload images and the barebox images. It uses a fixed layout on this partition, so there's no need to configure anything on the board side. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | mtd: peb: Add function to write fileSascha Hauer2019-08-282-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a function to the mtd peb API to write a file spanning multiple blocks to a mtd device. Bad blocks are automatically skipped and before anything is done we check if the image will fit into the remaining space (honouring bad blocks). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | net: cpsw: Make phy its own driverSascha Hauer2019-08-281-82/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes of_phy_device_connect() work properly when the phy is specified in the device tree. Without it of_mdio_find_phy() will not find the right device. It will match: bus->parent->device_node == phy_node->parent Without this patch bus->parent->device_node will be the ethernet node and phy_node->parent will be the ti,cpsw-mdio node. With the MDIO device node registered as device of its own both nodes above will be the ti,cpsw-mdio node. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | mtd: nand: gpmc: Add BCH16 supportSascha Hauer2019-08-284-9/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for BCH16 ECC encoding. The support is mostly taken from Linux-5.3-rc6. One major change is the different wrap mode used. The Kernel uses wrapmode 1, which means "pass all data through the BCH engine". Still the Kernel has to skip the OOB marker which is done by reading all user data, then use NAND_CMD_RNDOUT to position right behind the OOB marker and then read the ECC data. Instead of doing this we use wrap mode 4 which allows us to bypass the OOB marker from the BCH engine automatically. This explains bch_wrapmode = 1, eccsize0 = 0, eccsize1 = 52 vs. bch_wrapmode = 4, eccsize0 = 4, eccsize1 = 52 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | mtd: nand: gpmc: Add support for ELMSascha Hauer2019-08-284-0/+477
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the ELM (Error Location Module) found on not-too-old OMAP SoCs. The driver has been taken from Linux-5.3-rc6 with interrupt support removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: omap: am35xx_emif4: Fix bit pollingSascha Hauer2019-08-281-1/+1
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ((x & (1 << 10)) == 0x1) can never be true as the compiler mourns about. Fix this to actually do what the comment says: Wait till bit 10 is cleared. Looking at the corresponding U-Boot code also suggests that this is the right thing to do. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>