Re: [PATCH v2 1/6] mtd: ubi: Do not zero out EC and VID on ECC-ed NOR flashes

2024-04-29 Thread Pratyush Yadav
nd VID for such flashes. A writesize > 1 is an > indication of an ECC-ed flash. > > This patch replicates the following upstream linux commit: > f669e74be820 ("ubi: Do not zero out EC and VID on ECC-ed NOR flashes") > > Acked-by: Tudor Ambarus > Signed-off-by: Ta

Re: [PATCH v2 3/3] mtd: spi-nor-id: Add S25FS064S, S25FS128S, S25FS256S IDs

2024-04-09 Thread Pratyush Yadav
+ spi_nor_set_read_settings(>reads[SNOR_CMD_READ_1_1_4], > + 0, 8, SPINOR_OP_READ_1_1_4, > + SNOR_PROTO_1_1_4); > + } else { > + params->hwcaps.mask &= ~SNOR_HWCAPS_READ_1_1_2; > +

Re: [PATCH v2 2/3] mtd: spi-nor-id: Use INFO6 macro for S25FL-S

2024-04-09 Thread Pratyush Yadav
On Tue, Apr 09 2024, tkuw584...@gmail.com wrote: > From: Takahiro Kuwano > > The 6th ID byte is needed to distiguish S25FL-S and S25FS-S families. > > Signed-off-by: Takahiro Kuwano Reviewed-by: Pratyush Yadav -- Regards, Pratyush Yadav

Re: [PATCH v2 1/3] mtd: spi-nore-core: Fix 4KB erase opcode for s25fs-s

2024-04-09 Thread Pratyush Yadav
Kuwano Reviewed-by: Pratyush Yadav -- Regards, Pratyush Yadav

Re: [PATCH] mtd: spi-nor: Add support for Infineon S25FS-S family

2024-04-05 Thread Pratyush Yadav
t;s25fs256s", 0x010219, 0x4d0181, 64 * 1024, 512, > SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) }, > { INFO6("s25fs512s", 0x010220, 0x4d0081, 256 * 1024, 256, > SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) }, > { INFO("s25fl512s_256k", 0x010220, 0x4d00, 256 * 1024, 256, > SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) }, > { INFO("s25fl512s_64k", 0x010220, 0x4d01, 64 * 1024, 1024, > SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) }, -- Regards, Pratyush Yadav

Re: [PATCH 2/2] spi: cadence-quadspi: Use STIG mode for all ops with small payload

2023-03-27 Thread Pratyush Yadav
CQSPI_REG_CMDCTRL_ADD_BYTES_LSB); > + reg |= (0x1 << CQSPI_REG_CMDCTRL_ADDR_EN_LSB); > + } > + > + /* Set up dummy cycles. */ > + dummy_clk = cadence_qspi_calc_dummy(op, priv->dtr); > + if (dummy_clk > CQSPI_DUMMY_CLKS_MAX)

Re: [PATCH 1/2] spi: cadence-quadspi: Fix check condition for DTR ops

2023-03-27 Thread Pratyush Yadav
uld be better if you get rid of cadence_qspi_set_protocol() entirely. I see no point in carrying the state around. Wherever you use priv->dtr or priv->inst_width, etc. you also have access to the spi_mem_op. You can derive that information from the op. Something to fix when you have some free time on your han

Re: [PATCH] spi: spi-mem: s/dummy/data buswidth check in dtr_supports_op()

2023-02-27 Thread Pratyush Yadav
On Mon, Feb 20 2023, Dhruva Gole wrote: > This should have been op->data.buswidth instead as we check for octal > bus width for the data related ops > Also add explanation for why there is checks for 8D even data bytes > > Cc: Pratyush Yadav > Signed-off-by: Dhruva Gole

Re: [PATCH V3 2/2] spi: cadence_qspi: use STIG mode for small reads

2022-12-13 Thread Pratyush Yadav
<= instead? > mode = CQSPI_STIG_READ; > else > mode = CQSPI_READ; > -- > 2.25.1 > -- Regards, Pratyush Yadav

Re: [PATCH V3 1/2] spi: cadence_qspi: setup ADDR Bits in cmd reads

2022-12-13 Thread Pratyush Yadav
the cmd byte. Absence of addr bytes will obviously fail > to read correct data from flash register that maybe requested by flash > driver because the controller doesn't even specify which address of the > flash register the read is being requested from. > > Signed-off-by: Dhruva Gole

Re: [PATCH v2] spi: spi-mem: ease checks in dtr_supports_op()

2022-11-11 Thread Pratyush Yadav
On 07/11/22 06:46PM, Gole, Dhruva wrote: > Hey Pratyush, > > On 11/7/2022 4:16 AM, Pratyush Yadav wrote: > > Hi Dhruva :-) > > > > On 25/10/22 11:50AM, Dhruva Gole wrote: > > > Remove the extra conditions that cause some cases to fail prematurely > >

Re: [PATCH v2] spi: spi-mem: ease checks in dtr_supports_op()

2022-11-07 Thread Pratyush Yadav
op->data.buswidth instead. That would be a welcome fix indeed :-) You can also put my explanation for why this exists in a comment here so other people reading this code can also get to know this. > - return false; > - > return spi_mem_check_buswidth(slave, op); > } > EXPORT_SYMBOL_GPL(spi_mem_dtr_supports_op); > -- > 2.25.1 > -- Regards, Pratyush Yadav

Re: [PATCH v3 3/4] spi-nor: Adapt soft reset to XTX25F32B in Rock Pi 4 rev 1.4

2022-07-26 Thread Pratyush Yadav
On 26/07/22 10:27AM, Xavier Drudis Ferran wrote: > > Thank you for your time looking at the patch. > > El Tue, Jul 26, 2022 at 12:43:06PM +0530, Pratyush Yadav deia: > > > > Please don't put the changelog in the commit message. Put it below the 3 > > dash

Re: [PATCH v3 3/4] spi-nor: Adapt soft reset to XTX25F32B in Rock Pi 4 rev 1.4

2022-07-26 Thread Pratyush Yadav
e commit 5752d6ae8daa ("spi: > spi-mem: add spi_mem_dtr_supports_op()") by Pratyush Yadav. > > So try a few modes until SNOR_PROTO_1_1_1 works and then remember the > reset_proto. This tries to be useful for other boards, but I still > don't know any other that needs

Re: [PATCH] mtd: spi-nor-core: Implement spi_nor_read_sfdp_dma_unsafe() for sfdp parse

2022-06-28 Thread Pratyush Yadav
alloc'ed bounce buffer which is > the same implementation in Linux (drivers/mtd/spi-nor/sfdp.c). > > Signed-off-by: Vaishnav Achath Reviewed-by: Pratyush Yadav -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v2 2/2] arm: k3: j721e: add dynamic sf bus override support for j721e

2022-05-31 Thread Pratyush Yadav
& MAIN_DEVSTAT_BOOT_MODE_B_MASK) << > BOOT_MODE_B_SHIFT); > + > + return (bootmode == BOOT_DEVICE_QSPI) ? 1 : 0; > +} > + > +/* both OSPI and QSPI flash are in CS0 */ > +u32 spl_spi_boot_cs(void) > +{ > + return 0; > +} > + I don't think we need to hard-cod

Re: [PATCH v2 1/2] common: spl: spl_spi: add support for dynamic override of sf bus

2022-05-31 Thread Pratyush Yadav
> weakly defined in common/spl/spl_spi.c. > > Signed-off-by: Vaishnav Achath Reviewed-by: Pratyush Yadav -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH 7/8] mtd: spi-nor: use spi-mem dirmap API

2022-04-20 Thread Pratyush Yadav
t (*octal_dtr_enable)(struct spi_nor *nor); > int (*ready)(struct spi_nor *nor); > > + struct { > + struct spi_mem_dirmap_desc *rdesc; > + struct spi_mem_dirmap_desc *wdesc; > + } dirmap; > + > void *priv; > char mtd_name[MTD_NAME_SIZE(MTD_DEV_TYPE_NOR)]; > /* Compatibility for spi_flash, remove once sf layer is merged with mtd */ > @@ -584,6 +591,17 @@ device_node *spi_nor_get_flash_node(struct spi_nor *nor) > } > #endif /* __UBOOT__ */ > > +/** > + * spi_nor_setup_op() - Set up common properties of a spi-mem op. > + * @nor: pointer to a 'struct spi_nor' > + * @op: pointer to the 'struct spi_mem_op' whose > properties > + * need to be initialized. > + * @proto: the protocol from which the properties need to be set. > + */ > +void spi_nor_setup_op(const struct spi_nor *nor, > + struct spi_mem_op *op, > + const enum spi_nor_protocol proto); > + > /** > * spi_nor_scan() - scan the SPI NOR > * @nor: the spi_nor structure > -- > 2.25.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH 6/8] spi-mem: Add dirmap API from Linux

2022-04-20 Thread Pratyush Yadav
by: Chin-Ting Kuo > Signed-off-by: Sean Anderson Have not looked at it too closely, but the idea sounds good to me. Acked-by: Pratyush Yadav -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [v2 13/25] spi: cadence_qspi: Migrate CONFIG_CQSPI_REF_CLK to Kconfig

2022-04-11 Thread Pratyush Yadav
everting this to v1 for now. I'll try to look at it later if I ever get some time to spare. -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [v2 13/25] spi: cadence_qspi: Migrate CONFIG_CQSPI_REF_CLK to Kconfig

2022-03-31 Thread Pratyush Yadav
ise continue the previous > behavior. > > Cc: Jagan Teki > Signed-off-by: Tom Rini > --- > Changes in v2: > - Use IS_ENABLED(...) per Pratyush Thanks. For J721E, J7200, J721S2, and cadence_qspi Reviewed-by: Pratyush Yadav [...] -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH 13/25] spi: cadence_qspi: Migrate CONFIG_CQSPI_REF_CLK to Kconfig

2022-03-31 Thread Pratyush Yadav
On 31/03/22 01:41PM, Tom Rini wrote: > On Thu, Mar 31, 2022 at 10:00:52PM +0530, Pratyush Yadav wrote: > > +Vignesh > > > > Hi Tom, > > > > On 30/03/22 06:07PM, Tom Rini wrote: > > > This is a little tricky since SoCFPGA has code to determine this as

Re: [PATCH 13/25] spi: cadence_qspi: Migrate CONFIG_CQSPI_REF_CLK to Kconfig

2022-03-31 Thread Pratyush Yadav
I_REF_CLK > +#ifdef CONFIG_HAS_CQSPI_REF_CLK > plat->ref_clk_hz = CONFIG_CQSPI_REF_CLK; > +#elif defined(CONFIG_ARCH_SOCFPGA) > + plat->ref_clk_hz = cm_get_qspi_controller_clk_hz(); While you are here, please change all this to use if (IS_ENABLED()) instead. > #else > return ret; > #endif [...] -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH] spi: dw: Fix broken dw_spi_mem_ops()

2022-02-09 Thread Pratyush Yadav
he SPI flash to fail. > > Fix the op_len calculation in dw_spi_mem_ops(). Doing so results in > working SPI flash on the canaan k210 board. > > Fixes: d15de623013c ("spi: spi-mem: allow specifying a command's extension") > Signed-off-by: Niklas Cassel Reviewed-by: Pratyush Yadav -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: k210 spi flash regression

2022-02-08 Thread Pratyush Yadav
ng at spi-nor-ids.c, the flash is defined like this: > INFO("gd25lq128", 0xc86018, 0, 64 * 1024, 256, > SECT_4K | SPI_NOR_DUAL_READ | > SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) > > > So it appears that after your patch, the bytes are coming in the wrong order. > > > Any suggestions? > > > Kind regards, > Niklas -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: drivers: mtd: spi: Use correct 4 byte mode enablement for ISSI SPI flash devices alongside spi-nor-tiny.c subsystem

2022-01-27 Thread Pratyush Yadav
SI flash > devices while inside the U-Boot SPL / using spi-nor-tiny.c. Please don't attach patches, send them inline. This makes it easier to review it. See the mailing list archive [0] for some examples. [0] https://lore.kernel.org/u-boot/ -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v6 3/4] mtd: spi-nor-core: Add support for Macronix Octal flash

2022-01-09 Thread Pratyush Yadav
, SECT_4K | > > SPI_NOR_OCTAL_DTR_READ | SPI_NOR_4B_OPCODES) }, > > + { INFO("mx25uw12345g", 0xc28438, 0, 4 * 1024, 4096, SECT_4K | > > SPI_NOR_OCTAL_DTR_READ | SPI_NOR_4B_OPCODES) }, > > + { INFO("mx25uw6445g",0xc28137, 0, 2 * 1024, 4096, SECT_4K | > > SPI_NOR_OCTAL_DTR_READ | SPI_NOR_4B_OPCODES) }, > > + { INFO("mx25uw6345g",0xc28437, 0, 2 * 1024, 4096, SECT_4K | > > SPI_NOR_OCTAL_DTR_READ | SPI_NOR_4B_OPCODES) }, > > You need to at least specify which of these flashes support SFDP (describing > the > supported tables) and which not, otherwise this will become a maintenance > burden. > Best would be to dump all the SFDP tables for all the flashes. > > My general feeling is that we should re-sync u-boot's SPI NOR subsystem with > the > one on linux sooner or later, or the code will become harder to maintain. > Volunteers, thoughts? :) I think that would be very nice indeed. But unfortunately I do not have any bandwidth to spare right now for this. -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v6 1/4] mtd: spi-nor: macronix: add support for Macronix Octal

2022-01-09 Thread Pratyush Yadav
ng Octal DTR support to kernel and U-Boot SPI NOR, I did consider parsing this table. But I dropped the idea at the time because the table guarantees to only use 20 dummy cycles for reads and operation at 100 MHz (or higher if supported). But this does not guarantee that we can run the flash at the maximum speed possible. For example, for Spansion S28 flash we can only go up to 166 MHz with 20 dummy cycles. For getting 200 MHz we need at least 23 dummy cycles. -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH] ARM: mach-k3: sysfw-loader: Copy sysfw.itb to OCRAM in OSPI/SPI bootmode

2021-12-24 Thread Pratyush Yadav
avendra > Reviewed-by: Dave Gerlach > Tested-by: Keerthy Acked-by: Pratyush Yadav -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v2 3/4] Revert "mtd: spi-nor-core: Perform a Soft Reset on boot"

2021-12-17 Thread Pratyush Yadav
On 17/12/21 06:27AM, tudor.amba...@microchip.com wrote: > On 12/16/21 8:45 PM, Pratyush Yadav wrote: > >>>> > >>>>> > >>>>>> SFDP signature to determine the mode in which the flash is configured: > >>>>>> '''

Re: [PATCH v2 3/4] Revert "mtd: spi-nor-core: Perform a Soft Reset on boot"

2021-12-16 Thread Pratyush Yadav
Hi Tudor, I am not sure if you have sent a re-roll of this series. I am catching back up on my email backlog. On 15/11/21 05:44AM, tudor.amba...@microchip.com wrote: > On 11/12/21 3:13 PM, Pratyush Yadav wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless

Re: [PATCH] mtd: sf: Set SF parameters as env variables

2021-12-02 Thread Pratyush Yadav
Hi Marek, On 28/11/21 10:56PM, Marek Vasut wrote: > On 10/7/21 2:46 PM, Marek Vasut wrote: > > On 10/7/21 2:40 PM, Pratyush Yadav wrote: > > > On 23/09/21 10:00PM, Marek Vasut wrote: > > > > On 9/23/21 8:53 PM, Pratyush Yadav wrote: > > > >

Re: [PATCH] mtd: cqspi: Wait for transfer completion

2021-12-02 Thread Pratyush Yadav
Hi Marek, On 25/10/21 10:25PM, Marek Vasut wrote: > On 10/25/21 9:53 PM, Pratyush Yadav wrote: > > On 08/10/21 06:06PM, Jagan Teki wrote: > > > On Wed, Sep 15, 2021 at 2:05 PM Marek Vasut wrote: > > > > > > > > On 9/15/21 10:28 AM, Pratyush Yadav w

Re: [PATCH v2 2/4] mtd: spi-nor-core: macronix: Add support for mx66lm1g45g

2021-11-12 Thread Pratyush Yadav
ported, so they are no longer static. Tested with Cypress S28HS512T and Micron MT35XU512ABA. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/sf_internal.h | 4 +++ drivers/mtd/spi/spi-nor-core.c | 57 -- drivers/mtd/spi/spi-nor-ids.c | 42

Re: [PATCH v2 3/4] Revert "mtd: spi-nor-core: Perform a Soft Reset on boot"

2021-11-12 Thread Pratyush Yadav
On 10/11/21 08:44AM, tudor.amba...@microchip.com wrote: > On 11/9/21 9:26 PM, Pratyush Yadav wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > > content is safe > > > > Hi Tudor, > > Hi, Pratyush, > > Thanks for rev

Re: [PATCH v2 1/4] mtd: spi-nor-core: Introduce SPI_NOR_SOFT_RESET flash_info flag

2021-11-09 Thread Pratyush Yadav
; fixup hook should be used instead, where SNOR_F_SOFT_RESET should > be set. Reviewed-by: Pratyush Yadav -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v2 4/4] mtd: spi-nor-core: Fix the opcode extension for the software reset sequence

2021-11-09 Thread Pratyush Yadav
struct spi_nor *nor) >*/ > udelay(SPI_NOR_SRST_SLEEP_LEN); > > -out: > - nor->cmd_ext_type = ext; > - return ret; > + return 0; > } > #endif /* CONFIG_SPI_FLASH_SOFT_RESET */ > > -- > 2.25.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v2 3/4] Revert "mtd: spi-nor-core: Perform a Soft Reset on boot"

2021-11-09 Thread Pratyush Yadav
f ROM hands it to us in > - * Octal DTR mode. > - * > - * To accommodate cases where there is more than one flash on a board, > - * and only one of them needs a soft reset, failure to reset is not > - * made fatal, and we still try to read ID if possible. > - */ > - spi_nor_soft_reset(nor); > -#endif /* CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT */ > - > info = spi_nor_read_id(nor); > if (IS_ERR_OR_NULL(info)) > return -ENOENT; > -- > 2.25.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH] mtd: cqspi: Wait for transfer completion

2021-10-25 Thread Pratyush Yadav
On 08/10/21 06:06PM, Jagan Teki wrote: > On Wed, Sep 15, 2021 at 2:05 PM Marek Vasut wrote: > > > > On 9/15/21 10:28 AM, Pratyush Yadav wrote: > > > On 14/09/21 08:22PM, Marek Vasut wrote: > > >> On 9/14/21 7:42 PM, Pratyush Yadav wrote: > >

Re: [PATCH v4 4/4] mtd: spi-nor-core: Add support for Macronix Octal flash

2021-10-25 Thread Pratyush Yadav
0xc28938, 0, 4 * 1024, 4096, SECT_4K | > SPI_NOR_OCTAL_DTR_READ | SPI_NOR_4B_OPCODES) }, > + { INFO("mx25uw12345g", 0xc28438, 0, 4 * 1024, 4096, SECT_4K | > SPI_NOR_OCTAL_DTR_READ | SPI_NOR_4B_OPCODES) }, > + { INFO("mx25uw6445g",0xc28137, 0, 2 * 1024, 4096, SECT_4K | > SPI_NOR_OCTAL_DTR_READ | SPI_NOR_4B_OPCODES) }, > + { INFO("mx25uw6345g",0xc28437, 0, 2 * 1024, 4096, SECT_4K | > SPI_NOR_OCTAL_DTR_READ | SPI_NOR_4B_OPCODES) }, > #endif > > #ifdef CONFIG_SPI_FLASH_STMICRO /* STMICRO */ > -- > 2.17.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v4 3/4] mtd: spi-nor-core: set 4byte opcode when possible

2021-10-25 Thread Pratyush Yadav
eck for SPI_NOR_4B_OPCODES to fit whatever your flash needs instead of adding it again. > /* Send all the required SPI flash commands to initialize device */ > ret = spi_nor_init(nor); > if (ret) > -- > 2.17.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v4 2/4] mtd: spi-nor-core: Adding different type of command extension in Soft Reset

2021-10-25 Thread Pratyush Yadav
e flash in -* its default protocol mode assuming no non-volatile configuration was -* set. This will let us detect the flash even if ROM hands it to us in -* Octal DTR mode. -* -* To accommodate cases where there is more than one flash on a board, - * and only

Re: [PATCH] mtd: spi-nor-ids: Add SECT_4K to mt25qu512a

2021-10-20 Thread Pratyush Yadav
e file's changelog looking for people who might be able to help." > > Totally appreciate that this is inferred by the change - thanks also for the > maintainer advice. You're welcome :-). One more tip: avoid top posting [0]. [0] https://www.idallen.com/topposting.html > >

Re: [PATCH] mtd: spi-nor-ids: Add is25lp512 and is25wp512 devices

2021-10-19 Thread Pratyush Yadav
("is25wp256", 0x9d7019, 0, 64 * 1024, 512, > SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | > SPI_NOR_4B_OPCODES) }, > + { INFO("is25wp512", 0x9d701a, 0, 64 * 1024, 1024, > + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, > #endif > #ifdef CONFIG_SPI_FLASH_MACRONIX /* MACRONIX */ > /* Macronix */ > -- > 2.25.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH] mtd: spi-nor-ids: Add SECT_4K to mt25qu512a

2021-10-19 Thread Pratyush Yadav
c the subsystem maintainers so that they can see the patch and review and apply it. You can use `./scripts/get_maintainer.pl ` to get the list of people who need to be in Cc. Adding Jagan and Vignesh for this patch. Anyway, with the Tested-by trailer dropped, Acked-by: Pratyush Yadav > --- >

Re: [PATCH] mtd: sf: Set SF parameters as env variables

2021-10-07 Thread Pratyush Yadav
On 23/09/21 10:00PM, Marek Vasut wrote: > On 9/23/21 8:53 PM, Pratyush Yadav wrote: > > On 14/09/21 05:28AM, Marek Vasut wrote: > > > Set the SF page size, erase block size and total size as an environment > > > variable after "sf probe". This lets us discer

Re: [PATCH u-boot-spi v2 5/9] mtd: spi-nor-core: Don't check for zero length in spi_nor_erase()

2021-10-01 Thread Pratyush Yadav
On 01/10/21 11:25AM, Marek Behún wrote: > On Tue, 28 Sep 2021 22:29:11 +0530 > Pratyush Yadav wrote: > > > On 25/09/21 07:33PM, Marek Behún wrote: > > > From: Marek Behún > > > > > > This check is already done in mtdcore's mtd_erase(), no reason to do

Re: [PATCH v2] mtd: spi-nor-core: Add fixups for s25fs512s

2021-09-30 Thread Pratyush Yadav
re use, the fixups is assigned for S25FS-S family. > > The datasheet can be found in the following link. > https://www.cypress.com/file/216376/download > > Tested on Xilinx Zynq-7000 FPGA board. > > Signed-off-by: Takahiro Kuwano Acked-by: Pratyush Yadav -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH u-boot-spi v2 5/9] mtd: spi-nor-core: Don't check for zero length in spi_nor_erase()

2021-09-28 Thread Pratyush Yadav
len %lld\n", (long long)instr->addr, > (long long)instr->len); > > - if (!instr->len) > - return 0; > - > div_u64_rem(instr->len, mtd->erasesize, ); > if (rem) > return -EINVAL; > -- > 2.32.0 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH u-boot-spi v2 1/9] mtd: spi-nor-core: Try cleaning up in case writing BAR failed

2021-09-28 Thread Pratyush Yadav
Masami Hiramatsu Reviewed-by: Pratyush Yadav -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH u-boot-spi v2 2/9] mtd: spi-nor-core: Check return value of write_enable() in spi_nor_erase()

2021-09-28 Thread Pratyush Yadav
On 25/09/21 07:33PM, Marek Behún wrote: > From: Marek Behún > > The spi_nor_erase() function does not check return value of the > write_enable() call. Fix this. This is the case for many more calls for write_enable(), but we can fix them later I suppose. Reviewed-by: Pr

Re: [PATCH v3 3/4] mtd: spi-nor-core: set 4byte opcode when possible

2021-09-24 Thread Pratyush Yadav
/* Send all the required SPI flash commands to initialize device */ > ret = spi_nor_init(nor); > if (ret) > -- > 2.17.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH] mtd: sf: Set SF parameters as env variables

2021-09-23 Thread Pratyush Yadav
; + env_set_hex("sf_pagesize", nor->page_size); > print_size(nor->erase_size, ", total "); > + env_set_hex("sf_erasesize", nor->erase_size); > print_size(nor->size, ""); > + env_set_hex("sf_size", nor->size); > puts("\n"); > #endif > > -- > 2.33.0 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v4 3/5] sf: Tidy up code to avoid #ifdef

2021-09-20 Thread Pratyush Yadav
Hi Simon, On 19/09/21 03:49PM, Simon Glass wrote: > Update this code to use IS_ENABLED() instead. > > Signed-off-by: Simon Glass > > Reviewed-by: Pratyush Yadav Nitpick: Trailers shouldn't have a blank line between them. I see it for this patch and 4/5 as well. It probably

Re: [PATCH] mtd: spi-nor-core: Add fixups for s25fs512s

2021-09-17 Thread Pratyush Yadav
> +} > + > +static struct spi_nor_fixups s25fs_s_fixups = { > + .default_init = s25fs_s_default_init, > + .post_bfpt = s25fs_s_post_bfpt_fixup, > + .post_sfdp = s25fs_s_post_sfdp_fixup, > +}; > + > static int s25hx_t_mdp_ready(struct spi_nor *nor) > { > u32 addr; > @@ -3644,6 +3740,11 @@ void spi_nor_set_fixups(struct spi_nor *nor) > break; > } > } > + > + /* For FS-S (family ID = 0x81) */ > + if (JEDEC_MFR(nor->info) == SNOR_MFR_SPANSION && > + nor->info->id[5] == 0x81) > + nor->fixups = _s_fixups; Ok. > #endif > > #ifdef CONFIG_SPI_FLASH_S28HS512T > -- > 2.25.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH 2/2] mtd: spi-nor-core: Add fixups for Spansion S25FL256L

2021-09-17 Thread Pratyush Yadav
ange this to if (CONFIG_IS_ENABLED(SPI_FLASH_BAR) && !strcmp()) > + if (!strcmp(nor->info->name, "s25fl256l")) > + nor->fixups = _fixups; > +#endif *sigh* we really need to find a better way to specify fixups. Let me see if I can figure something out. In the meantime, this should be fine. > #endif > > #ifdef CONFIG_SPI_FLASH_S28HS512T > -- > 2.25.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH 1/2] mtd: spi-nor-ids: Add support for Spansion S25FL256L

2021-09-17 Thread Pratyush Yadav
, 64 * 1024, 512, SECT_4K | > SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, > { INFO6("s25hl512t", 0x342a1a, 0x0f0390, 256 * 1024, 256, > SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES | > USE_CLSR) }, > -- > 2.25.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v3 2/4] mtd: spi-nor-core: Adding different type of command extension in Soft Reset

2021-09-17 Thread Pratyush Yadav
MD_EXT_INVERT > + nor->cmd_ext_type = SPI_NOR_EXT_INVERT; > +#endif Avoid using #ifdef. You can replace it with if (CONFIG_IS_ENABLED(SPI_NOR_CMD_EXT_INVERT)) nor->cmd_ext_type = SPI_NOR_EXT_INVERT; else nor->cmd_ext_type = SPI_NOR_EXT_REPEAT; >

Re: [PATCH] mtd: cqspi: Wait for transfer completion

2021-09-15 Thread Pratyush Yadav
On 14/09/21 08:22PM, Marek Vasut wrote: > On 9/14/21 7:42 PM, Pratyush Yadav wrote: > > On 14/09/21 05:22AM, Marek Vasut wrote: > > > Wait for the read/write transfer finish bit get actually cleared, > > > this does not happen immediately on at least SoCFPGA Gen5. > &

Re: [PATCH] mtd: cqspi: Fix division by zero

2021-09-14 Thread Pratyush Yadav
dummy bytes in such a case. > > Fixes: 38b0852b0ea ("spi: cadence-qspi: Add support for octal DTR flashes") > Signed-off-by: Marek Vasut > Cc: Jagan Teki > Cc: Vignesh R > Cc: Pratyush Yadav > --- > drivers/spi/cadence_qspi_apb.c | 3 +++ > 1 file chang

Re: [PATCH] mtd: cqspi: Wait for transfer completion

2021-09-14 Thread Pratyush Yadav
On 14/09/21 05:22AM, Marek Vasut wrote: > Wait for the read/write transfer finish bit get actually cleared, > this does not happen immediately on at least SoCFPGA Gen5. > > Signed-off-by: Marek Vasut > Cc: Jagan Teki > Cc: Vignesh R > Cc: Pratyush Yadav > --- > dri

Re: [PATCH v2 2/4] mtd: spi-nor-core: Adding different type of command extension in Soft Reset

2021-08-30 Thread Pratyush Yadav
8_8_8_DTR); > + ret = spi_mem_exec_op(nor->spi, ); > + if (ret) { > + dev_warn(nor->dev, "Software reset failed: %d\n", ret); > + goto out; > + } > + > + udelay(SPI_NOR_SRST_SLEEP_LEN); > + > out: > nor->cmd_ext_type = ext; > return ret; > -- > 2.17.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH 1/4] mtd: spi-nor: macronix: add support for Macronix octaflash

2021-08-13 Thread Pratyush Yadav
G_MXIC_OPI_DTR_DIS 0x1 /* Disable Octal DTR */ > +#define SPINOR_REG_MXIC_CR2_DC 0x0300 /* For setting > dummy cycles */ > +#define SPINOR_REG_MXIC_DC_200x0 /* Setting > dummy cycles to 20 */ > +#define MXIC_MAX_DC 20 /* Maximum value of > dummy cycles */ > > /* Used for Spansion flashes only. */ > #define SPINOR_OP_BRWR 0x17/* Bank register write */ > -- > 2.17.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v3 3/4] sf: doc: Add documentation for the 'sf' command

2021-08-02 Thread Pratyush Yadav
ocated for two buffers, each bytes in size. At typical > +size is 64KB to 1MB. The offset and size must be aligned to an erase > boundary. > + > +Note that this test will fail if any part of the SPI flash is > write-protected. > + > + > +Examples > + > + > +This first exam

Re: [PATCH v3 2/4] sf: Tidy up code to avoid #ifdef

2021-08-02 Thread Pratyush Yadav
t; at `addr' to flash at > `offset'\n" > " or to start of mtd > `partition'\n" > "sf protect lock/unlock sector len - protect/unprotect 'len' bytes > starting\n" > - "

Re: [PATCH v2 2/2] mtd: spi-nor: Mask out fast read if not requested in DT

2021-07-30 Thread Pratyush Yadav
_1_1); > > - if (!(info->flags & SPI_NOR_NO_FR)) { > - params->hwcaps.mask |= SNOR_HWCAPS_READ_FAST; > + if (params->hwcaps.mask & SNOR_HWCAPS_READ_FAST) > spi_nor_set_read_settings(>reads[SNOR_CMD_READ_FAST], >

Re: [PATCH 2/2] mtd: spi-nor: Mask out fast read if not requested in DT

2021-07-30 Thread Pratyush Yadav
FAST; > + if (params->hwcaps.mask & SNOR_HWCAPS_READ_FAST) > spi_nor_set_read_settings(>reads[SNOR_CMD_READ_FAST], > 0, 8, SPINOR_OP_READ_FAST, > SNOR_PROTO_1_1_1); > - } The patch looks good to me other than the point above. > > if (info->flags & SPI_NOR_DUAL_READ) { > params->hwcaps.mask |= SNOR_HWCAPS_READ_1_1_2; > -- > 2.25.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH 1/2] mtd: spi-nor: Respect flash's hwcaps in spi_nor_adjust_hwcaps()

2021-07-29 Thread Pratyush Yadav
s = params->hwcaps.mask but I think having SNOR_HWCAPS_ALL here to signify that we are assuming controller supports everything is not a bad idea IMO. With the above comment updated, Reviewed-by: Pratyush Yadav Thanks. > > /* X-X-X modes are not supported yet, mask them all. */

Re: [PATCH] spi: spi-mem-nodm: Fix read data size issue

2021-07-28 Thread Pratyush Yadav
ata.nbytes, > slave->max_write_size - len); > + } > > if (!op->data.nbytes) > return -EINVAL; > -- > 2.25.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [RFC PATCH] mtd: spi-nor-core: Handle SPI_RX_SLOW in spi_nor_adjust_hwcaps()

2021-07-28 Thread Pratyush Yadav
yet, mask them all. */ *hwcaps &= ~SNOR_HWCAPS_X_X_X; Can you please test and confirm if it does indeed fix the issue for you? > rdidx = spi_nor_hwcaps_read2cmd(BIT(cap)); > if (rdidx >= 0 && > spi_nor_check_readop(nor, >reads[rdidx])) > -- > 2.25.1 > -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH v10 12/27] mtd: spi-nor-core: Rework hwcaps selection

2021-07-28 Thread Pratyush Yadav
On 28/07/21 06:13PM, Bin Meng wrote: > Hi Pratyush, > > On Sat, Jun 26, 2021 at 3:20 AM Pratyush Yadav wrote: > > > > The spi-mem layer provides a spi_mem_supports_op() function to check > > whether a specific operation is supported by the controller or not. > >

Re: [PATCH] spi: nxp_fspi: Ensure width is respected in spi-mem operations

2021-07-26 Thread Pratyush Yadav
ntroller") > Signed-off-by: Michael Walle Reviewed-by: Pratyush Yadav -- Regards, Pratyush Yadav Texas Instruments Inc.

Re: [PATCH] mux: correct prototype for mux_control_try_select()

2021-07-14 Thread Pratyush Yadav
you seem to be terminating them at 60. Other than this, Reviewed-by: Pratyush Yadav > > Signed-off-by: Patrick Wildt > --- > include/mux.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/mux.h b/include/mux.h > index 23844f480a..

Re: [PATCH v10 04/27] spi: spi-mem: add spi_mem_dtr_supports_op()

2021-06-28 Thread Pratyush Yadav
On 28/06/21 12:09PM, Jagan Teki wrote: > On Sun, Jun 27, 2021 at 2:05 PM Pratyush Yadav wrote: > > > > On 26/06/21 02:44PM, Jagan Teki wrote: > > > On Sat, Jun 26, 2021 at 12:47 AM Pratyush Yadav wrote: > > > > > > > > spi_mem_default_su

Re: [PATCH v10 04/27] spi: spi-mem: add spi_mem_dtr_supports_op()

2021-06-27 Thread Pratyush Yadav
On 26/06/21 02:44PM, Jagan Teki wrote: > On Sat, Jun 26, 2021 at 12:47 AM Pratyush Yadav wrote: > > > > spi_mem_default_supports_op() rejects DTR ops by default to ensure that > > the controller drivers that haven't been updated with DTR support > > continue to reje

[PATCH v10 27/27] mtd: spi-nor-core: Allow using Micron mt35xu512aba in Octal DTR mode

2021-06-25 Thread Pratyush Yadav
Since this flash doesn't have a Profile 1.0 table, the Octal DTR capabilities are enabled in the post SFDP fixup, along with the 8D-8D-8D fast read settings. Enable Octal DTR mode with 20 dummy cycles to allow running at the maximum supported frequency of 200Mhz. Signed-off-by: Pratyush Yadav

[PATCH v10 26/27] mtd: spi-nor-core: Add support for Cypress Semper flash

2021-06-25 Thread Pratyush Yadav
versions of the flash was incorrect. Fixes for that are included in the fixup hooks. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/Kconfig| 8 ++ drivers/mtd/spi/spi-nor-core.c | 187 + drivers/mtd/spi/spi-nor-ids.c | 3 + include/linux/mtd/spi-nor.h

[PATCH v10 24/27] mtd: spi-nor-core: allow truncated erases

2021-06-25 Thread Pratyush Yadav
KiB sectors till the end. Let the flash-specific erase functions erase less than the requested length in case of the 4 or 128 KiB sectors and report the number of bytes erased back to the calling function. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c | 16 +++- 1 f

[PATCH v10 25/27] mtd: spi-nor-core: Add non-uniform erase for Spansion/Cypress

2021-06-25 Thread Pratyush Yadav
used. Signed-off-by: Takahiro Kuwano Signed-off-by: Pratyush Yadav [p.ya...@ti.com: Refactor the function to be compatible with nor->erase, make 4K opcode customizable, call spi_nor_setup_op() before executing the op.] --- drivers/mtd/spi/spi-nor-core.c | 61 ++

[PATCH v10 23/27] mtd: spi-nor-core: Perform a Soft Reset on boot

2021-06-25 Thread Pratyush Yadav
ven if ROM hands it to us in Octal DTR mode. To accommodate cases where there is more than one flash on a board, and only one of them needs a soft reset, failure to reset is not made fatal, and we still try to read ID if possible. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/Kconfig

[PATCH v10 22/27] mtd: spi-nor-core: Perform a Soft Reset on shutdown

2021-06-25 Thread Pratyush Yadav
assumes that we don't set any non-volatile bits anywhere, and the flash doesn't have any non-volatile Octal DTR mode configuration. Since spi-nor-tiny doesn't (and likely shouldn't) have spi_nor_soft_reset(), add a dummy spi_nor_remove() for it that does nothing. Signed-off-by: Pratyush Yadav

[PATCH v10 21/27] mtd: spi-nor-core: Detect Soft Reset sequence support from BFPT

2021-06-25 Thread Pratyush Yadav
A Soft Reset sequence will return the flash to Power-on-Reset (POR) state. It consists of two commands: Soft Reset Enable and Soft Reset. Find out if the sequence is supported from BFPT DWORD 16. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c | 6 ++ include/linux/mtd/spi

[PATCH v10 20/27] mtd: spi-nor-core: Do not make invalid quad enable fatal

2021-06-25 Thread Pratyush Yadav
o abort BFPT parsing. Instead, continue BFPT parsing assuming there is no quad enable bit present. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-cor

[PATCH v10 19/27] mtd: spi-nor-core: Enable octal DTR mode when possible

2021-06-25 Thread Pratyush Yadav
Allow flashes to specify a hook to enable octal DTR mode. Use this hook whenever possible to get optimal transfer speeds. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c | 31 +++ include/linux/mtd/spi-nor.h| 2 ++ 2 files changed, 33 insertions

[PATCH v10 18/27] mtd: spi-nor-core: Prepare Read SR and FSR for Octal DTR mode

2021-06-25 Thread Pratyush Yadav
mode read 2 bytes and discard the second. This shows no side effects with the two flashes I tested: Micron mt35xu512aba and Cypress s28hs512t. Update Read FSR to mimic Read SR because they share the same characteristics. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c | 60

[PATCH v10 17/27] mtd: spi-nor-core: Parse xSPI Profile 1.0 table

2021-06-25 Thread Pratyush Yadav
dummy cycles for a fast octal DTR read are set to 20. Since there is no simple way of determining the dummy cycles needed for the fast read command, flashes that use a different value should update it in their flash-specific hooks. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c

[PATCH v10 13/27] mtd: spi-nor-core: Do not set data direction when there is no data

2021-06-25 Thread Pratyush Yadav
there is no data to write. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 24c6b8c4a3..d795ecbc9f 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers

[PATCH v10 11/27] mtd: spi-nor-core: Introduce flash-specific fixup hooks

2021-06-25 Thread Pratyush Yadav
uct spi_nor_fixups in nor->info. This is not possible in U-Boot because the spi-nor-ids list is shared between spi-nor-core.c and spi-nor-tiny.c. Since spi-nor-tiny shouldn't have those fixup hooks populated, add a separate function that lets flashes populate their fixup hooks. Signed-off-by: Pratyush

[PATCH v10 15/27] mtd: spi-nor-core: prepare BFPT parsing for JESD216 rev D

2021-06-25 Thread Pratyush Yadav
-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index c2eae885e4..5a65597616 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor

[PATCH v10 16/27] mtd: spi-nor-core: Get command opcode extension type from BFPT

2021-06-25 Thread Pratyush Yadav
d "inverse" extensions are supported. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 5a65597616..d9af5cbf97 100644 --- a/dri

[PATCH v10 14/27] mtd: spi-nor-core: Add support for DTR protocol

2021-06-25 Thread Pratyush Yadav
phases need to be either DTR or STR. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/sf_internal.h | 1 + drivers/mtd/spi/spi-nor-core.c | 178 + include/linux/mtd/spi-nor.h| 50 ++--- 3 files changed, 175 insertions(+), 54 deletions(-) diff --git

[PATCH v10 12/27] mtd: spi-nor-core: Rework hwcaps selection

2021-06-25 Thread Pratyush Yadav
: Rework hwcaps selection for the spi-mem case, 2019-08-06) Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/Kconfig| 9 ++ drivers/mtd/spi/spi-nor-core.c | 244 ++--- drivers/spi/spi-mem-nodm.c | 62 + include/linux/mtd/spi-nor.h| 17 ++- 4

[PATCH v10 09/27] mtd: spi-nor-core: Add a ->setup() hook

2021-06-25 Thread Pratyush Yadav
ons to avoid forward declarations. Inspired by the Linux kernel's setup() hook. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c | 84 +++ drivers/mtd/spi/spi-nor-tiny.c | 22 include/linux/mtd/spi-nor.h| 192 ++--- 3 files changed,

[PATCH v10 10/27] mtd: spi-nor-core: Move SFDP related declarations to top

2021-06-25 Thread Pratyush Yadav
These structures will be used in a later commit inside another structure definition. Also take the declarations out of the ifdef since they won't affect the final binary anyway and will be used in a later commit. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c | 224

[PATCH v10 07/27] spi: cadence-qspi: Add support for octal DTR flashes

2021-06-25 Thread Pratyush Yadav
spi-mem take care of polling the SR. Signed-off-by: Pratyush Yadav --- drivers/spi/cadence_qspi.c | 39 - drivers/spi/cadence_qspi.h | 14 +- drivers/spi/cadence_qspi_apb.c | 286 ++--- 3 files changed, 313 insertions(+), 26 deletions(-) diff --git

[PATCH v10 08/27] mtd: spi-nor-core: Fix address width on flash chips > 16MB

2021-06-25 Thread Pratyush Yadav
324f78dfb442b82365548b657ec4e6974c677502. Signed-off-by: Pratyush Yadav --- drivers/mtd/spi/spi-nor-core.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 6af9c675a4..bfe7ea55c4 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b

[PATCH v10 06/27] spi: cadence-qspi: Add a small delay before indirect writes

2021-06-25 Thread Pratyush Yadav
Once the start bit is toggled it takes a small amount of time before it is internally synchronized. This means we can't start writing during that part. So add a small delay to allow the bit to be synchronized. Signed-off-by: Pratyush Yadav --- drivers/spi/cadence_qspi.c | 4 drivers

[PATCH v10 05/27] spi: cadence-qspi: Do not calibrate when device tree sets read delay

2021-06-25 Thread Pratyush Yadav
. It needs a read delay of 4 in octal DTR mode. But since the calibration procedure is run before the flash is switched in octal DTR mode, it yields a read delay of 2. A value of 4 works for both octal DTR and legacy modes. Signed-off-by: Pratyush Yadav --- drivers/spi/cadence_qspi.c | 26

[PATCH v10 04/27] spi: spi-mem: add spi_mem_dtr_supports_op()

2021-06-25 Thread Pratyush Yadav
(). It provides a basic sanity check for DTR ops and performs the buswidth requirement check. Move the logic for checking buswidth in spi_mem_default_supports_op() to a separate function so the logic is not repeated twice. Signed-off-by: Pratyush Yadav --- drivers/spi/spi-mem.c | 32

[PATCH v10 02/27] spi: spi-mem: allow specifying a command's extension

2021-06-25 Thread Pratyush Yadav
to be changed to be op->cmd.nbytes because that is the actual indicator of opcode size. Signed-off-by: Pratyush Yadav --- drivers/spi/mtk_snfi_spi.c | 3 +-- drivers/spi/spi-mem-nodm.c | 4 ++-- drivers/spi/spi-mem.c | 13 +++-- include/spi-mem.h | 6 +- 4 files ch

  1   2   3   4   5   >