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>
Showing
- arch/arm/mach-imx/cmd_nandbcb.c 2 additions, 0 deletionsarch/arm/mach-imx/cmd_nandbcb.c
- cmd/Makefile 3 additions, 0 deletionscmd/Makefile
- cmd/legacy-mtd-utils.c 99 additions, 0 deletionscmd/legacy-mtd-utils.c
- cmd/legacy-mtd-utils.h 12 additions, 0 deletionscmd/legacy-mtd-utils.h
- cmd/nand.c 2 additions, 0 deletionscmd/nand.c
- cmd/sf.c 2 additions, 0 deletionscmd/sf.c
- drivers/mtd/Makefile 1 addition, 1 deletiondrivers/mtd/Makefile
- drivers/mtd/mtd_uboot.c 0 additions, 94 deletionsdrivers/mtd/mtd_uboot.c
- include/linux/mtd/mtd.h 0 additions, 6 deletionsinclude/linux/mtd/mtd.h
Loading
Please register or sign in to comment