Lines Matching defs:mtdids
21 void board_mtdparts_default(const char **mtdids, const char **mtdparts);
26 const char *mtdids = env_get("mtdids");
28 if (mtdids)
29 return mtdids;
32 board_mtdparts_default(&mtdids, &mtdparts);
34 mtdids = CONFIG_MTDIDS_DEFAULT;
37 if (mtdids)
38 env_set("mtdids", mtdids);
40 return mtdids;
45 * the mtdids legacy environment variable.
47 * The mtdids string is a list of comma-separated 'dev_id=mtd_id' tupples.
60 const char *mtdids, *equal, *comma, *dev_id, *mtd_id;
63 mtdids = get_mtdids();
64 if (!mtdids)
69 dev_id = mtdids;
73 dev_id_len = equal - mtdids;
77 comma = strchr(mtdids, ',');
81 mtd_id_len = &mtdids[strlen(mtdids)] - mtd_id + 1;
98 mtdids = comma + 1;
134 __maybe_unused const char *mtdids = NULL;
147 board_mtdparts_default(&mtdids, &mtdparts);
206 static int parse_mtdparts(const char *mtdparts, const char *mtdids)
254 * the same type and number as defined in the mtdids.
317 const char *mtdids = get_mtdids();
324 * Check if mtdparts/mtdids changed, if the MTD dev list was updated
329 if ((!mtdparts && !old_mtdparts && !mtdids && !old_mtdids) ||
330 (mtdparts && old_mtdparts && mtdids && old_mtdids &&
333 !strcmp(mtdids, old_mtdids)))
340 old_mtdids = strdup(mtdids);
355 /* If both mtdparts and mtdids are non-empty, parse */
356 if (mtdparts && mtdids) {
357 if (parse_mtdparts(mtdparts, mtdids) < 0)