diff options
Diffstat (limited to 'board/servo_micro/board.h')
-rw-r--r-- | board/servo_micro/board.h | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/board/servo_micro/board.h b/board/servo_micro/board.h index 9a0ca5824d..50e6910811 100644 --- a/board/servo_micro/board.h +++ b/board/servo_micro/board.h @@ -86,38 +86,11 @@ #define CONFIG_USB_I2C #define CONFIG_I2C #define CONFIG_I2C_MASTER -/* - * iteflash requires 256 byte reads for verifying ITE EC firmware. Without this - * the limit is CONFIG_I2C_CHIP_MAX_READ_SIZE which is 255 for STM32F0 due to an - * 8 bit field, per src/platform/ec/include/config.h comment. - */ -#define CONFIG_I2C_XFER_LARGE_READ #define I2C_PORT_MASTER 0 -/* - * As of 2018-11-27 the default for both is 60 bytes. These larger values allow - * for reflashing of ITE EC chips over I2C - * (https://issuetracker.google.com/79684405) in reasonably speedy fashion. If - * the EC firmware defaults are ever raised significantly, consider removing - * these overrides. - * - * As of 2018-11-27 the actual maximum write size supported by the I2C-over-USB - * protocol is (1<<12)-1, and the maximum read size supported is - * (1<<15)-1. However compile time assertions require that these values be - * powers of 2 after overheads are included. Thus, the write limit set here - * /should/ be (1<<12)-4 and the read limit should be (1<<15)-6, however those - * ideal limits are not actually possible because servo_micro lacks sufficient - * spare memory for them. With symmetrical limits, the maximum that currently - * fits is (1<<11)-4 write limit and (1<<11)-6 read limit, leaving 1404 bytes of - * RAM available. - * - * However even with a sufficiently large write value here, the maximum that - * actually works as of 2018-12-03 is 255 bytes. Additionally, ITE EC firmware - * image verification requires exactly 256 byte reads. Thus the only useful - * powers-of-2-minus-overhead limits to set here are (1<<9)-4 writes and - * (1<<9)-6 reads, leaving 6012 bytes of RAM available, down from 7356 bytes of - * RAM available with the default 60 byte limits. - */ +/* See i2c_ite_flash_support.c for more information about these values */ +#define CONFIG_ITE_FLASH_SUPPORT +#define CONFIG_I2C_XFER_LARGE_READ #undef CONFIG_USB_I2C_MAX_WRITE_COUNT #undef CONFIG_USB_I2C_MAX_READ_COUNT #define CONFIG_USB_I2C_MAX_WRITE_COUNT ((1<<9) - 4) |