From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kndaS-00088S-AZ for barebox@lists.infradead.org; Fri, 11 Dec 2020 08:15:37 +0000 From: Sascha Hauer Date: Fri, 11 Dec 2020 09:15:31 +0100 Message-Id: <20201211081533.7372-3-s.hauer@pengutronix.de> In-Reply-To: <20201211081533.7372-1-s.hauer@pengutronix.de> References: <20201211081533.7372-1-s.hauer@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 3/5] mtd: nand: omap: print error when ELM config failed To: Barebox List ELM config can fail when ELM support is disabled. Let the user know about it. Signed-off-by: Sascha Hauer --- drivers/mtd/nand/nand_omap_gpmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c index 1d81500bce..8fdfd236bd 100644 --- a/drivers/mtd/nand/nand_omap_gpmc.c +++ b/drivers/mtd/nand/nand_omap_gpmc.c @@ -1128,8 +1128,11 @@ static int omap_gpmc_eccmode(struct gpmc_nand_info *oinfo, err = elm_config(BCH16_ECC, minfo->writesize / nand->ecc.size, nand->ecc.size, nand->ecc.bytes); - if (err < 0) + if (err < 0) { + dev_err(oinfo->pdev, "ELM config failed: %s\n", + strerror(-err)); return err; + } nand->ecc.read_page = gpmc_read_page_hwecc_elm; -- 2.20.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox