diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-04-21 10:44:16 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-04-21 11:15:56 +0200 |
commit | eb888225cbe51f81d30836d3f8a645f254f98ddf (patch) | |
tree | c961060a89890134f9878462078de2113b89a7ee /arch/arm | |
parent | 3b79b3e0e5d90ec8cf955f267ec3c8fd2063aafb (diff) | |
download | barebox-eb888225cbe51f81d30836d3f8a645f254f98ddf.tar.gz barebox-eb888225cbe51f81d30836d3f8a645f254f98ddf.tar.xz |
ARM: omap: Fix linker error with MTD disabled
We are using mtd functions now, make sure we do so only with MTD enabled
to prevent linker errors.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap/xload.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-omap/xload.c b/arch/arm/mach-omap/xload.c index d786e6ceb2..6d3704b8cf 100644 --- a/arch/arm/mach-omap/xload.c +++ b/arch/arm/mach-omap/xload.c @@ -53,6 +53,11 @@ static void *read_mtd_barebox(const char *part, unsigned int start, unsigned int struct mtd_info *mtd; unsigned int ps, pe; + if (!IS_ENABLED(CONFIG_MTD)) { + printf("Cannot load from nand/nor: MTD support is disabled\n"); + return NULL; + } + cdev = cdev_open_by_name(part, O_RDONLY); if (!cdev) { printf("failed to open partition\n"); |