Commit 899a52821515d79f9e4e525fd3098bdb574062ed
Committed by
Marek Vasut
1 parent
372d7decfe
Exists in
v2017.01-smarct4x
and in
37 other branches
dfu: samsung: move call to set_dfu_alt_info() to dfu common code
This common call can be used for setting proper entities based on dfu command arguments. The config: CONFIG_SET_DFU_ALT_INFO, was used only for few configs, and now it is common. The board file should implement: - set_dfu_alt_info() function Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [Test HW: Odroid U3 (Exynos 4412)]
Showing 5 changed files with 11 additions and 9 deletions Side-by-side Diff
board/samsung/common/board.c
board/samsung/common/misc.c
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | DECLARE_GLOBAL_DATA_PTR; |
23 | 23 | |
24 | 24 | #ifdef CONFIG_SET_DFU_ALT_INFO |
25 | -void set_dfu_alt_info(void) | |
25 | +void set_dfu_alt_info(char *interface, char *devstr) | |
26 | 26 | { |
27 | 27 | size_t buf_size = CONFIG_SET_DFU_ALT_BUF_LEN; |
28 | 28 | ALLOC_CACHE_ALIGN_BUFFER(char, buf, buf_size); |
29 | 29 | |
... | ... | @@ -34,13 +34,13 @@ |
34 | 34 | |
35 | 35 | puts("DFU alt info setting: "); |
36 | 36 | |
37 | - alt_setting = get_dfu_alt_boot(); | |
37 | + alt_setting = get_dfu_alt_boot(interface, devstr); | |
38 | 38 | if (alt_setting) { |
39 | 39 | setenv("dfu_alt_boot", alt_setting); |
40 | 40 | offset = snprintf(buf, buf_size, "%s", alt_setting); |
41 | 41 | } |
42 | 42 | |
43 | - alt_setting = get_dfu_alt_system(); | |
43 | + alt_setting = get_dfu_alt_system(interface, devstr); | |
44 | 44 | if (alt_setting) { |
45 | 45 | if (offset) |
46 | 46 | alt_sep = ";"; |
drivers/dfu/dfu.c
include/dfu.h
... | ... | @@ -140,6 +140,9 @@ |
140 | 140 | unsigned int inited:1; |
141 | 141 | }; |
142 | 142 | |
143 | +#ifdef CONFIG_SET_DFU_ALT_INFO | |
144 | +void set_dfu_alt_info(char *interface, char *devstr); | |
145 | +#endif | |
143 | 146 | int dfu_config_entities(char *s, char *interface, char *devstr); |
144 | 147 | void dfu_free_entities(void); |
145 | 148 | void dfu_show_entities(void); |
include/samsung/misc.h
... | ... | @@ -29,9 +29,8 @@ |
29 | 29 | #endif |
30 | 30 | |
31 | 31 | #ifdef CONFIG_SET_DFU_ALT_INFO |
32 | -char *get_dfu_alt_system(void); | |
33 | -char *get_dfu_alt_boot(void); | |
34 | -void set_dfu_alt_info(void); | |
32 | +char *get_dfu_alt_system(char *interface, char *devstr); | |
33 | +char *get_dfu_alt_boot(char *interface, char *devstr); | |
35 | 34 | #endif |
36 | 35 | #ifdef CONFIG_BOARD_TYPES |
37 | 36 | void set_board_type(void); |