Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 | |
| OLD | NEW |