Lines Matching refs:copy
48 * eMMC boot partitions, one copy in each.
57 static inline int mmc_offset_try_partition(const char *str, int copy, s64 *val)
92 *val = (info.start + info.size - (1 + copy) * len) * info.blksz;
97 static inline s64 mmc_offset(struct mmc *mmc, int copy)
126 err = mmc_offset_try_partition(str, copy, &val);
134 err = mmc_offset_try_partition(NULL, copy, &val);
142 if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT) && copy) {
150 static inline s64 mmc_offset(struct mmc *mmc, int copy)
154 if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT) && copy)
161 __weak int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr)
163 s64 offset = mmc_offset(mmc, copy);
166 printf("Invalid ENV offset in MMC, copy=%d\n", copy);
263 int ret, copy = 0;
278 copy = 1;
281 ret = mmc_set_env_part(mmc, copy + 1);
287 if (mmc_get_env_addr(mmc, copy, &offset)) {
292 printf("Writing to %sMMC(%d)... ", copy ? "redundant " : "", dev);
332 int ret, copy = 0;
342 if (mmc_get_env_addr(mmc, copy, &offset)) {
351 copy = 1;
354 ret = mmc_set_env_part(mmc, copy + 1);
359 if (mmc_get_env_addr(mmc, copy, &offset)) {