]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - disk/part.c
board: karo: add 'ftd resize' to 'fdtsave' command
[karo-tx-uboot.git] / disk / part.c
index 58a45637aabe331b7fe587b0a1928f7e064c0ee9..6827744df363517738570ee0d10dd79f6ef13781 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>
 #define PRINTF(fmt,args...)
 #endif
 
-/* Rather than repeat this expression each time, add a define for it */
-#if (defined(CONFIG_CMD_IDE) || \
-     defined(CONFIG_CMD_SATA) || \
-     defined(CONFIG_CMD_SCSI) || \
-     defined(CONFIG_CMD_USB) || \
-     defined(CONFIG_MMC) || \
-     defined(CONFIG_SYSTEMACE) )
-#define HAVE_BLOCK_DEVICE
-#endif
-
 struct block_drvr {
        char *name;
        block_dev_desc_t* (*get_dev)(int dev);
@@ -54,6 +28,9 @@ static const struct block_drvr block_drvr[] = {
 #if defined(CONFIG_CMD_IDE)
        { .name = "ide", .get_dev = ide_get_dev, },
 #endif
+#if defined(CONFIG_CMD_PATA)
+       { .name = "pata", .get_dev = pata_get_dev, },
+#endif
 #if defined(CONFIG_CMD_SATA)
        {.name = "sata", .get_dev = sata_get_dev, },
 #endif
@@ -558,6 +535,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;
@@ -641,6 +620,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;