]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - disk/part.c
fw_env: calculate default number of env sectors
[karo-tx-uboot.git] / disk / part.c
index d73625c4434c622a4a8d3e0ed78e41667b6eabf5..6941033d8d7b7850561e9cd386ce62433ab1cdcd 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2001
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -58,6 +42,9 @@ static const struct block_drvr block_drvr[] = {
 #endif
 #if defined(CONFIG_SYSTEMACE)
        { .name = "ace", .get_dev = systemace_get_dev, },
+#endif
+#if defined(CONFIG_SANDBOX)
+       { .name = "host", .get_dev = host_get_dev, },
 #endif
        { },
 };
@@ -302,6 +289,9 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc)
        case IF_TYPE_MMC:
                puts ("MMC");
                break;
+       case IF_TYPE_HOST:
+               puts("HOST");
+               break;
        default:
                puts ("UNKNOWN");
                break;
@@ -548,6 +538,8 @@ int get_device_and_partition(const char *ifname, const char *dev_part_str,
                        goto cleanup;
                }
 
+               (*dev_desc)->log2blksz = LOG2((*dev_desc)->blksz);
+
                info->start = 0;
                info->size = (*dev_desc)->lba;
                info->blksz = (*dev_desc)->blksz;
@@ -631,6 +623,8 @@ int get_device_and_partition(const char *ifname, const char *dev_part_str,
                goto cleanup;
        }
 
+       (*dev_desc)->log2blksz = LOG2((*dev_desc)->blksz);
+
        ret = part;
        goto cleanup;