mainboard/intel/galileo: Remove use of EDK-II macros & data types
Add assert.h to use coreboot's ASSERT macro. 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@intel.com> Reviewed-on: https://review.coreboot.org/15859 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
d87d8eaca1
commit
b0afbad8e1
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#define __SIMPLE_DEVICE__
|
#define __SIMPLE_DEVICE__
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <device/i2c.h>
|
#include <device/i2c.h>
|
||||||
|
@ -45,7 +46,7 @@ static uint64_t reg_read(struct reg_script_context *ctx)
|
||||||
case GEN2_I2C_LED_PWM:
|
case GEN2_I2C_LED_PWM:
|
||||||
if (ctx->display_features)
|
if (ctx->display_features)
|
||||||
printk(BIOS_INFO, "I2C chip 0x%02x: ", step->id);
|
printk(BIOS_INFO, "I2C chip 0x%02x: ", step->id);
|
||||||
ret_code = i2c_readb(0, step->id, (UINT8)step->reg, &value);
|
ret_code = i2c_readb(0, step->id, (uint8_t)step->reg, &value);
|
||||||
ASSERT(ret_code == 2);
|
ASSERT(ret_code == 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -76,8 +77,8 @@ static void reg_write(struct reg_script_context *ctx)
|
||||||
case RMU_TEMP_REGS:
|
case RMU_TEMP_REGS:
|
||||||
if (ctx->display_features)
|
if (ctx->display_features)
|
||||||
printk(BIOS_INFO, "I2C chip 0x%02x: ", step->id);
|
printk(BIOS_INFO, "I2C chip 0x%02x: ", step->id);
|
||||||
value = (UINT8)step->value;
|
value = (uint8_t)step->value;
|
||||||
ret_code = i2c_writeb(0, step->id, (UINT8)step->reg, value);
|
ret_code = i2c_writeb(0, step->id, (uint8_t)step->reg, value);
|
||||||
ASSERT(ret_code == 2);
|
ASSERT(ret_code == 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue