summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mips: Implement setjmp/longjmp/initjmp for 32BITSascha Hauer2021-03-174-0/+84
| | | | | | | | | The header has been taken from glibc, the implementation itself is based on the newlib implementation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mips: Add linkage.hSascha Hauer2021-03-171-0/+9
| | | | | | | | Taken from Linux Kernel with unnecessary bits removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* riscv: Implement setjmp/longjmp/initjmp for RV32ISascha Hauer2021-03-175-0/+92
| | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* riscv: Add asm/linkage.hSascha Hauer2021-03-171-0/+12
| | | | | | | | Needed to include linux/linkage.h on riscv Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* riscv: Add asm/asm.hSascha Hauer2021-03-171-0/+69
| | | | | | | | Various definitions for assembly code, taken as-is from Linux. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: asm: implement setjmp/longjmp/initjmpAhmad Fatoum2021-03-175-4/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | To extend incoming bthread support to sandbox, implement setjmp, longjmp and initjmp. Unlike bare metal platforms, setjmp() and longjmp() are readily provided on standard-conforming hosted platforms. initjmp() on the other hand requires us to be able to invoke a function with a user-supplied stack pointer, which isn't possible in standard C. For POSIX systems, there are two methods to portably achieve this though: - Use makecontext(2) to set up a new context. makecontext(2) was however removed in POSIX.1-2008 and at least GCC 10.2.1 ASan complains that it "doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!" - Use sigaltstack to set a new signal stack, raise the signal call, setjmp in the signal handler to store the new stack pointer, return regularly from signal handler and then longjmp back Both methods are implemented in QEMU. While QEMU uses the makecontext method by default, for the reasons described, import the second implementation and use it implement initjmp. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: asm: setjmp: implement coroutine dependency initjmp()Ahmad Fatoum2021-03-174-0/+20
| | | | | | | Implement initjmp() for use with the incoming bthread support. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: asm: setjmp: annotate setjmp/longjmp for GCCAhmad Fatoum2021-03-121-2/+2
| | | | | | | | | To avoid invalid optimizations and to enable warnings, GCC must be told that setjmp and longjmp are to be handled specially. Add the missing attributes. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: introduce HAS_ARCH_SJLJAhmad Fatoum2021-03-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setjmp stores the registers comprising the execution context into a jmp_buf and longjmp switches to that context and continues execution just after the setjmp that allocated that jmp_buf. setjmp/longjmp can have multiple uses: - Handle return from firmware that clobbers registers. This is why we already have a setjmp/longjmp ARM - Do exception handling[1] - Port over scripting language VMs that use sjlj for context switching - Implement stackless coroutines in C. These coroutines would be stackless, because jumping to a setjmp down the call stack means that the code there will clobber the stack below it. On resuming the coroutine, it will run with a stack changed in the interim leading to undefined behavior. There are ways around that without resorting to custom Assembly: - Allocate a buffer on the scheduler's stack, so coroutine can grow into them -> Problem: exploits Undefined behavior - Yield first time on scheduler stack, then patch jmp_buf to point at another stack -> Problem: Code switching stacks should not itself use the stack - Construct a new jmp_buf with user-supplied return address and stack top: int initjmp(jmp_buf jmp, void __noreturn (*func)(void), void *stack_top); The latter could also be reused as a portable way of setting up a stack in early init code. We are going to implement green threads in later commits, so add a symbol that can be selected to indicate architecture support for setjmp, longjmp and the new initjmp. [1]: https://www.spinics.net/lists/u-boot-v2/msg41322.html Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: ubifs: remove unused variableSascha Hauer2021-03-121-2/+0
| | | | | | 'current' is unused. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx-image: fix iMX35 header generationAlexander Kurz2021-03-111-1/+4
| | | | | | | | Two header copies exist in the iMX35 image. When writing the barebox_header, also write it to the second copy. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* openrisc: Define the elf binary entry pointStafford Horne2021-03-041-0/+1
| | | | | | | | | Entry is used by qemu to find where to start booting, we define this to the 0x100 reset vector as is done by default when the CPU resets. This fixes the qemu boot issue. Signed-off-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2021-03-016-37/+27
|\
| * ARM: davinci: Replace license and copyright boilerplate by SPDX identifiersUwe Kleine-König2021-02-245-35/+14
| | | | | | | | | | | | | | | | | | Converts the files that licensecheck can determine to be licensed under GPL-2.0-only or GPL-2.0-or-later and also convert the copyright statements to SPDX. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: fdt: Add root name checks during unflatteningSascha Hauer2021-02-231-2/+13
| | | | | | | | | | | | | | | | In a valid dtb the root node must have an empty name. Also, every other node name must be non empty. Add additional checks for this for better protection against invalid dtbs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/arch-remove'Sascha Hauer2021-03-0148-3122/+0
|\ \
| * | nios2: Remove architectureSascha Hauer2021-02-2448-3122/+0
| |/ | | | | | | | | | | | | | | barebox nios2 support was merged in 2011. It hasn't seen very much active development since then and appears to have no active users. Remove the architecture. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Documentation: devicetree: include firmware in toctreeThorsten Scherer2021-02-241-0/+1
| | | | | | | | | | | | | | | | Fix Sphinx consistency warning. Fixes: fcdcb8177 ("documentation: devicetree: migrate remaining binding to reST") Signed-off-by: Thorsten Scherer <tsc@scherer.tk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: nand: fix hardware ECC support in atmel_nand driverEdoardo Scaglia2021-02-241-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a NAND memory with hardware ECC enabled on a Atmel SoC probing fails during barebox boot with following error: nand_base: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc nand_base: Micron MT29F4G08ABAEAWP nand_base: 512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 224 WARNING: at drivers/mtd/nand/nand_base.c:5594/nand_scan_tail()! WARNING: No oob scheme defined for oobsize 224 atmel_nand atmel_nand0: probe failed: No such device or address The problem arises from commit b6bcd96de5a75bdc5d06a06f2efffc2d89e346ec which among several changes dropped CONFIG_NAND_ECC_HW symbol, however two references remained in atmel_nand driver causing the failure of NAND probing when hardware ECC is configured in a Atmel SoC. Fixes: b6bcd96de5 ("mtd: nand: Update to Linux-5.9") Signed-off-by: Edoardo Scaglia <scaglia@amelchem.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | extend the test in bbu_std_file_handler() to also check for -ENOTSUP.jameszxj2021-02-241-1/+1
|/ | | | | | | extend the test in bbu_std_file_handler() to also check for -ENOTSUP. Signed-off-by: zhengxiaojun <jameszxj at gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/virtio'Sascha Hauer2021-02-2235-4/+3675
|\
| * Documentation: add Documentation on VirtIO for bareboxAhmad Fatoum2021-02-222-0/+83
| | | | | | | | | | | | | | | | | | Save users the trip to the commit log and reproduce some example qemu invocations in the documentation. The text around it is adapted from the U-Boot doc/README.virtio. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: vexpress: config: update for VirtIO supportAhmad Fatoum2021-02-221-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have now support for VirtIO block, console and HWRNG. Check the boxes to get them enabled and usable. While at it, add some more useful options: - CONFIG_CMD_POWEROFF: So Qemu can be exited from the barebox shell - CONFIG_CMD_FILETYPE: For debugging CONFIG_OF_OVERLAY=y is now selected on machine level, so it's dropped from the file. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * block: add VirtIO block device driverAhmad Fatoum2021-02-225-0/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this driver enabled, -device virtio-blk-device can now be passed to Qemu for barebox to detect a VirtIO block device mapping a host file or block device. If barebox is passed as argument to the Qemu -kernel option, no device tree changes are necessary. Example: $ qemu-system-arm -m 256M -M virt -nographic \ -kernel build/images/barebox-dt-2nd.img \ -device virtio-rng-device \ -drive if=none,file=/tmp/first.hdimg,format=raw,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -drive if=none,file=/tmp/second.hdimg,format=raw,id=hd1 \ -device virtio-blk-device,drive=hd1 Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: add basic VirtIO console driverAhmad Fatoum2021-02-224-0/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this driver enabled, -device virtio-serial-device can now be passed to Qemu for barebox to detect a VirtIO console device. If barebox is passed as argument to the Qemu -kernel option, no device tree changes are necessary. Example: $ qemu-system-arm -m 256M -M virt -nographic \ -kernel build/images/barebox-dt-2nd.img \ -device virtio-serial-device \ -chardev socket,path=/tmp/foo,server,nowait,id=foo \ -device virtconsole,chardev=foo,name=console.foo Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * hw_random: add VirtIO RNG driverAhmad Fatoum2021-02-223-0/+128
| | | | | | | | | | | | | | | | | | | | With this driver enabled, -device virtio-rng-device can now be passed to Qemu for barebox to detect a VirtIO RNG device. If barebox is passed as argument to the Qemu -kernel option, no device tree changes are necessary. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * drivers: add support for memory-mapped VirtIO paravirtualizationAhmad Fatoum2021-02-2218-0/+2840
| | | | | | | | | | | | | | | | | | | | | | Sandbox is only useful to test barebox in isolation. For interaction between barebox and firmware/OS, Qemu is the better choice. Qemu supports specifying VirtIO devices on the command line, which it automatically fixes up into the device tree. This is nice. Add support for that. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * driver: Don't throw an error on probes that didn't find the deviceAhmad Fatoum2021-02-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | As the name suggests, determining that a device doesn't match is a valid thing for probe to do. Unlike Linux, we throw an error in that case. This will becomes annoying if we start probing virtio-mmio devices, because Qemu registers a bunch and only assigns functions on demand. Thus don't print an error message for ENXIO and ENODEV like Linux does. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * kbuild: add include/uapi to pathAhmad Fatoum2021-02-221-1/+9
| | | | | | | | | | | | | | | | | | | | | | Import the necessary bits out of the Linux Makefile, so include/uapi goes into the path. This allows importing Linux headers without changing the includes too much. Like with Linux <linux/*.h> is first searched in include/, then include/uapi. Code that explicitly needs the uapi header can include <uapi/linux/*.h>. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/usb'Sascha Hauer2021-02-2210-67/+26
|\ \
| * | usb: imx: add overcurrent polarity handling on i.MX6Michael Grzeschik2021-02-041-1/+8
| | | | | | | | | | | | | | | Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: imx: fix overcurrent polarity handling on i.MX7Michael Grzeschik2021-02-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The reference manual says the overcurrent polarity is changed to low with the bit set. We fix that according to the description. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: remove duplicated usb_host_detect() callsAhmad Fatoum2021-02-017-62/+0
| | | | | | | | | | | | | | | | | | | | | | | | With the last patch adding a fallback detect, we no longer need the duplication in the host controller drivers. Drop them. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: add fallback ->detect method for USB host driversAhmad Fatoum2021-02-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already maintain a list of USB host controllers, so we can use that to implement a generic detect callback. Currently, all drivers define their own, which uses driver-specific means to arrive at the struct usb_host and then call usb_host_detect(). Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: usbgadget: remove deprecated s option from help textAhmad Fatoum2021-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to 44add42d4330 ("usbgadget: autostart: add DFU support"), -s used to do nothing. That commit made it behave like -a, but deprecated it and changed the help text to omit it. Remove it from the short help text as well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/sound'Sascha Hauer2021-02-2225-91/+1033
|\ \ \
| * | | sound: add gpio-beeper supportAhmad Fatoum2021-02-083-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for simple gpio-beepers. Note that unlike with PWM buzzers, GPIO buzzers can't be controlled in frequency and thus it doesn't make much sense to use the multiple argument version of beep with them. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sound: add PWM beeper supportAhmad Fatoum2021-02-084-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver can be used to drive a piezo-buzzer attached to a PWM. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | commands: add beep commandAhmad Fatoum2021-02-083-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a beep command that's compatible with GRUB's play "tempo pitch1 duration1..." Unlike the GRUB command, playing a tune is not a blocking operating. For this reason barebox, additionally supports: * -w: wait until tune is over * -c: cancel playing tune Additionally, `beep tempo` can be used to ring the bell at a frequency chosen by the sound card. Examples: # 1-up beep 1750 523 1 392 1 523 1 659 1 784 1 1047 1 784 1 415 1 523 \ 1 622 1 831 1 622 1 831 1 1046 1 1244 1 1661 1 # 1-second beep beep 60 Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sound: add SDL 2.0 sound driverAhmad Fatoum2021-02-087-0/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SDL 2.0.4 features SDL_QueueAudio, which we could use to just queue buffers for audio playback. Use it to implement the new sound API for the sandbox architecture. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sound: add basic synthesizers for PCM beeper useAhmad Fatoum2021-02-085-1/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For beeping on PCM sound cards, barebox will need to synthesize samples. Add basic sine and square wave synthesizers to achieve this. Client code can either call __synth_F to explicitly select synth F or synth_F, which depending on CONFIG_SYNTH_SQUARES may expand to either __synth_F or a gain-adjusted __synth_generate_square. The latter is mainly useful for slow systems that can't synthesize enough sine samples in a poller without impacting boot performance. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | drivers: add sound card driver supportAhmad Fatoum2021-02-087-0/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add driver core boilerplate for sound support in barebox. Using the provided API in <sound.h>, consumers can play beeps for a fixed duration of time. Playing beeps is not blocking and new beeps can be enqueued while one is already playing. They will be played in succession by a poller, which will also turn off the sound card when the beep tune is over. API is also available for blocking until all beeps are played and for cancelling an underway beep tune. The API could be later extended for arbitrary PCM audio, should the need arise. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: migrate to SDL 2.0Ahmad Fatoum2021-02-087-94/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SDL 2.0 has been released more than 7 years ago and should be available everywhere. Replace barebox's SDL 1.2 with SDL 2.0 instead: - better maintained - At least on Debian, you can't install x86_64 and i386 libsdl-dev at the same time, which makes a quick use of CONFIG_SANDBOX_LINUX_I386 harder as the user needs to reinstall libraries. With SDL 2.0, it works - SDL 2.0 has easier audio API, which will be used in a later commit - Wayland support for sandbox video driver Port to SDL 2.0 and as we touch everything anyway, rename the sdl_ functions to start with sdl_video_ to differentiate from upcoming sdl_sound_. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/nvmem'Sascha Hauer2021-02-222-14/+42
|\ \ \ \
| * | | | nvmem: make id optional for of_nvmem_device_get()Marco Felsch2021-01-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port upstream linux commit 8<---------------------------------------------------------------------- commit d4e7fef1a9a5d2bf3f859ba9f50f4d5409a09ab0 Author: Alban Bedel <albeu@free.fr> Date: Mon Jan 28 15:55:03 2019 +0000 nvmem: core: Properly handle connection ID in of_nvmem_device_get() of_nvmem_device_get() would crash if NULL was passed as a connection ID. Rework this to use the usual sementic of assuming the first connection when no connection ID is given. Furthermore of_nvmem_device_get() would return -EINVAL when it failed to resolve the connection, making it impossible to properly implement an optional connection. Return -ENOENT instead to let the caller know that the connection doesn't exists. Signed-off-by: Alban Bedel <albeu@free.fr> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 8<---------------------------------------------------------------------- Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | nvmem: make nvmem_device_write/read publicMarco Felsch2021-01-192-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those functions already export their symbols so make it public available. Compared to the nvmem_device_cell_read/write() APIs these functions are a bit easier to use. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | nvmem: add missing stubsMarco Felsch2021-01-191-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing stubs for nvmem_device_cell_read/write(). Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | nvmem: sync stub return values with linux codeMarco Felsch2021-01-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on linux commit: 8<------------------------------------------------------------------------ commit 20167b70c894f20cd01e2579fad206de440816ef Author: Bartosz Golaszewski <bgolaszewski@baylibre.com> Date: Fri Sep 21 06:40:22 2018 -0700 nvmem: use EOPNOTSUPP instead of ENOSYS Checkpatch emits warnings when using ENOSYS. Some of the frameworks started using EOPNOTSUPP as return values for API functions when given subsystem is disabled in Kconfig. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 8<------------------------------------------------------------------------ Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/mtd'Sascha Hauer2021-02-221-2/+4
|\ \ \ \ \
| * | | | | mtd: nand: Fix BBT update issueYoshio Furuyama2021-02-171-2/+4
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue of manages BBT (Bad Block Table). It didn't mark correctly when a specific block was bad block. This issue occurs when the bad block mark (3-bit chunk) is crosses over 32 bit (e.g. Block10, Block21...) unit. Signed-off-by: Yoshio Furuyama <ytc-mb-yfuruyama7@kioxia.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>