Skip to contentSkip to conversation

dfu: Build only RAM for DFU in SPL

PATCH New Faiz Abbas 2 participants 2 messages Feb 15, 2018 – Feb 17, 2018

lore
Share & tools
lore

Faiz Abbas

author
#0 lore raw

PATCH 1/1 dfu: Build only RAM for DFU in SPL

In SPL, DFU only has RAM support. Therefore, only build RAM for DFU in SPL.

---
 drivers/dfu/Makefile | 5 +++++
 include/dfu.h        | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/dfu/Makefile +5 -0
index 61f2b71..407be5f 100644
@@ -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
include/dfu.h +4 -4
index 7e322d9..b25366d 100644
@@ -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,
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 dfu: Build only RAM for DFU in SPL

Quoted 4 lines · Faiz Abbas

In SPL, DFU only has RAM support. Therefore, only build RAM for DFU in SPL.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180217/7bf3c768/attachment.sig>