soc/intel/common: Add error print in common i2c
Print error message when using common i2c without default clock defined. TEST=Do not define default clock in Kconfig, compile will stop for assertion. Change-Id: I803f97698b3928e6b64df0010e71a6ded1400f87 Signed-off-by: Lijian Zhao <lijian.zhao@intel.com> Reviewed-on: https://review.coreboot.org/22405 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
parent
f3885618d9
commit
e1f4d790e4
|
@ -540,9 +540,8 @@ int lpss_i2c_gen_speed_config(struct lpss_i2c_regs *regs,
|
||||||
uint16_t hcnt_min, lcnt_min;
|
uint16_t hcnt_min, lcnt_min;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Clock must be provided by Kconfig */
|
_Static_assert(CONFIG_SOC_INTEL_COMMON_LPSS_CLOCK_MHZ != 0,
|
||||||
if (!ic_clk)
|
"SOC_INTEL_COMMON_LPSS_CLOCK_MHZ can't be zero!");
|
||||||
return -1;
|
|
||||||
|
|
||||||
/* Apply board specific override for this speed if found */
|
/* Apply board specific override for this speed if found */
|
||||||
for (i = 0; i < LPSS_I2C_SPEED_CONFIG_COUNT; i++) {
|
for (i = 0; i < LPSS_I2C_SPEED_CONFIG_COUNT; i++) {
|
||||||
|
|
Loading…
Reference in New Issue