mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 07/12] mtd: nand: omap: Add header file for bch decoder
Date: Mon, 19 Nov 2018 09:44:49 +0100	[thread overview]
Message-ID: <20181119084454.17599-8-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20181119084454.17599-1-s.hauer@pengutronix.de>

omap_gpmc_decode_bch() is defined in its user rather than properly in a
header file. Add a header file to be included by both its user and the
file implementing it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mtd/nand/nand_omap_bch_decoder.c | 2 ++
 drivers/mtd/nand/nand_omap_bch_decoder.h | 6 ++++++
 drivers/mtd/nand/nand_omap_gpmc.c        | 4 ++--
 3 files changed, 10 insertions(+), 2 deletions(-)
 create mode 100644 drivers/mtd/nand/nand_omap_bch_decoder.h

diff --git a/drivers/mtd/nand/nand_omap_bch_decoder.c b/drivers/mtd/nand/nand_omap_bch_decoder.c
index 64e8031785..4dd28a7704 100644
--- a/drivers/mtd/nand/nand_omap_bch_decoder.c
+++ b/drivers/mtd/nand/nand_omap_bch_decoder.c
@@ -15,6 +15,8 @@
 
 #include <common.h>
 
+#include "nand_omap_bch_decoder.h"
+
 #define mm		13
 #define kk_shorten	4096
 #define nn		8191	/* Length of codeword, n = 2**mm - 1 */
diff --git a/drivers/mtd/nand/nand_omap_bch_decoder.h b/drivers/mtd/nand/nand_omap_bch_decoder.h
new file mode 100644
index 0000000000..74d24be028
--- /dev/null
+++ b/drivers/mtd/nand/nand_omap_bch_decoder.h
@@ -0,0 +1,6 @@
+#ifndef MTD_OMAP_GPMC_DECODE_BCH_H
+#define MTD_OMAP_GPMC_DECODE_BCH_H
+
+int omap_gpmc_decode_bch(int select_4_8, unsigned char *ecc, unsigned int *err_loc);
+
+#endif /* MTD_OMAP_GPMC_DECODE_BCH_H */
\ No newline at end of file
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
index d0b1699839..323a9c7532 100644
--- a/drivers/mtd/nand/nand_omap_gpmc.c
+++ b/drivers/mtd/nand/nand_omap_gpmc.c
@@ -71,6 +71,8 @@
 #include <mach/gpmc.h>
 #include <mach/gpmc_nand.h>
 
+#include "nand_omap_bch_decoder.h"
+
 #define GPMC_ECC_CONFIG_ECCENABLE		(1 << 0)
 #define GPMC_ECC_CONFIG_ECCCS(x)		(((x) & 0x7) << 1)
 #define GPMC_ECC_CONFIG_ECCTOPSECTOR(x)		(((x) & 0x7) << 4)
@@ -90,8 +92,6 @@
 static const uint8_t bch8_vector[] = {0xf3, 0xdb, 0x14, 0x16, 0x8b, 0xd2,
 		0xbe, 0xcc, 0xac, 0x6b, 0xff, 0x99, 0x7b};
 
-int omap_gpmc_decode_bch(int select_4_8, unsigned char *ecc, unsigned int *err_loc);
-
 static const char *ecc_mode_strings[] = {
 	"software",
 	"hamming_hw_romcode",
-- 
2.19.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2018-11-19  8:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19  8:44 [PATCH 00/12] More -Wmissing-prototypes fixes Sascha Hauer
2018-11-19  8:44 ` [PATCH 01/12] ARM: start: Add missing prototype Sascha Hauer
2018-11-19  8:44 ` [PATCH 02/12] ARM: samsung: remove unused function Sascha Hauer
2018-11-19  8:44 ` [PATCH 03/12] ARM: samsung: make locally used function static Sascha Hauer
2018-11-19  8:44 ` [PATCH 04/12] ARM: samsung: provide prototype for nand_boot() Sascha Hauer
2018-11-19  8:44 ` [PATCH 05/12] ARM: samsung: Add missing include Sascha Hauer
2018-11-19  8:44 ` [PATCH 06/12] state: remove unused function Sascha Hauer
2018-11-19  8:44 ` Sascha Hauer [this message]
2018-11-19  8:44 ` [PATCH 08/12] net: cpsw: Make locally used function static Sascha Hauer
2018-11-19  8:44 ` [PATCH 09/12] usb: musb: Add missing includes Sascha Hauer
2018-11-19  8:44 ` [PATCH 10/12] spi: omap: make locally used functions static Sascha Hauer
2018-11-19  8:44 ` [PATCH 11/12] bus: omap-gpmc: make locally used function static Sascha Hauer
2018-11-19  8:44 ` [PATCH 12/12] ARM: omap: Add missing includes Sascha Hauer

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=20181119084454.17599-8-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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