diff options
Diffstat (limited to 'src/soc/amd')
-rw-r--r-- | src/soc/amd/common/block/i2c/i2c.c | 5 | ||||
-rw-r--r-- | src/soc/amd/common/block/include/amdblocks/i2c.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/soc/amd/common/block/i2c/i2c.c b/src/soc/amd/common/block/i2c/i2c.c index 30fa6e7362..ba89e9c589 100644 --- a/src/soc/amd/common/block/i2c/i2c.c +++ b/src/soc/amd/common/block/i2c/i2c.c @@ -12,6 +12,7 @@ #include <device/i2c.h> #include <device/mmio.h> #include <drivers/i2c/designware/dw_i2c.h> +#include <types.h> #define MAX_PIN_COUNT 4 @@ -154,7 +155,7 @@ static void restore_i2c_pin_registers(uint8_t gpio, struct common_i2c_save *save static void drive_scl(const struct soc_i2c_peripheral_reset_info *reset_info, uint32_t val) { - uint8_t j; + size_t j; for (j = 0; j < reset_info->num_pins; j++) { if (reset_info->i2c_scl_reset_mask & reset_info->i2c_scl[j].pin_mask) @@ -172,7 +173,7 @@ static void drive_scl(const struct soc_i2c_peripheral_reset_info *reset_info, ui void sb_reset_i2c_peripherals(const struct soc_i2c_peripheral_reset_info *reset_info) { struct common_i2c_save save_table[MAX_PIN_COUNT]; - uint8_t i; + size_t i; if (!reset_info || !reset_info->i2c_scl || !reset_info->num_pins || !reset_info->i2c_scl_reset_mask) diff --git a/src/soc/amd/common/block/include/amdblocks/i2c.h b/src/soc/amd/common/block/include/amdblocks/i2c.h index 497de6f28e..4a7a7e83a0 100644 --- a/src/soc/amd/common/block/include/amdblocks/i2c.h +++ b/src/soc/amd/common/block/include/amdblocks/i2c.h @@ -46,7 +46,7 @@ struct soc_i2c_scl_pin { struct soc_i2c_peripheral_reset_info { uint8_t i2c_scl_reset_mask; const struct soc_i2c_scl_pin *i2c_scl; - uint32_t num_pins; + size_t num_pins; }; /* Helper function to perform misc I2C configuration specific to SoC. */ |