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

Side by Side Diff: mec1308.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) 2010 Google Inc. 4 * Copyright (C) 2010 Google Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * Redistributions of source code must retain the above copyright 10 * Redistributions of source code must retain the above copyright
(...skipping 14 matching lines...) Expand all
25 * GOOGLE INC AND ITS LICENSORS SHALL NOT BE LIABLE 25 * GOOGLE INC AND ITS LICENSORS SHALL NOT BE LIABLE
26 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING 26 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
27 * OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL 27 * OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
28 * GOOGLE OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, 28 * GOOGLE OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
29 * OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR 29 * OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
30 * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF 30 * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
31 * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, 31 * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
32 * EVEN IF GOOGLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 32 * EVEN IF GOOGLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
33 */ 33 */
34 34
35 #if defined(__i386__) || defined(__x86_64__)
Stefan Reinauer 2011/03/25 16:57:47 I think this decision should be made elsewhere. An
Louis 2011/03/29 07:55:02 hm... the code has be committed in David's CL. O
35 #include <inttypes.h> 36 #include <inttypes.h>
36 #include <string.h> 37 #include <string.h>
37 #include <unistd.h> 38 #include <unistd.h>
38 39
39 #include "flash.h" 40 #include "flash.h"
40 #include "chipdrivers.h" 41 #include "chipdrivers.h"
41 #include "programmer.h" 42 #include "programmer.h"
42 #include "spi.h" 43 #include "spi.h"
43 44
44 #define MEC1308_SIO_PORT1 0x2e 45 #define MEC1308_SIO_PORT1 0x2e
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 for (i = 0; i < readcnt; i++) { 435 for (i = 0; i < readcnt; i++) {
435 mbx_write(MEC1308_MBX_CMD, MEC1308_CMD_PASSTHRU_READ); 436 mbx_write(MEC1308_MBX_CMD, MEC1308_CMD_PASSTHRU_READ);
436 readarr[i] = mbx_read(MEC1308_MBX_DATA_START); 437 readarr[i] = mbx_read(MEC1308_MBX_DATA_START);
437 } 438 }
438 439
439 if (mec1308_chip_deselect()) 440 if (mec1308_chip_deselect())
440 return 1; 441 return 1;
441 442
442 return 0; 443 return 0;
443 } 444 }
445 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698