[PATCH] lib: asn1_decoder - add MODULE_LICENSE("GPL")

2016-04-29 Thread Tudor Ambarus
e has been inserted, which is not the case here. Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> --- lib/asn1_decoder.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c index 2b3f46c..b1ffcab 100644 --- a/lib/asn1_decoder.c +++ b/lib/asn1_de

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

2017-07-20 Thread Tudor Ambarus
symbol 'atmel_ecc_i2c_client_alloc' 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 <colin.k...@canonical.com> Acked-by: Tudor Ambarus <tudor.amba...@microchip.com> Thanks, ta

Re: [PATCH] crypto: ccm - preserve the IV buffer

2017-11-02 Thread Tudor Ambarus
uest_set_callback(skreq, pctx->flags, crypto_ccm_decrypt_done, req); Reviewed-by: Tudor Ambarus <tudor.amba...@microchip.com>

Re: [PATCH 2/2] crypto: atmel-aes - Reset the controller before each use

2017-11-06 Thread Tudor Ambarus
Hi, Romain, On 10/31/2017 05:25 PM, Romain Izard wrote: When using the rfc4543(gcm(aes))) mode, the registers of the hardware engine are not empty after use. If the engine is not reset before its next use, the following results will be invalid. Always reset the hardware engine. Thanks for

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

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

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

2018-05-18 Thread Tudor Ambarus
ed-by: Cristian Birsan <cristian.bir...@microchip.com> Signed-off-by: Tudor Ambarus <tudor.amba...@microchip.com> --- drivers/mtd/spi-nor/spi-nor.c | 281 +++--- include/linux/mtd/spi-nor.h | 89 + 2 files changed, 356 insertions(+),

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 <cyrille.pitc...@microchip.com> This patch is a first step in introducing the support of SPI memories with non-uniform erase sizes like Spansion s25fs512s. It intr

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: [RFC PATCH] mtd: spi-nor: add support to non-uniform SPI NOR flash memories

2018-05-23 Thread Tudor Ambarus
Hi, Marek, On 05/23/2018 12:56 PM, Marek Vasut wrote: [...] [...] +while (len) { +cmd = spi_nor_find_best_erase_cmd(map, region, addr, len); +if (!cmd) +return -EINVAL; What would happen if you realize mid-way that you cannot erase some sector , do you end up

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

2018-05-24 Thread Tudor Ambarus
Hi, Marek, On 05/23/2018 03:54 PM, Marek Vasut wrote: On 05/23/2018 02:52 PM, Tudor Ambarus wrote: Hi, Marek, Hi, On 05/23/2018 12:56 PM, Marek Vasut wrote: [...] [...] +while (len) { +cmd = spi_nor_find_best_erase_cmd(map, region, addr, len); +if (!cmd

Re: [PATCH] mtd: nand: raw: atmel: add module param to avoid using dma

2018-05-25 Thread Tudor Ambarus
Hi, Peter, On 04/11/2018 06:34 PM, Nicolas Ferre wrote: I'll try to move forward with your detailed explanation and with my contacts within the "product" team internally. We have talked with the hardware team, looks like there is an error in the description of the Master to Slave Access

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

2018-06-08 Thread Tudor Ambarus
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/spi-nor.c | 357

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

2018-06-08 Thread Tudor Ambarus
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-nor/spi-nor.c | 357

Re: [PATCH] mtd: nand: raw: atmel: add module param to avoid using dma

2018-06-04 Thread Tudor Ambarus
Hi, Peter, On 05/28/2018 01:10 PM, Peter Rosin wrote: [cut] So, I think I want either A) the NAND controller to use master 1 DMAC0/IF0 (i.e. slave 8 DDR2 port 2) and the LCDC to use master 9 (i.e. slave 9 DDR2 Port 3) or B) the NAND controller to use master 2 DMAC0/IF1 (i.e. slave 7

Re: [RFC PATCH 1/2] spi: Add QuadSPI driver for Atmel SAMA5D2

2018-06-26 Thread Tudor Ambarus
Hi, Piotr, General things to consider for the limitation in performance: - is the serial flash memory operating in Quad SPI? - QSCLK should be as high as possible - transfer delays - I checked them, they have default values, we should be good. - use DMA, as you suggested On 06/22/2018 10:39 AM,

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

2018-02-16 Thread Tudor Ambarus
Markus Elfring<elfr...@users.sourceforge.net> Reviewed-by: Tudor Ambarus <tudor.amba...@microchip.com>

[PATCH 0/2] i2c: enable buses to save their clock frequency in adapter

2018-08-01 Thread Tudor Ambarus
assumption of the clock frequency. Spare the i2c clients of making wrong assumptions of the i2c bus clock frequency and enable the buses to save their clock frequency in adapter. since rfc: - reword commit messages Tudor Ambarus (2): i2c: enable buses to save their clock frequency in adapter i2c

[PATCH 2/2] i2c: at91: Save the bus clock frequency in adapter

2018-08-01 Thread Tudor Ambarus
assumption of the clock frequency. Spare the i2c clients of making wrong assumptions of the i2c bus clock frequency and provide the bus clock frequency in adapter. Signed-off-by: Tudor Ambarus Acked-by: Ludovic Desroches --- drivers/i2c/busses/i2c-at91.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH 1/2] i2c: enable buses to save their clock frequency in adapter

2018-08-01 Thread Tudor Ambarus
assumption of the clock frequency. Spare the i2c clients of making wrong assumptions of the i2c bus clock frequency and enable the buses to save their clock frequency in adapter. Signed-off-by: Tudor Ambarus --- include/linux/i2c.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux

Re: [PATCH v2 0/3] add support to non-uniform SFDP SPI NOR flash memories

2018-07-30 Thread Tudor Ambarus
As a side note, the SFDP code increases its size, it would make sense to move all SFDP logic into a spi-nor-sfdp.c file. I'm volunteering to do this after this patch set gets applied. Best, ta

Re: [PATCH v2 0/3] add support to non-uniform SFDP SPI NOR flash memories

2018-08-20 Thread Tudor Ambarus
Hi, Marek, Did you have the chance to look over these patches? Please advise how can I move forward with the non-uniform erase support. Thanks, ta On 07/12/2018 08:32 PM, Tudor Ambarus wrote: > Backward compatibility test done on mx25l3273fm2i-08g. > Non-uniform erase test done on sst26

[RESEND PATCH v2 3/3] mtd: spi-nor: parse SFDP 4-byte Address Instruction Table

2018-08-27 Thread Tudor Ambarus
the Base Address Register (BAR). Signed-off-by: Cyrille Pitchen Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/spi-nor.c | 148 ++ 1 file changed, 148 insertions(+) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index

[RESEND PATCH v2 0/3] add support to non-uniform SFDP SPI NOR flash memories

2018-08-27 Thread Tudor Ambarus
entire memory - fix support for overlaid regions. Cyrille Pitchen (1): mtd: spi-nor: parse SFDP 4-byte Address Instruction Table 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/sp

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

2018-08-27 Thread Tudor Ambarus
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/spi-nor.c | 475

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

2018-08-27 Thread Tudor Ambarus
-by: Tudor Ambarus --- drivers/mtd/spi-nor/spi-nor.c | 269 +++--- include/linux/mtd/spi-nor.h | 11 ++ 2 files changed, 264 insertions(+), 16 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index c1e8169..522d5aa 100644

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

2018-07-17 Thread Tudor Ambarus
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://patchwork.kernel.org/patch/7611271/ Signed-off-by: Tudor Ambarus --- drivers

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

2018-07-17 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. Based on initial work done by Cyrille Pitchen. Signed-off-by: Tudor

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

2018-07-17 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

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

2018-09-07 Thread Tudor Ambarus
Thanks Marek, On 09/03/2018 08:37 PM, Marek Vasut wrote: > On 08/27/2018 12:26 PM, Tudor Ambarus wrote: > [...] > >> +/* JEDEC JESD216B Standard imposes erase sizes to be power of 2. */ >> +static inline u64 >> +spi_nor_div_by_erase_size(const struc

Re: [RESEND PATCH v2 2/3] mtd: spi-nor: parse SFDP Sector Map Parameter Table

2018-09-07 Thread Tudor Ambarus
On 09/03/2018 08:40 PM, Marek Vasut wrote: > On 08/27/2018 12:26 PM, Tudor Ambarus wrote: > [...] >> +static const u32 *spi_nor_get_map_in_use(struct spi_nor *nor, const u32 >> *smpt) >> +{ >> +const u32 *ret = NULL; >> +u32 i, addr; >> +i

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 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 memories

[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
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 Ambarus Reviewed-by: Cyrille

[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

Re: [PATCH v2] mtd: atmel-quadspi: add suspend/resume hooks

2018-07-04 Thread Tudor Ambarus
. Otherwise looks good. I've also looked over the test with suspending while copying on a ubifs mounted on QSPI NOR, looks good too. After checking the return value, please add: Reviewed-by: Tudor Ambarus Best, ta > + > + return atmel_qspi_init(aq); > +} > + > +static SI

Re: [PATCH 2/3] mtd: atmel nand: fix build warning on 64-bit

2018-07-13 Thread Tudor Ambarus
Hi, Arnd, On 07/09/2018 06:57 PM, Arnd Bergmann wrote: > + nc->ebi_csa_offs = (uintptr_t)match->data; I guess we should declare ebi_csa_offs as size_t, right? Best, ta

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

2018-07-12 Thread Tudor Ambarus
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/spi-nor.c | 475

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

2018-07-12 Thread Tudor Ambarus
-by: Tudor Ambarus --- drivers/mtd/spi-nor/spi-nor.c | 269 +++--- include/linux/mtd/spi-nor.h | 11 ++ 2 files changed, 264 insertions(+), 16 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 899b8c1..7c6291c 100644

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

2018-07-12 Thread Tudor Ambarus
erate them from the biggest to the smallest and stop when best fitted command is found. - determine at init if there are erase types that can erase the entire memory - fix support for overlaid regions. Cyrille Pitchen (1): mtd: spi-nor: parse SFDP 4-byte Address Instruction Table Tudor Amb

[PATCH v2 3/3] mtd: spi-nor: parse SFDP 4-byte Address Instruction Table

2018-07-12 Thread Tudor Ambarus
the Base Address Register (BAR). Signed-off-by: Cyrille Pitchen Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/spi-nor.c | 148 ++ 1 file changed, 148 insertions(+) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index

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

2018-07-09 Thread Tudor Ambarus
Hi, I will send a v2 in few days, together with the parsers for the optional SFDP tables: Sector Map Parameter table and 4-byte Address Instruction table. Below I detail what I'll change in v2 for this patch. On 06/08/2018 04:48 PM, Tudor Ambarus wrote: > Based on Cyrille Pitchen's patch ht

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

2018-09-11 Thread Tudor Ambarus
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/spi-nor.c | 594

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

2018-09-11 Thread Tudor Ambarus
-by: 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
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/spi-nor.c | 910 ++

Re: [PATCH] crypto/ecc: Remove stack VLA usage

2018-03-08 Thread Tudor Ambarus
Hi, Kees, On 03/07/2018 11:56 PM, Kees Cook wrote: On the quest to remove all VLAs from the kernel[1], this switches to a pair of kmalloc regions instead of using the stack. This also moves the get_random_bytes() after all allocations (and drops the needless "nbytes" variable). [1]

Re: [PATCH] crypto/ecc: Remove stack VLA usage

2018-03-09 Thread Tudor Ambarus
On 03/08/2018 11:55 PM, Kees Cook wrote: Looks like there are few intermediate buffers in ecc that should be zeroized as well. Can you send a patch for those? Yeah, I'll take a look. Best, ta

Re: [PATCH v2] crypto/ecc: Remove stack VLA usage

2018-03-09 Thread Tudor Ambarus
l.org/lkml/2018/3/7/621 Signed-off-by: Kees Cook<keesc...@chromium.org> Reviewed-by: Tudor Ambarus <tudor.amba...@microchip.com>

Re: [PATCH v2 1/2] crypto: ccree: enable support for hardware keys

2018-04-25 Thread Tudor Ambarus
Hi, Gilad, On 04/23/2018 10:25 AM, Gilad Ben-Yossef wrote: Enable CryptoCell support for hardware keys. Hardware keys are regular AES keys loaded into CryptoCell internal memory via firmware, often from secure boot ROM or hardware fuses at boot time. As such, they can be used for enc/dec

Re: [RFC PATCH 1/2] spi: Add QuadSPI driver for Atmel SAMA5D2

2018-06-28 Thread Tudor Ambarus
Hi, Piotr, On 06/27/2018 10:52 AM, Piotr Bugalski wrote: > >> General things to consider for the limitation in performance: >> - is the serial flash memory operating in Quad SPI? > > Yes, I've checked signal using logic analyzer, data is transferred using > all four lines. > >> - QSCLK should

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

2018-10-11 Thread Tudor Ambarus
ECT_4K | USE_FSR | SPI_NOR_4B_OPCODES) }, > + The style is slightly different from what Brian proposed back in 9648388fc7737365be7a8092e77df78ccc2cd1a4. For consistency reasons, I think we should use the same style in all entries. Since I verified the correctness of the patch and my comment targets just a cosmetic change, I'll let the maintainers decide: Reviewed-by: Tudor Ambarus

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

2018-10-22 Thread Tudor Ambarus
Hi, Please amend this as well. Thanks! --- drivers/mtd/spi-nor/spi-nor.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 3a9b69e9ba6d..3019708696cd 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++

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

2018-10-17 Thread Tudor Ambarus
Hi, Yogesh, On 10/17/2018 10:46 AM, Yogesh Narayan Gaur wrote: > Hi Boris, > >> -Original Message- >> From: Boris Brezillon [mailto:boris.brezil...@bootlin.com] >> Sent: Wednesday, October 17, 2018 1:00 PM >> To: Yogesh Narayan Gaur >> Cc: Cyrille P

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

2018-10-16 Thread Tudor Ambarus
h Gaur > >> -Original Message- >> From: linux-mtd [mailto:linux-mtd-boun...@lists.infradead.org] On Behalf Of >> Tudor Ambarus >> Sent: Tuesday, September 11, 2018 9:10 PM >> To: marek.va...@gmail.com; dw...@infradead.org; >> computersfor

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

2018-10-08 Thread Tudor Ambarus
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 Reviewed

[PATCH v2 2/2] ARM: dts: at91: at91sam9x5cm: fix addressable nand flash size

2018-10-02 Thread Tudor Ambarus
at91sam9x5cm comes with a 2Gb NAND flash. Fix the rootfs size to match this limit. Signed-off-by: Tudor Ambarus Acked-by: Ludovic Desroches --- v2: - collect Ludovic's Acked-by arch/arm/boot/dts/at91sam9x5cm.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm

[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

[PATCH v2 1/2] ARM: dts: at91: sama5d4_xplained: fix addressable nand flash size

2018-10-02 Thread Tudor Ambarus
sama5d4_xplained comes with a 4Gb NAND flash. Increase the rootfs size to match this limit. Signed-off-by: Tudor Ambarus Acked-by: Ludovic Desroches --- v2: - fix typo in subject line - collect Ludovic's Acked-by arch/arm/boot/dts/at91-sama5d4_xplained.dts | 2 +- 1 file changed, 1 insertion

[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 2/2] ARM: dts: at91: at91sam9x5cm: fix addressable nand flash size

2018-10-02 Thread Tudor Ambarus
at91sam9x5cm comes with a 2Gb NAND flash. Fix the rootfs size to match this limit. Signed-off-by: Tudor Ambarus --- arch/arm/boot/dts/at91sam9x5cm.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/at91sam9x5cm.dtsi b/arch/arm/boot/dts/at91sam9x5cm.dtsi

[PATCH 1/2] ARM: dts: at91: sama5d4_xplained: fix addresable nand flash size

2018-10-02 Thread Tudor Ambarus
sama5d4_xplained comes with a 4Gb NAND flash. Increase the rootfs size to match this limit. Signed-off-by: Tudor Ambarus --- arch/arm/boot/dts/at91-sama5d4_xplained.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/at91-sama5d4_xplained.dts b/arch/arm

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 > --- >

Re: [PATCH] mtd: spi-nor: cadence-quadspi: Use proper enum for dma_unmap_single

2018-09-25 Thread Tudor Ambarus
Hi, Nathan, On 09/21/2018 01:29 PM, Nathan Chancellor wrote: > Clang warns when one enumerated type is converted implicitly to another. > > drivers/mtd/spi-nor/cadence-quadspi.c:962:47: warning: implicit > conversion from enumeration type 'enum dma_transfer_direction' to > different enumeration

Re: [PATCH] mtd: spi-nor: cadence-quadspi: Use proper enum for dma_unmap_single

2018-09-25 Thread Tudor Ambarus
On 09/25/2018 10:34 AM, Nathan Chancellor wrote: > On Tue, Sep 25, 2018 at 10:24:04AM +0300, Tudor Ambarus wrote: >> Hi, Nathan, >> >> On 09/21/2018 01:29 PM, Nathan Chancellor wrote: >>> Clang warns when one enumerated type is converted implicitly to anothe

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

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

2018-09-17 Thread Tudor Ambarus
Hi, Boris, On 09/11/2018 06:40 PM, Tudor Ambarus wrote: > diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c [cut] > /* I missed to use the opening comment mark for kernel-doc comments: "/**". This observation applies to all newly introduced funct

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: [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

Re: [PATCH] crypto/ecc: Remove stack VLA usage

2018-03-08 Thread Tudor Ambarus
Hi, Kees, On 03/07/2018 11:56 PM, Kees Cook wrote: On the quest to remove all VLAs from the kernel[1], this switches to a pair of kmalloc regions instead of using the stack. This also moves the get_random_bytes() after all allocations (and drops the needless "nbytes" variable). [1]

Re: [PATCH] crypto/ecc: Remove stack VLA usage

2018-03-09 Thread Tudor Ambarus
On 03/08/2018 11:55 PM, Kees Cook wrote: Looks like there are few intermediate buffers in ecc that should be zeroized as well. Can you send a patch for those? Yeah, I'll take a look. Best, ta

Re: [PATCH v2] crypto/ecc: Remove stack VLA usage

2018-03-09 Thread Tudor Ambarus
l.org/lkml/2018/3/7/621 Signed-off-by: Kees Cook Reviewed-by: Tudor Ambarus

Re: [PATCH v2 1/2] crypto: ccree: enable support for hardware keys

2018-04-25 Thread Tudor Ambarus
Hi, Gilad, On 04/23/2018 10:25 AM, Gilad Ben-Yossef wrote: Enable CryptoCell support for hardware keys. Hardware keys are regular AES keys loaded into CryptoCell internal memory via firmware, often from secure boot ROM or hardware fuses at boot time. As such, they can be used for enc/dec

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

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

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

2018-05-18 Thread Tudor Ambarus
ata when traversing the regions. - backward compatibility test done on MX25L25673G. 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-

Re: [PATCH] crypto: ccm - preserve the IV buffer

2017-11-02 Thread Tudor Ambarus
m_decrypt_done, req); Reviewed-by: Tudor Ambarus

Re: [PATCH 2/2] crypto: atmel-aes - Reset the controller before each use

2017-11-06 Thread Tudor Ambarus
Hi, Romain, On 10/31/2017 05:25 PM, Romain Izard wrote: When using the rfc4543(gcm(aes))) mode, the registers of the hardware engine are not empty after use. If the engine is not reset before its next use, the following results will be invalid. Always reset the hardware engine. Thanks for

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

2017-07-20 Thread Tudor Ambarus
' 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

[PATCH v3 2/2] mtd: spi-nor: sst: Add support for Global Unlock on sst26vf

2021-01-21 Thread Tudor Ambarus
MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y. Signed-off-by: Tudor Ambarus --- v3: - s/Winbound/Winbond/ - read CR.BPNV and check if we can really unlock the entire flash array - sst26vf_unlock: return -EINVAL instead of -EOPNOTSUPP when caller asks to unlock a range/granularity that we can't unlock v2: v2: s/!ofs

[PATCH v3 1/2] mtd: spi-nor: Add Global Block Unlock command

2021-01-21 Thread Tudor Ambarus
in the Individual Block Protection mode, which is mutually exclusive with the Block Protection mode (BP0-3). Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Reviewed-by: Michael Walle --- v3: - s/Winbound/Winbond - Add Michael's R-b tag v2: - s/mutual/mutually/ - set the GBULK cmd

[PATCH 2/2] mtd: spi-nor: sst: Add support for Global Unlock on sst26vf

2021-01-20 Thread Tudor Ambarus
MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y. Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/sst.c | 38 -- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/spi-nor/sst.c b/drivers/mtd/spi-nor/sst.c index 00e48da0744a..1cd2a360c41e 100644

[PATCH 1/2] mtd: spi-nor: Add Global Block Unlock command

2021-01-20 Thread Tudor Ambarus
. Used in the Individual Block Protection mode, which is mutual exclusive with the Block Protection mode (BP0-3). Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/core.c | 35 +++ drivers/mtd/spi-nor/core.h | 1 + include/linux/mtd/spi-nor.h | 1 + 3 files

Re: [PATCH] mtd: spi-nor: hisi-sfc: Put child node np on error path

2021-01-24 Thread Tudor Ambarus
On Thu, 21 Jan 2021 01:18:47 -0800, Pan Bian wrote: > Put the child node np when it fails to get or register device. Applied to spi-nor/next, thanks! [1/1] mtd: spi-nor: hisi-sfc: Put child node np on error path https://git.kernel.org/mtd/c/fe6653460ee7 Best regards, -- Tudor Ambarus

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

2020-09-29 Thread Tudor Ambarus
that 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.h | 6 ++ 2

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

2020-09-29 Thread Tudor Ambarus
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..7bca64cbba02 100644

[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: Introduce

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

2020-09-29 Thread Tudor Ambarus
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 --- drivers/mtd/spi-nor

[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 from

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

2020-09-17 Thread Tudor Ambarus
quot;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

[PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-09 Thread Tudor Ambarus
Make sure the max_speed_hz of spi_device does not override the max_speed_hz of controller. Signed-off-by: Tudor Ambarus --- drivers/spi/spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index cd3c395b4e90..51d7c004fbab 100644

[PATCH] spi: Fix the clamping of spi->max_speed_hz

2020-12-16 Thread Tudor Ambarus
avoid a superfluous init to zero when both spi->max_speed_hz and spi->controller->max_speed_hz are zero. Fixes: 9326e4f1e5dd ("spi: Limit the spi device max speed to controller's max speed") Reported-by: Geert Uytterhoeven Suggested-by: Geert Uytterhoeven Signed-off-by: Tudor Ambaru

[PATCH] clk: at91: sama5d2: Mark device OF_POPULATED after setup

2021-01-28 Thread Tudor Ambarus
. Fixes: e590474768f1cc04 ("driver core: Set fw_devlink=on by default") Signed-off-by: Tudor Ambarus --- I'll be out of office, will check the rest of the at91 SoCs at the begining of next week. drivers/clk/at91/sama5d2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/driver

[PATCH] clk: at91: Fix the declaration of the clocks

2021-02-03 Thread Tudor Ambarus
ers caused the fail at boot. Signed-off-by: Tudor Ambarus --- Tested on sama5d2_xplained. drivers/clk/at91/at91rm9200.c | 3 +-- drivers/clk/at91/at91sam9260.c | 16 drivers/clk/at91/at91sam9g45.c | 3 +-- drivers/clk/at91/at91sam9n12.c | 3 +-- drivers/clk/at91/at91sam9

  1   2   3   >