From: Faiz Abbas <faiz_abbas@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] dfu: Build only RAM for DFU in SPL
Date: Thu, 15 Feb 2018 16:47:42 +0530 [thread overview]
Message-ID: <1518693462-18236-1-git-send-email-faiz_abbas@ti.com> (raw)
In SPL, DFU only has RAM support. Therefore, only build RAM for DFU
in SPL.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
drivers/dfu/Makefile | 5 +++++
include/dfu.h | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/dfu/Makefile b/drivers/dfu/Makefile
index 61f2b71..407be5f 100644
--- a/drivers/dfu/Makefile
+++ b/drivers/dfu/Makefile
@@ -6,8 +6,13 @@
#
obj-$(CONFIG_USB_FUNCTION_DFU) += dfu.o
+
+ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_SPL_DFU_RAM) += dfu_ram.o
+else
obj-$(CONFIG_DFU_MMC) += dfu_mmc.o
obj-$(CONFIG_DFU_NAND) += dfu_nand.o
obj-$(CONFIG_DFU_RAM) += dfu_ram.o
obj-$(CONFIG_DFU_SF) += dfu_sf.o
obj-$(CONFIG_DFU_TFTP) += dfu_tftp.o
+endif
diff --git a/include/dfu.h b/include/dfu.h
index 7e322d9..b25366d 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -203,7 +203,7 @@ static inline void dfu_set_defer_flush(struct dfu_entity *dfu)
int dfu_write_from_mem_addr(struct dfu_entity *dfu, void *buf, int size);
/* Device specific */
-#ifdef CONFIG_DFU_MMC
+#if CONFIG_IS_ENABLED(DFU_MMC)
extern int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, char *s);
#else
static inline int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr,
@@ -214,7 +214,7 @@ static inline int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr,
}
#endif
-#ifdef CONFIG_DFU_NAND
+#if CONFIG_IS_ENABLED(DFU_NAND)
extern int dfu_fill_entity_nand(struct dfu_entity *dfu, char *devstr, char *s);
#else
static inline int dfu_fill_entity_nand(struct dfu_entity *dfu, char *devstr,
@@ -225,7 +225,7 @@ static inline int dfu_fill_entity_nand(struct dfu_entity *dfu, char *devstr,
}
#endif
-#ifdef CONFIG_DFU_RAM
+#if CONFIG_IS_ENABLED(DFU_RAM)
extern int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr, char *s);
#else
static inline int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr,
@@ -236,7 +236,7 @@ static inline int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr,
}
#endif
-#ifdef CONFIG_DFU_SF
+#if CONFIG_IS_ENABLED(DFU_SF)
extern int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr, char *s);
#else
static inline int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr,
--
2.7.4
next reply other threads:[~2018-02-15 11:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 11:17 Faiz Abbas [this message]
2018-02-17 20:51 ` [U-Boot] [PATCH] dfu: Build only RAM for DFU in SPL Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1518693462-18236-1-git-send-email-faiz_abbas@ti.com \
--to=faiz_abbas@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox