Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Side by Side Diff: cli_mfg.c

Issue 6731011: Add Tegra2 SPI controller. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/flashrom.git@master
Patch Set: refine comments Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * This file is part of the flashrom project. 2 * This file is part of the flashrom project.
3 * 3 *
4 * Copyright (C) 2000 Silicon Integrated System Corporation 4 * Copyright (C) 2000 Silicon Integrated System Corporation
5 * Copyright (C) 2004 Tyan Corp <yhlu@tyan.com> 5 * Copyright (C) 2004 Tyan Corp <yhlu@tyan.com>
6 * Copyright (C) 2005-2008 coresystems GmbH 6 * Copyright (C) 2005-2008 coresystems GmbH
7 * Copyright (C) 2008,2009,2010 Carl-Daniel Hailfinger 7 * Copyright (C) 2008,2009,2010 Carl-Daniel Hailfinger
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 10 * it under the terms of the GNU General Public License as published by
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 if (acquire_big_lock(LOCK_TIMEOUT_SECS) < 0) { 442 if (acquire_big_lock(LOCK_TIMEOUT_SECS) < 0) {
443 msg_gerr("Could not acquire lock.\n"); 443 msg_gerr("Could not acquire lock.\n");
444 exit(1); 444 exit(1);
445 } 445 }
446 msg_gdbg("Lock acquired.\n"); 446 msg_gdbg("Lock acquired.\n");
447 #endif 447 #endif
448 448
449 /* FIXME: Delay calibration should happen in programmer code. */ 449 /* FIXME: Delay calibration should happen in programmer code. */
450 myusec_calibrate_delay(); 450 myusec_calibrate_delay();
451 451
452 msg_pdbg("Initializing %s programmer\n",
453 programmer_table[programmer].name);
Stefan Reinauer 2011/03/25 16:57:47 This was separated out into an extra CL
Louis 2011/03/29 07:55:02 Done.
454 if (programmer_init(pparam)) { 452 if (programmer_init(pparam)) {
455 fprintf(stderr, "Error: Programmer initialization failed.\n"); 453 fprintf(stderr, "Error: Programmer initialization failed.\n");
456 rc = 1; 454 rc = 1;
457 goto cli_mfg_release_lock_exit; 455 goto cli_mfg_release_lock_exit;
458 } 456 }
459 457
460 /* FIXME: Delay calibration should happen in programmer code. */ 458 /* FIXME: Delay calibration should happen in programmer code. */
461 for (i = 0; i < ARRAY_SIZE(flashes); i++) { 459 for (i = 0; i < ARRAY_SIZE(flashes); i++) {
462 flashes[i] = 460 flashes[i] =
463 probe_flash(i ? flashes[i - 1] + 1 : flashchips, 0); 461 probe_flash(i ? flashes[i - 1] + 1 : flashchips, 0);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 596
599 msg_ginfo("%s\n", rc ? "FAILED" : "SUCCESS"); 597 msg_ginfo("%s\n", rc ? "FAILED" : "SUCCESS");
600 cli_mfg_silent_exit: 598 cli_mfg_silent_exit:
601 programmer_shutdown(); /* must be done after chip_restore() */ 599 programmer_shutdown(); /* must be done after chip_restore() */
602 cli_mfg_release_lock_exit: 600 cli_mfg_release_lock_exit:
603 #if USE_BIG_LOCK == 1 601 #if USE_BIG_LOCK == 1
604 release_big_lock(); 602 release_big_lock();
605 #endif 603 #endif
606 return rc; 604 return rc;
607 } 605 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698