mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-19 05:04:35 +00:00
cmd/i2c.c: Remove unused legacy code
There are no longer any cases where we are neither SYS_I2C_LEGACY nor DM_I2C. Remove these code paths. Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
38a671d21e
commit
1edef7693b
1 changed files with 0 additions and 50 deletions
50
cmd/i2c.c
50
cmd/i2c.c
|
@ -195,54 +195,6 @@ void i2c_init_board(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Implement architecture-specific get/set functions */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* i2c_get_bus_speed() - Return I2C bus speed
|
|
||||||
*
|
|
||||||
* This function is the default implementation of function for retrieveing
|
|
||||||
* the current I2C bus speed in Hz.
|
|
||||||
*
|
|
||||||
* A driver implementing runtime switching of I2C bus speed must override
|
|
||||||
* this function to report the speed correctly. Simple or legacy drivers
|
|
||||||
* can use this fallback.
|
|
||||||
*
|
|
||||||
* Returns I2C bus speed in Hz.
|
|
||||||
*/
|
|
||||||
#if !CONFIG_IS_ENABLED(SYS_I2C_LEGACY) && !CONFIG_IS_ENABLED(DM_I2C)
|
|
||||||
/*
|
|
||||||
* TODO: Implement architecture-specific get/set functions
|
|
||||||
* Should go away, if we switched completely to new multibus support
|
|
||||||
*/
|
|
||||||
__weak
|
|
||||||
unsigned int i2c_get_bus_speed(void)
|
|
||||||
{
|
|
||||||
return CONFIG_SYS_I2C_SPEED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* i2c_set_bus_speed() - Configure I2C bus speed
|
|
||||||
* @speed: Newly set speed of the I2C bus in Hz
|
|
||||||
*
|
|
||||||
* This function is the default implementation of function for setting
|
|
||||||
* the I2C bus speed in Hz.
|
|
||||||
*
|
|
||||||
* A driver implementing runtime switching of I2C bus speed must override
|
|
||||||
* this function to report the speed correctly. Simple or legacy drivers
|
|
||||||
* can use this fallback.
|
|
||||||
*
|
|
||||||
* Returns zero on success, negative value on error.
|
|
||||||
*/
|
|
||||||
__weak
|
|
||||||
int i2c_set_bus_speed(unsigned int speed)
|
|
||||||
{
|
|
||||||
if (speed != CONFIG_SYS_I2C_SPEED)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get_alen() - Small parser helper function to get address length
|
* get_alen() - Small parser helper function to get address length
|
||||||
*
|
*
|
||||||
|
@ -1953,8 +1905,6 @@ static int do_i2c_reset(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
}
|
}
|
||||||
#elif CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
|
#elif CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
|
||||||
i2c_init(I2C_ADAP->speed, I2C_ADAP->slaveaddr);
|
i2c_init(I2C_ADAP->speed, I2C_ADAP->slaveaddr);
|
||||||
#else
|
|
||||||
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
|
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue