Author: stefanct Date: Mon Jan 26 00:42:57 2015 New Revision: 1873 URL: http://flashrom.org/trac/flashrom/changeset/1873
Log: ftdi2232_spi: revert usage of DIS_DIV_5 macro.
In r1872 we replaced some magic values with constant macros from ftdi.h. Among them was DIS_DIV_5 that represents the opcode that disables the use of the 5x prescaler on newer devices. Unfortunately this macro was only introduced with support for FT232H and hence is not available in older versions of the library. Revert back to using the magic constant.
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at Acked-by: Stefan Tauner stefan.tauner@alumni.tuwien.ac.at
Modified: trunk/ft2232_spi.c
Modified: trunk/ft2232_spi.c ============================================================================== --- trunk/ft2232_spi.c Sun Jan 25 04:52:47 2015 (r1872) +++ trunk/ft2232_spi.c Mon Jan 26 00:42:57 2015 (r1873) @@ -360,7 +360,7 @@
if (clock_5x) { msg_pdbg("Disable divide-by-5 front stage\n"); - buf[0] = DIS_DIV_5; + buf[0] = 0x8a; /* Disable divide-by-5. DIS_DIV_5 in newer libftdi */ if (send_buf(ftdic, buf, 1)) { ret = -5; goto ftdi_err;
On Mon, 26 Jan 2015 00:42:57 +0100 repository service svn@flashrom.org wrote:
Author: stefanct Date: Mon Jan 26 00:42:57 2015 New Revision: 1873 URL: http://flashrom.org/trac/flashrom/changeset/1873
Log: ftdi2232_spi: revert usage of DIS_DIV_5 macro.
In r1872 we replaced some magic values with constant macros from ftdi.h. Among them was DIS_DIV_5 that represents the opcode that disables the use of the 5x prescaler on newer devices. Unfortunately this macro was only introduced with support for FT232H and hence is not available in older versions of the library. Revert back to using the magic constant.
...
============================================================================== --- trunk/ft2232_spi.c Sun Jan 25 04:52:47 2015 (r1872) +++ trunk/ft2232_spi.c Mon Jan 26 00:42:57 2015 (r1873) @@ -360,7 +360,7 @@
if (clock_5x) { msg_pdbg("Disable divide-by-5 front stage\n");
buf[0] = DIS_DIV_5;
buf[0] = 0x8a; /* Disable divide-by-5. DIS_DIV_5 in newer libftdi */
#ifndef DIS_DIV_5 #define DIS_DIV_5 0x8a #endif
?
if (send_buf(ftdic, buf, 1)) { ret = -5; goto ftdi_err;
flashrom mailing list flashrom@flashrom.org http://www.flashrom.org/mailman/listinfo/flashrom
On Wed, 28 Jan 2015 21:16:01 +0400 Antony Pavlov antonynpavlov@gmail.com wrote:
On Mon, 26 Jan 2015 00:42:57 +0100 repository service svn@flashrom.org wrote:
============================================================================== --- trunk/ft2232_spi.c Sun Jan 25 04:52:47 2015 (r1872) +++ trunk/ft2232_spi.c Mon Jan 26 00:42:57 2015 (r1873) @@ -360,7 +360,7 @@
if (clock_5x) { msg_pdbg("Disable divide-by-5 front stage\n");
buf[0] = DIS_DIV_5;
buf[0] = 0x8a; /* Disable divide-by-5. DIS_DIV_5 in newer libftdi */
#ifndef DIS_DIV_5 #define DIS_DIV_5 0x8a #endif
Possible but really not worth it IMHO :)