summaryrefslogtreecommitdiffstats
path: root/sys/dev/nand/nand.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/nand/nand.c')
-rw-r--r--sys/dev/nand/nand.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/nand/nand.c b/sys/dev/nand/nand.c
index 113953e..fb83e67 100644
--- a/sys/dev/nand/nand.c
+++ b/sys/dev/nand/nand.c
@@ -65,9 +65,18 @@ __FBSDID("$FreeBSD$");
#define SOFTECC_BYTES 3
int nand_debug_flag = 0;
-SYSCTL_INT(_debug, OID_AUTO, nand_debug, CTLFLAG_RWTUN, &nand_debug_flag, 0,
+SYSCTL_INT(_debug, OID_AUTO, nand_debug, CTLFLAG_RW, &nand_debug_flag, 0,
"NAND subsystem debug flag");
+static void
+nand_tunable_init(void *arg)
+{
+
+ TUNABLE_INT_FETCH("debug.nand", &nand_debug_flag);
+}
+
+SYSINIT(nand_tunables, SI_SUB_VFS, SI_ORDER_ANY, nand_tunable_init, NULL);
+
MALLOC_DEFINE(M_NAND, "NAND", "NAND dynamic data");
static void calculate_ecc(const uint8_t *, uint8_t *);
OpenPOWER on IntegriCloud