From: Simon Glass Date: Thu, 23 Jan 2020 18:48:17 +0000 (-0700) Subject: i2c: ast_i2c: Update to use standard enums for speed X-Git-Tag: v2020.04-rc2~24^2~9 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=642400ced6b5947f8f7aa80558fdbdf1b173a735;p=oweals%2Fu-boot.git i2c: ast_i2c: Update to use standard enums for speed Update this driver to use the new standard enums for speed. Signed-off-by: Simon Glass Reviewed-by: Heiko Schocher --- diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c index 763183d649..35dc234160 100644 --- a/drivers/i2c/ast_i2c.c +++ b/drivers/i2c/ast_i2c.c @@ -314,7 +314,7 @@ static int ast_i2c_set_speed(struct udevice *dev, unsigned int speed) divider = i2c_rate / speed; priv->speed = speed; - if (speed > I2C_HIGHSPEED_RATE) { + if (speed > I2C_SPEED_FAST_RATE) { debug("Enable High Speed\n"); setbits_le32(®s->fcr, I2CD_M_HIGH_SPEED_EN | I2CD_M_SDA_DRIVE_1T_EN diff --git a/drivers/i2c/ast_i2c.h b/drivers/i2c/ast_i2c.h index 401e0970f7..928785989e 100644 --- a/drivers/i2c/ast_i2c.h +++ b/drivers/i2c/ast_i2c.h @@ -126,6 +126,4 @@ struct ast_i2c_regs { #define I2CD_RX_DATA_SHIFT 8 #define I2CD_RX_DATA_MASK (0xff << I2CD_RX_DATA_SHIFT) -#define I2C_HIGHSPEED_RATE 400000 - #endif /* __AST_I2C_H_ */