]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_sata.c
imported Freescale specific U-Boot additions for i.MX28,... release L2.6.31_10.08.01
[karo-tx-uboot.git] / common / cmd_sata.c
index 1693a7e312fb606890d43dd5a741983da9b47c4c..cd21f2a9901d0ded0085abac61c169ecce607b82 100644 (file)
@@ -1,4 +1,7 @@
 /*
+ * (C) Copyright 2008-2010 Freescale Semiconductor, Inc.
+ * Terry Lv <r65388@freescale.com>
+ *
  * Copyright (C) 2000-2005, DENX Software Engineering
  *             Wolfgang Denk <wd@denx.de>
  * Copyright (C) Procsys. All rights reserved.
@@ -48,9 +51,12 @@ int __sata_initialize(void)
                sata_dev_desc[i].block_write = sata_write;
 
                rc = init_sata(i);
-               rc = scan_sata(i);
-               if ((sata_dev_desc[i].lba > 0) && (sata_dev_desc[i].blksz > 0))
-                       init_part(&sata_dev_desc[i]);
+               if (!rc) {
+                       rc = scan_sata(i);
+                       if ((sata_dev_desc[i].lba > 0) &&
+                               (sata_dev_desc[i].blksz > 0))
+                               init_part(&sata_dev_desc[i]);
+               }
        }
        sata_curr_device = 0;
        return rc;