No description
Find a file
Jungseung Lee 2d284768b4
mtd: spi-nor: Add generic formula for SR block protection handling
The current mainline locking was restricted and could only be applied
to flashes that have 3 block protection bits and fixed locking ratio.

A new method of normalization was reached at the end of the discussion [1].

    (1) - if bp slot is insufficient.
    (2) - if bp slot is sufficient.

    if (bp_slots_needed > bp_slots)    // (1)
        min_prot_length = sector_size << (bp_slots_needed - bp_slots);
    else                               // (2)
        min_prot_length = sector_size;

This patch changes logic to handle block protection based on min_prot_length.
It is suitable for the overall flashes with exception of some corner cases
(see EON and catalyst) and easy to extend and apply for the case of 2bit or
4bit block protection.

[1] http://lists.infradead.org/pipermail/linux-mtd/2020-February/093934.html

Signed-off-by: Jungseung Lee <js07.lee@samsung.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
2020-03-24 11:43:28 +02:00
arch Bugfixes and improvements to selftests. On top of this, Mauro converted the 2020-02-16 13:01:42 -08:00
block
certs
crypto
Documentation spi: Rewrite mtk-quadspi spi-nor driver with spi-mem 2020-03-13 17:34:13 +02:00
drivers mtd: spi-nor: Add generic formula for SR block protection handling 2020-03-24 11:43:28 +02:00
fs for-5.6-rc1-tag 2020-02-16 11:43:45 -08:00
include mtd: spi-nor: Trim what is exposed in spi-nor.h 2020-03-17 09:28:07 +02:00
init
ipc
kernel
lib
LICENSES
mm
net
samples
scripts
security
sound
tools Bugfixes and improvements to selftests. On top of this, Mauro converted the 2020-02-16 13:01:42 -08:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: update entry after SPI NOR controller move 2020-03-23 18:51:57 +02:00
Makefile Linux 5.6-rc2 2020-02-16 13:16:59 -08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.