summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-12-07 08:12:40 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-12-07 08:12:40 +0100
commit05bc268ec5c5bcf1eca52f2aaa9ebdcaf2edee25 (patch)
treea5131c0eb8e7e59c00e0c941b3830814cb23040b /drivers/mtd/nand
parentb9dcb4ae01b034da77ba56b1886c8d04971f5cec (diff)
parent1ef8adb77b36153b996c09294310d1b662291ba5 (diff)
downloadbarebox-05bc268ec5c5bcf1eca52f2aaa9ebdcaf2edee25.tar.gz
barebox-05bc268ec5c5bcf1eca52f2aaa9ebdcaf2edee25.tar.xz
Merge branch 'for-next/missing-prototypes'
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/nand_omap_bch_decoder.c2
-rw-r--r--drivers/mtd/nand/nand_omap_bch_decoder.h6
-rw-r--r--drivers/mtd/nand/nand_omap_gpmc.c4
3 files changed, 10 insertions, 2 deletions
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",