From 90bfe6af18c84a7e3ba424cba0c2602d883bd286 Mon Sep 17 00:00:00 2001 From: Terry Lv Date: Wed, 12 May 2010 22:49:24 +0800 Subject: ENGR00122651: Add dwc_ahsata support Add dwc_ahsata support. Signed-off-by: Terry Lv --- common/cmd_sata.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'common/cmd_sata.c') diff --git a/common/cmd_sata.c b/common/cmd_sata.c index 1693a7e..cd21f2a 100644 --- a/common/cmd_sata.c +++ b/common/cmd_sata.c @@ -1,4 +1,7 @@ /* + * (C) Copyright 2008-2010 Freescale Semiconductor, Inc. + * Terry Lv + * * Copyright (C) 2000-2005, DENX Software Engineering * Wolfgang Denk * 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; -- cgit v1.1