projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
1989374
)
Merge git://www.denx.de/git/u-boot-marvell
author
Tom Rini
<trini@konsulko.com>
Tue, 8 Aug 2017 21:05:33 +0000
(17:05 -0400)
committer
Tom Rini
<trini@konsulko.com>
Tue, 8 Aug 2017 21:05:33 +0000
(17:05 -0400)
board/CZ.NIC/turris_omnia/turris_omnia.c
patch
|
blob
|
history
diff --git
a/board/CZ.NIC/turris_omnia/turris_omnia.c
b/board/CZ.NIC/turris_omnia/turris_omnia.c
index
86926f8
..
a427509
100644
(file)
--- a/
board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/
board/CZ.NIC/turris_omnia/turris_omnia.c
@@
-90,7
+90,7
@@
static struct serdes_map board_serdes_map_sata[] = {
static bool omnia_detect_sata(void)
{
struct udevice *bus, *dev;
- int ret;
+ int ret
, retry = 3
;
u16 mode;
puts("SERDES0 card detect: ");
@@
-106,8
+106,13
@@
static bool omnia_detect_sata(void)
return false;
}
- ret = dm_i2c_read(dev, OMNIA_I2C_MCU_ADDR_STATUS, (uchar *) &mode, 2);
- if (ret) {
+ for (; retry > 0; --retry) {
+ ret = dm_i2c_read(dev, OMNIA_I2C_MCU_ADDR_STATUS, (uchar *) &mode, 2);
+ if (!ret)
+ break;
+ }
+
+ if (!retry) {
puts("I2C read failed! Default PEX\n");
return false;
}