linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
	Harvey Hunt <harveyhuntnexus@gmail.com>
Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Paul Cercueil <paul@crapouillou.net>
Subject: [PATCH v6 07/13] mtd: rawnand: ingenic: Rename jz4780_bch_init to jz4780_bch_reset
Date: Tue, 19 Mar 2019 15:53:57 +0100	[thread overview]
Message-ID: <20190319145403.31627-8-paul@crapouillou.net> (raw)
In-Reply-To: <20190319145403.31627-1-paul@crapouillou.net>

The jz4780_bch_init name was confusing, as it suggested that its content
should be executed once at init time, whereas what the function really
does is reset the hardware for a new ECC operation.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---

Notes:
    v5: New patch
    
    v6: No change

 drivers/mtd/nand/raw/ingenic/jz4780_bch.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/raw/ingenic/jz4780_bch.c b/drivers/mtd/nand/raw/ingenic/jz4780_bch.c
index fdf483a49f7b..7635753bd7ea 100644
--- a/drivers/mtd/nand/raw/ingenic/jz4780_bch.c
+++ b/drivers/mtd/nand/raw/ingenic/jz4780_bch.c
@@ -69,8 +69,8 @@ struct jz4780_bch {
 	struct mutex lock;
 };
 
-static void jz4780_bch_init(struct jz4780_bch *bch,
-			    struct jz4780_bch_params *params, bool encode)
+static void jz4780_bch_reset(struct jz4780_bch *bch,
+			     struct jz4780_bch_params *params, bool encode)
 {
 	u32 reg;
 
@@ -183,7 +183,8 @@ int jz4780_bch_calculate(struct jz4780_bch *bch, struct jz4780_bch_params *param
 	int ret = 0;
 
 	mutex_lock(&bch->lock);
-	jz4780_bch_init(bch, params, true);
+
+	jz4780_bch_reset(bch, params, true);
 	jz4780_bch_write_data(bch, buf, params->size);
 
 	if (jz4780_bch_wait_complete(bch, BCH_BHINT_ENCF, NULL)) {
@@ -220,7 +221,7 @@ int jz4780_bch_correct(struct jz4780_bch *bch, struct jz4780_bch_params *params,
 
 	mutex_lock(&bch->lock);
 
-	jz4780_bch_init(bch, params, false);
+	jz4780_bch_reset(bch, params, false);
 	jz4780_bch_write_data(bch, buf, params->size);
 	jz4780_bch_write_data(bch, ecc_code, params->bytes);
 
-- 
2.11.0


  parent reply	other threads:[~2019-03-19 14:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19 14:53 [PATCH v6 00/13] Ingenic NAND patchset v6 Paul Cercueil
2019-03-19 14:53 ` [PATCH v6 01/13] dt-bindings: mtd: ingenic: Add compatible strings for JZ4740 and JZ4725B Paul Cercueil
2019-03-19 14:53 ` [PATCH v6 02/13] dt-bindings: mtd: ingenic: Change 'BCH' to 'ECC' in documentation Paul Cercueil
2019-03-19 14:53 ` [PATCH v6 03/13] dt-bindings: mtd: ingenic: Use standard ecc-engine property Paul Cercueil
2019-03-19 14:53 ` [PATCH v6 04/13] mtd: rawnand: Move drivers for Ingenic SoCs to subfolder Paul Cercueil
2019-03-19 14:53 ` [PATCH v6 05/13] mtd: rawnand: ingenic: Use SPDX license notifiers Paul Cercueil
2019-03-19 14:53 ` [PATCH v6 06/13] mtd: rawnand: ingenic: Rename jz4780_nand driver to ingenic_nand Paul Cercueil
2019-03-19 14:53 ` Paul Cercueil [this message]
2019-03-19 14:53 ` [PATCH v6 08/13] mtd: rawnand: ingenic: Separate top-level and SoC specific code Paul Cercueil
2019-03-19 14:53 ` [PATCH v6 09/13] mtd: rawnand: ingenic: Make use of ecc-engine property Paul Cercueil
2019-03-19 14:54 ` [PATCH v6 10/13] mtd: rawnand: ingenic: Add support for the JZ4740 Paul Cercueil
2019-03-19 14:54 ` [PATCH v6 11/13] mtd: rawnand: ingenic: Add support for the JZ4725B Paul Cercueil
2019-03-19 14:54 ` [PATCH v6 12/13] mtd: rawnand: ingenic: Add ooblayout for the Qi Ben Nanonote Paul Cercueil
2019-03-19 14:54 ` [PATCH v6 13/13] mtd: rawnand: ingenic: Move BBTs out of ECC area Paul Cercueil
2019-04-01 15:25 ` [PATCH v6 00/13] Ingenic NAND patchset v6 Miquel Raynal

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=20190319145403.31627-8-paul@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=devicetree@vger.kernel.org \
    --cc=harveyhuntnexus@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).