]> git.sur5r.net Git - u-boot/blobdiff - disk/part.c
Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/master
[u-boot] / disk / part.c
index b0c909cf28a404d6b3fc03270e61accc7e0c261e..3c71208a12bb0e05cbb9e3e112bc83e114ceaa69 100644 (file)
@@ -35,6 +35,7 @@
 #endif
 
 #if (defined(CONFIG_CMD_IDE) || \
+     defined(CONFIG_CMD_SATA) || \
      defined(CONFIG_CMD_SCSI) || \
      defined(CONFIG_CMD_USB) || \
      defined(CONFIG_MMC) || \
@@ -49,6 +50,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_SATA)
+       {.name = "sata", .get_dev = sata_get_dev, },
+#endif
 #if defined(CONFIG_CMD_SCSI)
        { .name = "scsi", .get_dev = scsi_get_dev, },
 #endif
@@ -87,6 +91,7 @@ block_dev_desc_t *get_dev(char* ifname, int dev)
 #endif
 
 #if (defined(CONFIG_CMD_IDE) || \
+     defined(CONFIG_CMD_SATA) || \
      defined(CONFIG_CMD_SCSI) || \
      defined(CONFIG_CMD_USB) || \
      defined(CONFIG_MMC) || \
@@ -116,6 +121,12 @@ void dev_print (block_dev_desc_t *dev_desc)
                        dev_desc->vendor,
                        dev_desc->revision,
                        dev_desc->product);
+       }
+       if (dev_desc->if_type==IF_TYPE_SATA) {
+               printf ("Model: %s Firm: %s Ser#: %s\n",
+                       dev_desc->vendor,
+                       dev_desc->revision,
+                       dev_desc->product);
        } else {
                printf ("Vendor: %s Prod.: %s Rev: %s\n",
                        dev_desc->vendor,
@@ -174,13 +185,13 @@ void dev_print (block_dev_desc_t *dev_desc)
                puts ("            Capacity: not available\n");
        }
 }
-#endif /* CFG_CMD_IDE || CFG_CMD_SCSI || CFG_CMD_USB || CONFIG_MMC */
+#endif
 
 #if (defined(CONFIG_CMD_IDE) || \
+     defined(CONFIG_CMD_SATA) || \
      defined(CONFIG_CMD_SCSI) || \
      defined(CONFIG_CMD_USB) || \
      defined(CONFIG_MMC)               || \
-     (defined(CONFIG_MMC) && defined(CONFIG_LPC2292)) || \
      defined(CONFIG_SYSTEMACE)          )
 
 #if defined(CONFIG_MAC_PARTITION) || \
@@ -223,7 +234,7 @@ void init_part (block_dev_desc_t * dev_desc)
 int get_partition_info (block_dev_desc_t *dev_desc, int part
                                        , disk_partition_t *info)
 {
-               switch (dev_desc->part_type) {
+       switch (dev_desc->part_type) {
 #ifdef CONFIG_MAC_PARTITION
        case PART_TYPE_MAC:
                if (get_partition_info_mac(dev_desc,part,info) == 0) {
@@ -272,6 +283,8 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc)
        switch (dev_desc->if_type) {
                case IF_TYPE_IDE:       puts ("IDE");
                                        break;
+               case IF_TYPE_SATA:      puts ("SATA");
+                                       break;
                case IF_TYPE_SCSI:      puts ("SCSI");
                                        break;
                case IF_TYPE_ATAPI:     puts ("ATAPI");