]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/dfu.h
mmc: remove the unnecessary define and fix the wrong bit control
[people/ms/u-boot.git] / include / dfu.h
index f973426aa90b321e34e0127e785f114b869261f4..240916854a12a7ce8745b0ef843f6c0e4d03a325 100644 (file)
@@ -64,11 +64,6 @@ struct ram_internal_data {
        unsigned int    size;
 };
 
-static inline unsigned int get_mmc_blk_size(int dev)
-{
-       return find_mmc_device(dev)->read_bl_len;
-}
-
 #define DFU_NAME_SIZE                  32
 #define DFU_CMD_BUF_SIZE               128
 #ifndef CONFIG_SYS_DFU_DATA_BUF_SIZE
@@ -80,6 +75,9 @@ static inline unsigned int get_mmc_blk_size(int dev)
 #ifndef DFU_DEFAULT_POLL_TIMEOUT
 #define DFU_DEFAULT_POLL_TIMEOUT 0
 #endif
+#ifndef DFU_MANIFEST_POLL_TIMEOUT
+#define DFU_MANIFEST_POLL_TIMEOUT      DFU_DEFAULT_POLL_TIMEOUT
+#endif
 
 struct dfu_entity {
        char                    name[DFU_NAME_SIZE];
@@ -138,6 +136,7 @@ unsigned long dfu_get_buf_size(void);
 
 int dfu_read(struct dfu_entity *de, void *buf, int size, int blk_seq_num);
 int dfu_write(struct dfu_entity *de, void *buf, int size, int blk_seq_num);
+int dfu_flush(struct dfu_entity *de, void *buf, int size, int blk_seq_num);
 /* Device specific */
 #ifdef CONFIG_DFU_MMC
 extern int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *s);
@@ -169,12 +168,5 @@ static inline int dfu_fill_entity_ram(struct dfu_entity *dfu, char *s)
 }
 #endif
 
-#ifdef CONFIG_DFU_FUNCTION
 int dfu_add(struct usb_configuration *c);
-#else
-int dfu_add(struct usb_configuration *c)
-{
-       return 0;
-}
-#endif
 #endif /* __DFU_ENTITY_H_ */