[PATCH 2/4] ARM: dts: at91: at91sam9x5cm: even nand memory partitions

2018-10-02 Thread Tudor Ambarus
sam9x5cm, sama5d2_ptc_ek, sama5d3_xplained and sama5d4_xplained nand flashes have a common memory map. Even the nand memory partitions to match our nand flash map available at: http://www.at91.com/linux4sam/pub/Linux4SAM/SambaSubsections//demo_nandflash_map_lnx4sam5x.png Signed-off-by: Tudor

[PATCH 1/4] ARM: dts: at91: sama5d2_ptc_ek: fix bootloader env offsets

2018-10-02 Thread Tudor Ambarus
The offsets for the bootloader environment and its redundant partition were inverted. Fix the addresses to match our nand flash map available at: http://www.at91.com/linux4sam/pub/Linux4SAM/SambaSubsections//demo_nandflash_map_lnx4sam5x.png Signed-off-by: Tudor Ambarus --- arch/arm/boot/dts

[PATCH 0/4] ARM: dts: at91: even nand memory partitions

2018-10-02 Thread Tudor Ambarus
sam9x5cm, sama5d2_ptc_ek, sama5d3_xplained and sama5d4_xplained nand flashes have a common memory map. Even the nand memory partitions to match our NAND flash map available at: http://www.at91.com/linux4sam/pub/Linux4SAM/SambaSubsections//demo_nandflash_map_lnx4sam5x.png Tudor Ambarus (4): ARM

[PATCH 3/4] ARM: dts: at91: sama5d3_xplained: even nand memory partitions

2018-10-02 Thread Tudor Ambarus
sama5d3_xplained, sam9x5cm, sama5d2_ptc_ek and sama5d4_xplained nand flashes have a common memory map. Even the nand memory partitions to match our nand flash map available at: http://www.at91.com/linux4sam/pub/Linux4SAM/SambaSubsections//demo_nandflash_map_lnx4sam5x.png Signed-off-by: Tudor

[PATCH 4/4] ARM: dts: at91: sama5d4_xplained: even nand memory partitions

2018-10-02 Thread Tudor Ambarus
sama5d4_xplained, ssam9x5cm, sama5d2_ptc_ek and sama5d3_xplained nand flashes have a common memory map. Even the nand memory partitions to match our NAND flash map available at: http://www.at91.com/linux4sam/pub/Linux4SAM/SambaSubsections//demo_nandflash_map_lnx4sam5x.png Signed-off-by: Tudor

Re: [PATCH v2] mtd: rawnand: atmel: Fix potential NULL pointer dereference

2018-09-19 Thread Tudor Ambarus
o, we better don't take any chances and fix this by null > checking pointer *nfc_np* before calling of_clk_get(). > > Addresses-Coverity-ID: 1473052 ("Dereference null return value") > Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")

Re: [RESEND PATCH 2/2] mtd: spi-nor: add entry for mt35xu512aba flash

2018-09-19 Thread Tudor Ambarus
Hi, On 09/19/2018 07:50 AM, Yogesh Gaur wrote: > Add entry for mt35xu512aba Micron NOR flash. > This flash is having uniform sector erase size of 128KB, have > support of FSR(flag status register), flash size is 64MB and > supports 4-byte commands. > Seems that the datasheet for mt35xu512aba is

Re: [RESEND PATCH 1/2] mtd: spi-nor: add macros related to MICRON flash

2018-09-19 Thread Tudor Ambarus
Hi, On 09/19/2018 07:50 AM, Yogesh Gaur wrote: > Some MICRON related macros in spi-nor domain were ST. > Rename entries related to STMicroelectronics under macro SNOR_MFR_ST. > > Added entry of MFR Id for Micron flashes, 0x002C. > > Signed-off-by: Yogesh Gaur > --- > drivers/mtd/spi-nor/spi-no

Re: [RESEND PATCH 1/2] mtd: spi-nor: add macros related to MICRON flash

2018-09-20 Thread Tudor Ambarus
>>> diff --git a/drivers/mtd/spi-nor/spi-nor.c >>> @@ -271,6 +271,7 @@ static inline int set_4byte(struct spi_nor *nor, const >> struct flash_info *info, >>> u8 cmd; >>> >>> switch (JEDEC_MFR(info)) { >>> + case SNOR_MFR_ST: >> >> We should mark switch cases where we are expecting to fa

Re: [RESEND PATCH v2 1/3] mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories

2018-09-10 Thread Tudor Ambarus
Marek, On 09/07/2018 11:31 PM, Marek Vasut wrote: > On 09/07/2018 10:51 AM, Tudor Ambarus wrote: >> Thanks Marek, >> >> On 09/03/2018 08:37 PM, Marek Vasut wrote: >>> On 08/27/2018 12:26 PM, Tudor Ambarus wrote: >>> [...] >>> >>>> +/*

[PATCH v2 3/3] mtd: spi-nor: add support for Microchip SST26 QSPI flash memories

2018-09-11 Thread Tudor Ambarus
The flash memories are write-protected by default at power-on and must be unlocked first, before being erased, then programmed. The erase block sizes are not uniform. The memory layout is uniform just for the 4K sector blocks. Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/spi-nor.c | 20

[PATCH v2 0/3] mtd: spi-nor: add Global Block Unlock support

2018-09-11 Thread Tudor Ambarus
Cyrille's reviewed-by tag - add cover letter - fix link to initial work done by Anurag Kumar Vulisha Tudor Ambarus (3): mtd: spi-nor: add Global Block Unlock support mtd: spi-nor: unlock global block protection on sst26vf064b mtd: spi-nor: add support for Microchip SST26 QSPI flash mem

[PATCH v2 2/3] mtd: spi-nor: unlock global block protection on sst26vf064b

2018-09-11 Thread Tudor Ambarus
To avoid inadvertent writes during power-up, sst26vf064b is write-protected by default after a power-on reset cycle. Unlock the serial flash memory by using the Global Block Protection Unlock command - it offers a single command cycle that unlocks the entire memory array. Signed-off-by: Tudor

[PATCH v2 1/3] mtd: spi-nor: add Global Block Unlock support

2018-09-11 Thread Tudor Ambarus
Macronix's MX25U12835F names it Gang Block Unlock, Winbound's W25Q128FV names it Global Block Unlock and Microchip's SST26VF064B names it Global Block Protection Unlock. Based on initial work done by Anurag Kumar Vulisha: https://lkml.org/lkml/2015/11/13/307 Signed-off-by: Tudor Amba

[PATCH v3 1/2] mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories

2018-09-11 Thread Tudor Ambarus
come back to the uniform case. The 'erase with the best command, move forward and repeat' approach was suggested by Cristian Birsan in a brainstorm session, so: Suggested-by: Cristian Birsan Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/

[PATCH v3 2/2] mtd: spi-nor: parse SFDP Sector Map Parameter Table

2018-09-11 Thread Tudor Ambarus
: Tudor Ambarus --- drivers/mtd/spi-nor/spi-nor.c | 316 +++--- include/linux/mtd/spi-nor.h | 12 ++ 2 files changed, 312 insertions(+), 16 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 4687345..fbefcdb 100644

[PATCH v3 0/2] add support to non-uniform SFDP SPI NOR flash memories

2018-09-11 Thread Tudor Ambarus
command is found. - determine at init if there are erase types that can erase the entire memory - fix support for overlaid regions. Tudor Ambarus (2): mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories mtd: spi-nor: parse SFDP Sector Map Parameter Table drivers/mtd/spi-nor/sp

[PATCH] mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories

2018-06-08 Thread Tudor Ambarus
come back to the uniform case. The 'erase with the best command, move forward and repeat' approach was suggested by Cristian Birsan in a brainstorm session, so: Suggested-by: Cristian Birsan Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/

[PATCH] add support to non-uniform SFDP SPI NOR flash memories

2018-06-08 Thread Tudor Ambarus
ted once we validate that the erase can be performed - fix walking through the address space in overlaid regions - drop wall-of-text description commit message, change author Tudor Ambarus (1): mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories drivers/mtd/spi

Re: [RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-21 Thread Tudor Ambarus
Hi, Marek, On 05/21/2018 02:35 PM, Marek Vasut wrote: On 05/18/2018 11:32 AM, Tudor Ambarus wrote: From: Cyrille Pitchen This patch is a first step in introducing the support of SPI memories with non-uniform erase sizes like Spansion s25fs512s. It introduces the memory erase map which

Re: [RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-21 Thread Tudor Ambarus
Hi, Marek, On 05/21/2018 07:59 PM, Marek Vasut wrote: On 05/21/2018 06:42 PM, Tudor Ambarus wrote: Hi, Marek, [...] This is a transitional patch: non-uniform erase maps will be used later when initialized based on the SFDP data. What about non-SFDP non-linear flashes ? Non-SFDP non

Re: support for non-uniform SPI NOR flash memories

2018-05-09 Thread Tudor Ambarus
On 05/07/2018 08:14 PM, Marek Vasut wrote: But indeed there are -- to my knowledge -- no flashes with interleaved erase blocks. And yes, there could be improvement in erasing exactly the required chunk of flash with a fitting opcode:) Thanks Marek. Other improvement would be to minimize the a

support for non-uniform SPI NOR flash memories

2018-05-07 Thread Tudor Ambarus
Hi, Marek, all, I'm studying Cyrille's patch for non-uniform SPI NOR flash memories: https://lkml.org/lkml/2017/4/15/70. It's not clear to me whether interleaved regions are possible or not. I read the JEDEC Standard No. 216B and it looks like each region is well delimited, there is no such thin

Re: [PATCH v2] mtd: spi-nor: Add support for Winbond w25q64jvm spi flash

2020-07-03 Thread Tudor Ambarus
nd: Add support for w25q64jvm https://git.kernel.org/mtd/c/0ee2872f10 Best regards, -- Tudor Ambarus

Re: [PATCH] mtd: spi-nor: Add support for Macronix MX25R1635F

2020-07-03 Thread Tudor Ambarus
nd to the mtd device and > the 'flash_erase' command. Applied to spi-nor/next, thanks! [1/1] mtd: spi-nor: macronix: Add support for MX25R1635F https://git.kernel.org/mtd/c/482dcb2a04 Best regards, -- Tudor Ambarus

[RFC PATCH 1/3] mtd: spi-nor: Introduce SNOR_F_IO_MODE_EN_VOLATILE

2020-09-29 Thread Tudor Ambarus
t are set via a non-volatile bit. SPI_NOR_IO_MODE_EN_VOLATILE should be set just for the flashes that don't define the optional SFDP SCCR Map, so that we don't pollute the flash info flags. Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/core.c | 6 ++ drivers/mtd/spi-nor/core.

[RFC PATCH 3/3] mtd: spi-nor: Parse SFDP SCCR Map

2020-09-29 Thread Tudor Ambarus
avoid this way polluting the flash flags when declaring one. Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/sfdp.c | 52 ++ 1 file changed, 52 insertions(+) diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c index f192710aca31..7bca64cbba

[RFC PATCH 0/3] mtd: spi-nor: Tackle stateful modes

2020-09-29 Thread Tudor Ambarus
My biggest concern with Pratyush's patches is that the stateful modes case (X-X-X modes that are entered via a non-volatile bit) is not handled. This is an attempt to tackle this problem. Reasons and explanations in the commit messages. Tudor Ambarus (3): mtd: spi-nor: Intr

[RFC PATCH 2/3] mtd: spi-nor: Introduce MTD_SPI_NOR_ALLOW_STATEFUL_MODES

2020-09-29 Thread Tudor Ambarus
flash from a stateful mode in kernel, entering the stateful mode is still dangerous if one's bootloader can't handle it. We need a way to pass the responsibility to the user and let him decide conciously about the risks of allowing stateful modes. Signed-off-by: Tudor Ambarus ---

Re: [PATCH] mtd: spi-nor: intel-spi: Simulate WRDI command

2020-07-27 Thread Tudor Ambarus
WRDI command https://git.kernel.org/mtd/c/44a80df4bfce Best regards, -- Tudor Ambarus

Re: [PATCH v2 1/1] drivers: mtd: spi-nor: update read capabilities for w25q64 and s25fl064k

2020-07-27 Thread Tudor Ambarus
mtd: spi-nor: update read capabilities for w25q64 and s25fl064k https://git.kernel.org/mtd/c/99eae48fd4c5 Best regards, -- Tudor Ambarus

[PATCH] spi: atmel-quadspi: Use optimezed memcpy_fromio()/memcpy_toio()

2020-07-15 Thread Tudor Ambarus
write speed is 4524 KiB/s mtd_speedtest: eraseblock read speed is 21186 KiB/s Signed-off-by: Tudor Ambarus --- drivers/spi/Kconfig | 2 +- drivers/spi/atmel-quadspi.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/spi/Kconfig b/drivers/spi

[PATCH trivial] spi: Fix SPI NOR and SPI NAND acronyms

2020-07-15 Thread Tudor Ambarus
The industry refers to these flash types as "SPI NOR" and "SPI NAND". Be consistent and use the same acronyms. Signed-off-by: Tudor Ambarus --- drivers/spi/Kconfig| 10 +- drivers/spi/spi-fsl-qspi.c | 2 +- drivers/spi/spi-orion.c| 2 +- 3 files changed

Re: [PATCH] mtd: revert "spi-nor: intel: provide a range for poll_timout"

2020-07-28 Thread Tudor Ambarus
00) > [ 544.351528] intel_spi_read(from=200, len=40) > [ 544.351528] intel_spi_read(from=200, len=40) > End MTD read > > [...] Applied to spi-nor/next, thanks! [1/1] mtd: revert "spi-nor: intel: provide a range for poll_timout" https://git.kernel.org/mtd/c/e93a977367b2 Best regards, -- Tudor Ambarus

[PATCH 0/3] mtd: rawnand: Fix HW ECC handling

2020-09-17 Thread Tudor Ambarus
: NAND scan failed: -22 atmel-nand-controller: probe of 1000.ebi:nand-controller failed with error -22 Tudor Ambarus (3): mtd: rawnand: Fix wrongful fallthrough NAND_ECC_SOFT mtd: rawnand: Introduce nand_set_ecc_on_host_ops() mtd: rawnand: Don't overwrite the error code

[PATCH 1/3] mtd: rawnand: Fix wrongful fallthrough NAND_ECC_SOFT

2020-09-17 Thread Tudor Ambarus
ot;switch (ecc->mode)" statement, and when a fallback to SW ECC is needed, we fallthrough "case NAND_ECC_SOFT". Fixes: d3f8ec8e979b ("mtd: rawnand: Separate the ECC engine type and the ECC byte placement") Reported-by: Santiago Esteban Signed-off-by: Tudor Ambarus ---

[PATCH 2/3] mtd: rawnand: Introduce nand_set_ecc_on_host_ops()

2020-09-17 Thread Tudor Ambarus
There were too many levels of indentation and the code was hard to read. Introduce a new function, similar to nand_set_ecc_soft_ops(). Signed-off-by: Tudor Ambarus --- drivers/mtd/nand/raw/nand_base.c | 114 +-- 1 file changed, 61 insertions(+), 53 deletions(-) diff

[PATCH 3/3] mtd: rawnand: Don't overwrite the error code from nand_set_ecc_soft_ops()

2020-09-17 Thread Tudor Ambarus
The error code received from nand_set_ecc_soft_ops() was overwritten, drop this redundant assignment and use the error code received from the callee. Signed-off-by: Tudor Ambarus --- drivers/mtd/nand/raw/nand_base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers

Re: [PATCH] Crypto: atmel-ecc: Make a couple of local functions static

2017-07-20 Thread Tudor Ambarus
7; was not declared. Should it be static? symbol 'atmel_ecc_i2c_client_free' was not declared. Should it be static? Signed-off-by: Colin Ian King Acked-by: Tudor Ambarus Thanks, ta

Re: [PATCH] crypto: atmel: Delete error messages for a failed memory allocation in six functions

2018-02-16 Thread Tudor Ambarus
On 02/15/2018 02:24 PM, SF Markus Elfring wrote: From: Markus Elfring Date: Thu, 15 Feb 2018 11:38:30 +0100 Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Tudor

<    1   2