- Mar 23, 2020
-
-
Lukas Bulwahn authored
Commit a0900d01 ("mtd: spi-nor: Prepare core / manufacturer code split") moved all SPI NOR controller drivers to a controllers/ sub-directory. However, the moved nxp-spifi.c file was referenced in the ARM/LPC18XX ARCHITECTURE entry in MAINTAINERS. Hence, since then, ./scripts/get_maintainer.pl --self-test complains: warning: no file matches F: drivers/mtd/spi-nor/nxp-spifi.c Update the file entry in MAINTAINERS to its new location. Signed-off-by:
Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
- Mar 17, 2020
-
-
Tudor Ambarus authored
The SPI NOR controllers drivers must not be able to use structures that are meant just for the SPI NOR core. struct spi_nor_flash_parameter is filled at run-time with info gathered from flash_info, manufacturer and sfdp data. struct spi_nor_flash_parameter should be opaque to the SPI NOR controller drivers, make sure it is. spi_nor_option_flags, spi_nor_read_command, spi_nor_pp_command, spi_nor_read_command_index and spi_nor_pp_command_index are defined for the core use, make sure they are opaque to the SPI NOR controller drivers. Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by:
Vignesh Raghavendra <vigneshr@ti.com>
-
Tudor Ambarus authored
Cross manufacturer code is unlikely and discouraged, get rid of the MFR definitions. Suggested-by:
Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com>
-
Boris Brezillon authored
All entries have been moved to manufacturer drivers. Get rid of this empty table. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by:
Vignesh Raghavendra <vigneshr@ti.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for XMC chips, and move the XMC definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for Xilinx chips, and move the Xilinx definitions outside of core.c. While at it, remove the SPI_S3AN flag which is now useless. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for Catalyst chips, and move the Catalyst definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for Winbond chips, and move the Winbond definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for SST chips, and move the SST definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for Spansion chips, and move the Spansion definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for Micron/ST chips, and move the Micron/ST definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for Macronix chips, and move the Macronix definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Tested-by:
Xiang Chen <chenxiang66@hisilicon.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for ISSI chips, and move the ISSI definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for Intel chips, and move the Intel definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for GigaDevice chips, and move the GigaDevice definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for Fujitsu chips, and move the Fujitsu definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for Everspin chips, and move the Everspin definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for ESMT chips, and move the ESMT definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for Eon chips, and move the Eon definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Create a SPI NOR manufacturer driver for Atmel chips, and move the Atmel definitions outside of core.c. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Boris Brezillon authored
Declare a spi_nor_manufacturer struct and add basic building blocks to move manufacturer specific code outside of the core. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by:
Vignesh Raghavendra <vigneshr@ti.com>
-
Boris Brezillon authored
Expose the flash_info struct and some function prototypes that will be used by manufacturers. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by:
Vignesh Raghavendra <vigneshr@ti.com>
-
- Mar 16, 2020
-
-
Tudor Ambarus authored
It makes the core file a bit smaller and provides better separation between the SFDP parsing and core logic. Keep the core.h and sfdp.h definitions private in drivers/mtd/spi-nor/. Both expose just the definitions that are required by the core and manufacturer drivers. None of the SPI NOR controller drivers should include them. Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by:
Vignesh Raghavendra <vigneshr@ti.com>
-
Boris Brezillon authored
Move all SPI NOR controller drivers to a controllers/ sub-directory so that we only have SPI NOR related source files under drivers/mtd/spi-nor/. Rename spi-nor.c into core.c, we are about to split this file in multiple source files (one per manufacturer, plus one for the SFDP parsing logic). Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by:
Vignesh Raghavendra <vigneshr@ti.com>
-
Tudor Ambarus authored
Rename (*set_4byte)() to (*set_4byte_addr_mode)() for a better differentiation between the 4 byte address mode and opcodes. Rename macronix_set_4byte() to spi_nor_set_4byte_addr_mode(), it will be the only 4 byte address mode method exposed to the manufacturer drivers. Here's how the manufacturers enter and exit the 4 byte address mode: - eon, gidadevice, issi, macronix, xmc use EN4B/EX4B - micron-st needs WEN. st_micron_set_4byte_addr_mode() will become a private method, as they are the only ones that need WEN before the EN4B/EX4B commands. - newer spansion have a 4BAM opcode (this translates to a new, public command). Older spansion flashes use the BRWR command (legacy in core.c -> spansion_set_4byte_addr_mode()) - winbond's method is hackish and may be reason for just a flash fixup hook -> private method Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by:
Vignesh Raghavendra <vigneshr@ti.com>
-
Boris Brezillon authored
Replace the manufacturer prefix by something describing more precisely what those functions do. Signed-off-by:
Boris Brezillon <bbrezillon@kernel.org> [tudor.ambarus@microchip.com: prepend spi_nor_ to all modified methods.] Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by:
Vignesh Raghavendra <vigneshr@ti.com>
-
- Mar 13, 2020
-
-
Tudor Ambarus authored
spi: Rewrite mtk-quadspi spi-nor driver with spi-mem This patchset from Chuanhong Guo <gch981213@gmail.com> adds a spi-mem driver for Mediatek SPI-NOR controller, which already has limited support by mtk-quadspi. This new driver can make use of full quadspi capability of this controller. The mtk-quadspi driver is replaced by the new spi-mtk-nor driver. Merge it in spi-nor/next to avoid conflicts during the release cycle.
-
- Mar 11, 2020
-
-
Chuanhong Guo authored
This driver is superseded by the new spi-mtk-nor driver. Signed-off-by:
Chuanhong Guo <gch981213@gmail.com> Acked-by:
Tudor Ambarus <tudor.ambarus@microchip.com> Link: https://lore.kernel.org/r/20200306085052.28258-5-gch981213@gmail.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Chuanhong Guo authored
spi-mtk-nor is a driver to replace mtk-quadspi and they have almost the same device-tree bindings. Reuse this binding documentation and convert it for new driver: 1. "Mediatek SoCs" -> "Mediatek ARM SoCs" because MTK MIPS SoCs use different controllers. 2. document "interrupts" as a required property because it's available on all SoCs with this controller and new driver takes advantages of it. It's implemented as optional only to maintain backward compatibility. 3. add a dummy interrupt binding in example. Signed-off-by:
Chuanhong Guo <gch981213@gmail.com> Link: https://lore.kernel.org/r/20200306085052.28258-4-gch981213@gmail.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Chuanhong Guo authored
This is a driver for mtk spi-nor controller using spi-mem interface. The same controller already has limited support provided by mtk-quadspi driver under spi-nor framework and this new driver is a replacement for the old one. Comparing to the old driver, this driver has following advantages: 1. It can handle any full-duplex spi transfer up to 6 bytes, and this is implemented using generic spi interface. 2. It take account into command opcode properly. The reading routine in this controller can only use 0x03 or 0x0b as opcode on 1-1-1 transfers, but old driver doesn't implement this properly. This driver checks supported opcode explicitly and use (1) to perform unmatched operations. 3. It properly handles SFDP reading. Old driver can't read SFDP due to the bug mentioned in (2). 4. It can do 1-2-2 and 1-4-4 fast reading on spi-nor. These two ops requires parsing SFDP, which isn't possible in old driver. And the old driver is only flagged to support 1-1-2 mode. 5. It takes advantage of the DMA feature in this controller for long reads and supports IRQ on DMA requests to free cpu cycles from polling status registers on long DMA reading. It achieves up to 17.5MB/s reading speed (1-4-4 mode) which is way faster than the old one. IRQ is implemented as optional to maintain backward compatibility. Signed-off-by:
Chuanhong Guo <gch981213@gmail.com> Link: https://lore.kernel.org/r/20200306085052.28258-3-gch981213@gmail.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Chuanhong Guo authored
We only need a spi-max-frequency when we specifically request a spi frequency lower than the max speed of spi host. This property is already documented as optional property and current host drivers are implemented to operate at highest speed possible when spi->max_speed_hz is 0. This patch makes spi-max-frequency an optional property so that we could just omit it to use max controller speed. Signed-off-by:
Chuanhong Guo <gch981213@gmail.com> Link: https://lore.kernel.org/r/20200306085052.28258-2-gch981213@gmail.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- Feb 27, 2020
-
-
Jonathan Neuschäfer authored
- Don't use `tmp` for two purposes (return value, loop counter). Instead, use `i` for the loop counter, and `ret` for the return value. - Don't use tabs between type and name in variable declarations, for consistency with other functions in spi-nor.c. - Rewrite nested `if`s as `if (a && b)`. - Remove `info` variable, and use spi_nor_ids[i] directly. Signed-off-by:
Jonathan Neuschäfer <j.neuschaefer@gmx.net> [tudor.ambarus@microchip.com: change i's type from int to unsigned int, reorder local variables] Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
- Feb 19, 2020
-
-
Sergei Shtylyov authored
Make use of the spi-mem direct mapping API to let advanced controllers optimize read/write operations when they support direct mapping. Based on the original patch by Boris Brezillon <boris.brezillon@bootlin.com>. Signed-off-by:
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Sergei Shtylyov authored
spi_nor_spimem_xfer_data() being a helper function for the data reads/ writes contains 3 fragments that depend on the data direction; and I'm going to add another one to call the SPI dirmap API... I think this function should be split so that the common fragments are put into 2 functions, spi_nor_spimem_bounce() and spi_nor_spimem_exec_op() called from spi_nor_spimem_{read|write}_data(), and the data direction dependent bits moved back into those read/write functions -- that way we would be able to avoid *goto*s otherwise needed in the next patch adding the SPI dirmap support... Signed-off-by:
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
- Feb 16, 2020
-
-
Jungseung Lee authored
The shift variable of SR_BP is conclusive because the first bit of SR_BP is fixed on all known flashes. Replace ffs operation with SR_BP_SHIFT. Signed-off-by:
Jungseung Lee <js07.lee@samsung.com> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Sergei Shtylyov authored
The driver calls le32_to_cpu() to convert the little-endian tables to a CPU endianness, where le32_to_cpus() should have been called. Was going to use that one... and then discovered a whole array converter, le32_to_cpu_array()! :-) Signed-off-by:
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by:
Tudor Ambarus <tudor.ambarus@microchip.com>
-
Linus Torvalds authored
-
https://github.com/cminyard/linux-ipmiLinus Torvalds authored
Pull IPMI update from Corey Minyard: "Minor bug fixes for IPMI I know this is late; I've been travelling and, well, I've been distracted. This is just a few bug fixes and adding i2c support to the IPMB driver, which is something I wanted from the beginning for it" * tag 'for-linus-5.6-1' of https://github.com/cminyard/linux-ipmi: drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write ipmi:ssif: Handle a possible NULL pointer reference drivers: ipmi: Modify max length of IPMB packet drivers: ipmi: Support raw i2c packet in IPMB
-
git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds authored
Pull KVM fixes from Paolo Bonzini: "Bugfixes and improvements to selftests. On top of this, Mauro converted the KVM documentation to rst format, which was very welcome" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (44 commits) docs: virt: guest-halt-polling.txt convert to ReST docs: kvm: review-checklist.txt: rename to ReST docs: kvm: Convert timekeeping.txt to ReST format docs: kvm: Convert s390-diag.txt to ReST format docs: kvm: Convert ppc-pv.txt to ReST format docs: kvm: Convert nested-vmx.txt to ReST format docs: kvm: Convert mmu.txt to ReST format docs: kvm: Convert locking.txt to ReST format docs: kvm: Convert hypercalls.txt to ReST format docs: kvm: arm/psci.txt: convert to ReST docs: kvm: convert arm/hyp-abi.txt to ReST docs: kvm: Convert api.txt to ReST format docs: kvm: convert devices/xive.txt to ReST docs: kvm: convert devices/xics.txt to ReST docs: kvm: convert devices/vm.txt to ReST docs: kvm: convert devices/vfio.txt to ReST docs: kvm: convert devices/vcpu.txt to ReST docs: kvm: convert devices/s390_flic.txt to ReST docs: kvm: convert devices/mpic.txt to ReST docs: kvm: convert devices/arm-vgit.txt to ReST ...
-
git://git.kernel.org/pub/scm/linux/kernel/git/ras/rasLinus Torvalds authored
Pull EDAC fixes from Borislav Petkov: "Two fixes for use-after-free and memory leaking in the EDAC core, by Robert Richter. Debug options like DEBUG_TEST_DRIVER_REMOVE, KASAN and DEBUG_KMEMLEAK unearthed issues with the lifespan of memory allocated by the EDAC memory controller descriptor due to misdesigned memory freeing, done partially by the EDAC core *and* the driver core, which is problematic to say the least. These two are minimal fixes to take care of stable - a proper rework is following which cleans up that mess properly" * tag 'edac_urgent_for_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/sysfs: Remove csrow objects on errors EDAC/mc: Fix use-after-free and memleaks during device removal
-