
7 Apr
2022
7 Apr
'22
12:16 p.m.
On some boards upper 4 bits of i2c boot input data (register 0) are negated. So negate read input data back prior processing them.
Fixes printing correct rom_loc: value.
Signed-off-by: Pali Rohár pali@kernel.org --- board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c index 29502a5c05c2..766a82386079 100644 --- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c @@ -202,6 +202,10 @@ int checkboard(void) } #endif
+#ifdef __SW_BOOT_IN_NEG_UPPER4 + in = (~in & 0xf0) | (in & 0x0f); +#endif + val = (in & io_config) | (out & (~io_config));
puts("rom_loc: ");
--
2.20.1