[coreboot-gerrit] Patch set updated for coreboot: mainboard/intel/galileo: Remove use of EDK-II macros & data types
Lee Leahy (leroy.p.leahy@intel.com)
gerrit at coreboot.org
Mon Aug 1 20:14:49 CEST 2016
Lee Leahy (leroy.p.leahy at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15859
-gerrit
commit d0a1e48d56baad3f639db17d2e38a6467bc27467
Author: Lee Leahy <leroy.p.leahy at intel.com>
Date: Thu Jul 21 09:28:56 2016 -0700
mainboard/intel/galileo: Remove use of EDK-II macros & data types
Replace the use of ASSERT macro with if/die.
Replace the use of UINT8 data type with uint8_t.
TEST=Build and run on Galileo Gen2.
Change-Id: I0756b0f30b3488647530e2dd1a4ab62813815f3e
Signed-off-by: Lee Leahy <leroy.p.leahy at intel.com>
---
src/mainboard/intel/galileo/reg_access.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/mainboard/intel/galileo/reg_access.c b/src/mainboard/intel/galileo/reg_access.c
index 36345ff..8934e8a 100644
--- a/src/mainboard/intel/galileo/reg_access.c
+++ b/src/mainboard/intel/galileo/reg_access.c
@@ -45,8 +45,9 @@ static uint64_t reg_read(struct reg_script_context *ctx)
case GEN2_I2C_LED_PWM:
if (ctx->display_features)
printk(BIOS_INFO, "I2C chip 0x%02x: ", step->id);
- ret_code = i2c_readb(0, step->id, (UINT8)step->reg, &value);
- ASSERT(ret_code == 2);
+ ret_code = i2c_readb(0, step->id, (uint8_t)step->reg, &value);
+ if (ret_code != 2)
+ die("ERROR - ret_code != 2\n");
break;
}
return value;
@@ -76,9 +77,10 @@ static void reg_write(struct reg_script_context *ctx)
case RMU_TEMP_REGS:
if (ctx->display_features)
printk(BIOS_INFO, "I2C chip 0x%02x: ", step->id);
- value = (UINT8)step->value;
- ret_code = i2c_writeb(0, step->id, (UINT8)step->reg, value);
- ASSERT(ret_code == 2);
+ value = (uint8_t)step->value;
+ ret_code = i2c_writeb(0, step->id, (uint8_t)step->reg, value);
+ if (ret_code != 2)
+ die("ERROR - ret_code != 2\n");
break;
}
}
More information about the coreboot-gerrit
mailing list