Lines Matching defs:mtdids

35  * 'mtdids' - linux kernel mtd device id <-> u-boot device id mapping
37 * mtdids=<idmap>[,<idmap>,...]
64 * mtdids=nor0=edb7312-nor
68 * mtdids=nor0=edb7312-nor,nand0=edb7312-nand
113 /* default values for mtdids and mtdparts variables */
126 extern void board_mtdparts_default(const char **mtdids, const char **mtdparts);
131 /* copies of last seen 'mtdids', 'mtdparts' and 'partition' env variables */
142 /* mtdids mapping list, filled by parse_ids() */
143 static struct list_head mtdids;
157 static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_len);
328 static int part_validate_eraseblock(struct mtdids *id, struct part_info *part)
415 static int part_validate(struct mtdids *id, struct part_info *part)
844 struct mtdids *id;
981 * Search global mtdids list and find id of requested type and number.
985 static struct mtdids* id_find(u8 type, u8 num)
988 struct mtdids *id;
990 list_for_each(entry, &mtdids) {
991 id = list_entry(entry, struct mtdids, link);
1001 * Search global mtdids list and find id of a requested mtd_id.
1009 static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_len)
1012 struct mtdids *id;
1017 list_for_each(entry, &mtdids) {
1018 id = list_entry(entry, struct mtdids, link);
1325 printf("mtdids : %s\n",
1603 * Parse provided string describing mtdids mapping (see file header for mtdids
1605 * to the global mtdids list.
1615 struct mtdids *id;
1617 struct mtdids *id_tmp;
1624 /* clean global mtdids list */
1625 list_for_each_safe(entry, n, &mtdids) {
1626 id_tmp = list_entry(entry, struct mtdids, link);
1627 debug("mtdids del: %d %d\n", id_tmp->type, id_tmp->num);
1632 INIT_LIST_HEAD(&mtdids);
1642 printf("mtdids: incorrect <dev-num>\n");
1660 printf("mtdids: no <mtd-id> identifier\n");
1666 list_for_each(entry, &mtdids) {
1667 id_tmp = list_entry(entry, struct mtdids, link);
1674 printf("device id %s%d redefined, please correct mtdids variable\n",
1679 /* allocate mtdids structure */
1680 if (!(id = (struct mtdids *)malloc(sizeof(struct mtdids) + mtd_id_len))) {
1684 memset(id, 0, sizeof(struct mtdids) + mtd_id_len);
1697 list_add_tail(&id->link, &mtdids);
1701 /* clean mtdids list and free allocated memory */
1702 list_for_each_safe(entry, n, &mtdids) {
1703 id_tmp = list_entry(entry, struct mtdids, link);
1715 * Parse and initialize global mtdids mapping and create global
1731 INIT_LIST_HEAD(&mtdids);
1744 ids = env_get("mtdids");
1763 /* if mtdids variable is empty try to use defaults */
1766 debug("mtdids variable not defined, using default\n");
1768 env_set("mtdids", (char *)ids);
1770 printf("mtdids not defined, no default present\n");
1775 printf("mtdids too long (> %d)\n", MTDIDS_MAXLEN);
1795 /* check if we have already parsed those mtdids */
1810 /* parse partitions if either mtdparts or mtdids were updated */
1961 env_set("mtdids", NULL);
1999 struct mtdids *id;
2006 printf("no such device %s defined in mtdids variable\n", argv[2]);
2110 "'mtdids' - linux kernel mtd device id <-> u-boot device id mapping\n\n"
2111 "mtdids=<idmap>[,<idmap>,...]\n\n"