src/[arch-lib]: change "unsigned" to "unsigned int"

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: Ibb7b48a7a144421aff29acbb7ac30968ae5fe5ab
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36329
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Martin Roth
2019-10-23 21:41:00 -06:00
committed by Martin Roth
parent e74ca4ffc2
commit 38ddbfb325
37 changed files with 157 additions and 157 deletions

View File

@ -38,7 +38,7 @@ struct software_i2c_ops *software_i2c[SOFTWARE_I2C_MAX_BUS];
* Waits until either timeout_us have passed or (iff for_scl is set) until SCL
* goes high. Will report random line changes during the wait and return SCL.
*/
static int __wait(unsigned bus, int timeout_us, int for_scl)
static int __wait(unsigned int bus, int timeout_us, int for_scl)
{
int us;
int sda = software_i2c[bus]->get_sda(bus);
@ -63,13 +63,13 @@ static int __wait(unsigned bus, int timeout_us, int for_scl)
}
/* Waits the default DELAY_US to allow line state to stabilize. */
static void wait(unsigned bus)
static void wait(unsigned int bus)
{
__wait(bus, DELAY_US, 0);
}
/* Waits until SCL goes high. Prints a contextual error message on timeout. */
static int wait_for_scl(unsigned bus, const char *error_context)
static int wait_for_scl(unsigned int bus, const char *error_context)
{
if (!__wait(bus, TIMEOUT_US, 1)) {
printk(BIOS_ERR, "software_i2c(%d): ERROR: Clock stretching "
@ -80,7 +80,7 @@ static int wait_for_scl(unsigned bus, const char *error_context)
return 0;
}
static int start_cond(unsigned bus)
static int start_cond(unsigned int bus)
{
spew("software_i2c(%d): Sending start condition... ", bus);
@ -112,7 +112,7 @@ static int start_cond(unsigned bus)
return 0;
}
static int stop_cond(unsigned bus)
static int stop_cond(unsigned int bus)
{
spew("software_i2c(%d): Sending stop condition... ", bus);
@ -141,7 +141,7 @@ static int stop_cond(unsigned bus)
return 0;
}
static int out_bit(unsigned bus, int bit)
static int out_bit(unsigned int bus, int bit)
{
spew("software_i2c(%d): Sending a %d bit... ", bus, bit);
@ -174,7 +174,7 @@ static int out_bit(unsigned bus, int bit)
return 0;
}
static int in_bit(unsigned bus)
static int in_bit(unsigned int bus)
{
int bit;
@ -202,9 +202,9 @@ static int in_bit(unsigned bus)
}
/* Write a byte to I2C bus. Return 0 if ack by the slave. */
static int out_byte(unsigned bus, u8 byte)
static int out_byte(unsigned int bus, u8 byte)
{
unsigned bit;
unsigned int bit;
int nack, ret;
for (bit = 0; bit < 8; bit++)
@ -220,7 +220,7 @@ static int out_byte(unsigned bus, u8 byte)
return nack > 0 ? ERR_NACK : nack;
}
static int in_byte(unsigned bus, int ack)
static int in_byte(unsigned int bus, int ack)
{
u8 byte = 0;
int i, ret;
@ -241,7 +241,7 @@ static int in_byte(unsigned bus, int ack)
return byte;
}
int software_i2c_transfer(unsigned bus, struct i2c_msg *segments, int count)
int software_i2c_transfer(unsigned int bus, struct i2c_msg *segments, int count)
{
int i, ret;
struct i2c_msg *seg;
@ -269,7 +269,7 @@ int software_i2c_transfer(unsigned bus, struct i2c_msg *segments, int count)
return 0;
}
void software_i2c_wedge_ack(unsigned bus, u8 chip)
void software_i2c_wedge_ack(unsigned int bus, u8 chip)
{
int i;
@ -292,7 +292,7 @@ void software_i2c_wedge_ack(unsigned bus, u8 chip)
software_i2c[bus]->get_scl(bus));
}
void software_i2c_wedge_read(unsigned bus, u8 chip, u8 reg, int bits)
void software_i2c_wedge_read(unsigned int bus, u8 chip, u8 reg, int bits)
{
int i;
@ -321,7 +321,7 @@ void software_i2c_wedge_read(unsigned bus, u8 chip, u8 reg, int bits)
software_i2c[bus]->get_scl(bus));
}
void software_i2c_wedge_write(unsigned bus, u8 chip, u8 reg, int bits)
void software_i2c_wedge_write(unsigned int bus, u8 chip, u8 reg, int bits)
{
int i;