mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-23 23:22:02 +00:00
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>
This commit is contained in:
parent
587f44576e
commit
eb446ef625
9 changed files with 121 additions and 101 deletions
12
cmd/legacy-mtd-utils.h
Normal file
12
cmd/legacy-mtd-utils.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
|
||||
#ifndef __LEGACY_MTD_UTILS_H
|
||||
#define __LEGACY_MTD_UTILS_H
|
||||
|
||||
int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,
|
||||
loff_t *maxsize, int devtype, uint64_t chipsize);
|
||||
int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
|
||||
loff_t *size, loff_t *maxsize, int devtype,
|
||||
uint64_t chipsize);
|
||||
|
||||
#endif /* LEGACY_MTD_UTILS_H */
|
Loading…
Add table
Add a link
Reference in a new issue