All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Cheng Ming Lin <linchengming884@gmail.com>
Cc: richard@nod.at,  vigneshr@ti.com,  robh@kernel.org,
	 krzk+dt@kernel.org, conor+dt@kernel.org,
	 tudor.ambarus@linaro.org, mmkurbanov@salutedevices.com,
	 Takahiro.Kuwano@infineon.com, pratyush@kernel.org,
	 linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, alvinzhou@mxic.com.tw,
	 Cheng Ming Lin <chengminglin@mxic.com.tw>
Subject: Re: [PATCH v2 3/3] mtd: spi-nand: macronix: Add randomizer support
Date: Wed, 10 Sep 2025 11:12:29 +0200	[thread overview]
Message-ID: <87qzwed62q.fsf@bootlin.com> (raw)
In-Reply-To: <20250910030301.1368372-4-linchengming884@gmail.com> (Cheng Ming Lin's message of "Wed, 10 Sep 2025 11:03:01 +0800")


> +static int macronix_set_randomizer(struct spinand_device *spinand)
> +{
> +	struct spi_mem_op exec_op = SPINAND_PROG_EXEC_1S_1S_0_OP(0);
> +	struct nand_device *nand = spinand_to_nand(spinand);
> +	struct device_node *dn = nanddev_get_of_node(nand);
> +	int randopt, ret;
> +	u8 cfg, status;
> +
> +	ret = spinand_read_reg_op(spinand, MACRONIX_FEATURE_ADDR_RANDOMIZER, &cfg);
> +	if (ret)
> +		return ret;
> +	if (cfg)
> +		return 0;
> +
> +	cfg = MACRONIX_CFG_ENPGM | MACRONIX_CFG_RANDEN;
> +	randopt = of_property_read_bool(dn, "mxic,randopt");

Isn't that a leftover?

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Cheng Ming Lin <linchengming884@gmail.com>
Cc: richard@nod.at,  vigneshr@ti.com,  robh@kernel.org,
	 krzk+dt@kernel.org, conor+dt@kernel.org,
	 tudor.ambarus@linaro.org, mmkurbanov@salutedevices.com,
	 Takahiro.Kuwano@infineon.com, pratyush@kernel.org,
	 linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, alvinzhou@mxic.com.tw,
	 Cheng Ming Lin <chengminglin@mxic.com.tw>
Subject: Re: [PATCH v2 3/3] mtd: spi-nand: macronix: Add randomizer support
Date: Wed, 10 Sep 2025 11:12:29 +0200	[thread overview]
Message-ID: <87qzwed62q.fsf@bootlin.com> (raw)
In-Reply-To: <20250910030301.1368372-4-linchengming884@gmail.com> (Cheng Ming Lin's message of "Wed, 10 Sep 2025 11:03:01 +0800")


> +static int macronix_set_randomizer(struct spinand_device *spinand)
> +{
> +	struct spi_mem_op exec_op = SPINAND_PROG_EXEC_1S_1S_0_OP(0);
> +	struct nand_device *nand = spinand_to_nand(spinand);
> +	struct device_node *dn = nanddev_get_of_node(nand);
> +	int randopt, ret;
> +	u8 cfg, status;
> +
> +	ret = spinand_read_reg_op(spinand, MACRONIX_FEATURE_ADDR_RANDOMIZER, &cfg);
> +	if (ret)
> +		return ret;
> +	if (cfg)
> +		return 0;
> +
> +	cfg = MACRONIX_CFG_ENPGM | MACRONIX_CFG_RANDEN;
> +	randopt = of_property_read_bool(dn, "mxic,randopt");

Isn't that a leftover?

Thanks,
Miquèl

  reply	other threads:[~2025-09-10  9:12 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10  3:02 [PATCH v2 0/3] mtd: spi-nand: Add support for randomizer Cheng Ming Lin
2025-09-10  3:02 ` Cheng Ming Lin
2025-09-10  3:02 ` [PATCH v2 1/3] dt-bindings: mtd: spi-nand: Add enable-randomizer-otp property Cheng Ming Lin
2025-09-10  3:02   ` Cheng Ming Lin
2025-09-10  9:09   ` Miquel Raynal
2025-09-10  9:09     ` Miquel Raynal
2025-09-10 16:36     ` Rob Herring
2025-09-10 16:36       ` Rob Herring
2025-09-11  7:08       ` Miquel Raynal
2025-09-11  7:08         ` Miquel Raynal
2025-09-11  7:24     ` Cheng Ming Lin
2025-09-11  7:24       ` Cheng Ming Lin
2025-09-11  7:59       ` Miquel Raynal
2025-09-11  7:59         ` Miquel Raynal
2025-09-11  8:30         ` Cheng Ming Lin
2025-09-11  8:30           ` Cheng Ming Lin
2025-09-11 13:56           ` Miquel Raynal
2025-09-11 13:56             ` Miquel Raynal
2025-09-12  7:50             ` Cheng Ming Lin
2025-09-12  7:50               ` Cheng Ming Lin
2025-09-10 11:40   ` Krzysztof Kozlowski
2025-09-10 11:40     ` Krzysztof Kozlowski
2025-09-11  8:05     ` Cheng Ming Lin
2025-09-11  8:05       ` Cheng Ming Lin
2025-09-10  3:03 ` [PATCH v2 2/3] mtd: spi-nand: Add support for randomizer Cheng Ming Lin
2025-09-10  3:03   ` Cheng Ming Lin
2025-09-10  3:03 ` [PATCH v2 3/3] mtd: spi-nand: macronix: Add randomizer support Cheng Ming Lin
2025-09-10  3:03   ` Cheng Ming Lin
2025-09-10  9:12   ` Miquel Raynal [this message]
2025-09-10  9:12     ` Miquel Raynal
2025-09-10  9:26     ` Cheng Ming Lin
2025-09-10  9:26       ` Cheng Ming Lin
2025-09-10  9:43       ` Miquel Raynal
2025-09-10  9:43         ` Miquel Raynal
2025-09-11  5:15         ` Cheng Ming Lin
2025-09-11  5:15           ` Cheng Ming Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87qzwed62q.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=Takahiro.Kuwano@infineon.com \
    --cc=alvinzhou@mxic.com.tw \
    --cc=chengminglin@mxic.com.tw \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linchengming884@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mmkurbanov@salutedevices.com \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=robh@kernel.org \
    --cc=tudor.ambarus@linaro.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.