X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fdfu.h;h=26ffbc8e81d2d4ac82620b179a84f5077cf01b7b;hb=6e7b7df4df435742fcfde5f384760ae1bda2e39c;hp=f973426aa90b321e34e0127e785f114b869261f4;hpb=2d65256bb0ea105eb11e30c1beb6da121b719f06;p=oweals%2Fu-boot.git diff --git a/include/dfu.h b/include/dfu.h index f973426aa9..26ffbc8e81 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -43,6 +43,9 @@ struct mmc_internal_data { unsigned int lba_size; unsigned int lba_blk_size; + /* eMMC HW partition access */ + int hw_partition; + /* FAT/EXT */ unsigned int dev; unsigned int part; @@ -64,11 +67,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 +78,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]; @@ -102,6 +103,7 @@ struct dfu_entity { u64 offset, void *buf, long *len); int (*flush_medium)(struct dfu_entity *dfu); + unsigned int (*poll_timeout)(struct dfu_entity *dfu); struct list_head list; @@ -138,6 +140,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 +172,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_ */