uboot-sunxi: fix h2 without SPL I2C failed to build

This commit is contained in:
coolsnowwolf 2024-04-05 17:48:16 +08:00
parent 6586685561
commit a771805649

View File

@ -24,7 +24,7 @@
#ifdef CONFIG_LED_STATUS
if (IS_ENABLED(CONFIG_SPL_DRIVERS_MISC))
@@ -667,25 +670,31 @@
@@ -667,25 +670,33 @@
*/
if (!power_failed)
clock_set_pll1(get_board_sys_clk());
@ -51,6 +51,7 @@
- data[0] = 0x08;
- data[1] = 0x14;
- i2c_write(0x10, 0, 1, data, 2);
+#if CONFIG_IS_ENABLED(SPL_I2C) && CONFIG_IS_ENABLED(SPL_SYS_I2C_LEGACY)
+ val=readl(0x300622c);
+ if((val&sunxi_ac300_key)==0)
+ {
@ -71,6 +72,7 @@
+ data[1] = 0x14;
+ i2c_write(0x10, 0, 1, data, 2);
+ }
+#endif
}
#endif /* CONFIG_SPL_BUILD */