summaryrefslogtreecommitdiff
path: root/cmd/sf.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2019-10-25 20:39:29 +0300
committerTom Rini <trini@konsulko.com>2019-12-05 01:10:51 +0300
commiteb446ef625bcff969f3e1d3a6874ce9d56113e9b (patch)
tree007af705dcc556a8382b6bc2199320e6df566d7f /cmd/sf.c
parent587f44576e23174f1151f52b2c351777eb1b89ff (diff)
downloadu-boot-eb446ef625bcff969f3e1d3a6874ce9d56113e9b.tar.xz
cmd: nand/sf: isolate legacy code
The 'sf' command is not supposed to rely on the MTD stack, but both 'sf' and 'nand' commands use helpers located in mtd_uboot.c. Despite their location, these functions do not depend at all on the MTD stack. This file (drivers/mtd/mtd_uboot.c) is only compiled if CONFIG_MTD is selected, which is inconsistent with the current situation. Solve this by moving these three functions (which are only used by the above two commands) out of mtd_uboot.c and put them in a C file only compiled with cmd/sf.c and cmd/nand.c. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> [trini: Don't export get_part function now] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'cmd/sf.c')
-rw-r--r--cmd/sf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/sf.c b/cmd/sf.c
index 6ccf98ae51..e993b3e5ad 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -18,6 +18,8 @@
#include <asm/io.h>
#include <dm/device-internal.h>
+#include "legacy-mtd-utils.h"
+
static struct spi_flash *flash;
/*