From 81b5631258a99365a17d5ea144bc7407d2e33975 Mon Sep 17 00:00:00 2001 From: Fred Reitberger Date: Fri, 21 Oct 2022 15:09:13 -0400 Subject: soc/amd/*/i2c.h: Make definition more accurate Make GPIO_I2C_MASK macro more accurate by using the GPIO_I2Cx_SCL definitions instead of BIT(x). Signed-off-by: Fred Reitberger Change-Id: I13fc376552068a64768fe1cf9f1c09cca1768aed Reviewed-on: https://review.coreboot.org/c/coreboot/+/68682 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier Reviewed-by: Felix Held --- src/soc/amd/cezanne/include/soc/i2c.h | 3 ++- src/soc/amd/mendocino/include/soc/i2c.h | 3 ++- src/soc/amd/picasso/include/soc/i2c.h | 2 +- src/soc/amd/stoneyridge/include/soc/i2c.h | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/soc/amd/cezanne/include/soc/i2c.h b/src/soc/amd/cezanne/include/soc/i2c.h index c0e3e800bb..fa7a5e41b5 100644 --- a/src/soc/amd/cezanne/include/soc/i2c.h +++ b/src/soc/amd/cezanne/include/soc/i2c.h @@ -10,7 +10,8 @@ #define GPIO_I2C1_SCL BIT(1) #define GPIO_I2C2_SCL BIT(2) #define GPIO_I2C3_SCL BIT(3) -#define GPIO_I2C_MASK (BIT(0) | BIT(1) | BIT(2) | BIT(3)) +#define GPIO_I2C_MASK (GPIO_I2C0_SCL | GPIO_I2C1_SCL | \ + GPIO_I2C2_SCL | GPIO_I2C3_SCL) #define I2C0_SCL_PIN GPIO_145 diff --git a/src/soc/amd/mendocino/include/soc/i2c.h b/src/soc/amd/mendocino/include/soc/i2c.h index 157ac86b0b..c691267615 100644 --- a/src/soc/amd/mendocino/include/soc/i2c.h +++ b/src/soc/amd/mendocino/include/soc/i2c.h @@ -10,7 +10,8 @@ #define GPIO_I2C1_SCL BIT(1) #define GPIO_I2C2_SCL BIT(2) #define GPIO_I2C3_SCL BIT(3) -#define GPIO_I2C_MASK (BIT(0) | BIT(1) | BIT(2) | BIT(3)) +#define GPIO_I2C_MASK (GPIO_I2C0_SCL | GPIO_I2C1_SCL | \ + GPIO_I2C2_SCL | GPIO_I2C3_SCL) #define I2C0_SCL_PIN GPIO_145 diff --git a/src/soc/amd/picasso/include/soc/i2c.h b/src/soc/amd/picasso/include/soc/i2c.h index 70562722ff..6a4d1ff948 100644 --- a/src/soc/amd/picasso/include/soc/i2c.h +++ b/src/soc/amd/picasso/include/soc/i2c.h @@ -8,7 +8,7 @@ #define GPIO_I2C2_SCL BIT(2) #define GPIO_I2C3_SCL BIT(3) -#define GPIO_I2C_MASK (BIT(2) | BIT(3)) +#define GPIO_I2C_MASK (GPIO_I2C2_SCL | GPIO_I2C3_SCL) #define I2C2_SCL_PIN GPIO_113 #define I2C3_SCL_PIN GPIO_19 diff --git a/src/soc/amd/stoneyridge/include/soc/i2c.h b/src/soc/amd/stoneyridge/include/soc/i2c.h index 505802e5f1..0ffff377f4 100644 --- a/src/soc/amd/stoneyridge/include/soc/i2c.h +++ b/src/soc/amd/stoneyridge/include/soc/i2c.h @@ -10,7 +10,8 @@ #define GPIO_I2C1_SCL BIT(1) #define GPIO_I2C2_SCL BIT(2) #define GPIO_I2C3_SCL BIT(3) -#define GPIO_I2C_MASK (BIT(0) | BIT(1) | BIT(2) | BIT(3)) +#define GPIO_I2C_MASK (GPIO_I2C0_SCL | GPIO_I2C1_SCL | \ + GPIO_I2C2_SCL | GPIO_I2C3_SCL) #define I2C0_SCL_PIN GPIO_145 #define I2C1_SCL_PIN GPIO_147 -- cgit v1.2.3