projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stm32mp1: configs: add BACKLIGHT_GPIO support
[oweals/u-boot.git]
/
api
/
api_storage.c
diff --git
a/api/api_storage.c
b/api/api_storage.c
index 8bed2f3c91fd37a400c793d03cfae4d0669a3373..2b90c18aaec93a1dcb8914e80e37d41842d88980 100644
(file)
--- a/
api/api_storage.c
+++ b/
api/api_storage.c
@@
-1,9
+1,8
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2007-2008 Semihalf
*
* Written by: Rafal Jaworowski <raj@semihalf.com>
/*
* (C) Copyright 2007-2008 Semihalf
*
* Written by: Rafal Jaworowski <raj@semihalf.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <config.h>
*/
#include <config.h>
@@
-63,7
+62,7
@@
void dev_stor_init(void)
specs[ENUM_MMC].type = DEV_TYP_STOR | DT_STOR_MMC;
specs[ENUM_MMC].name = "mmc";
#endif
specs[ENUM_MMC].type = DEV_TYP_STOR | DT_STOR_MMC;
specs[ENUM_MMC].name = "mmc";
#endif
-#if defined(CONFIG_
CMD_
SATA)
+#if defined(CONFIG_SATA)
specs[ENUM_SATA].max_dev = CONFIG_SYS_SATA_MAX_DEVICE;
specs[ENUM_SATA].enum_started = 0;
specs[ENUM_SATA].enum_ended = 0;
specs[ENUM_SATA].max_dev = CONFIG_SYS_SATA_MAX_DEVICE;
specs[ENUM_SATA].enum_started = 0;
specs[ENUM_SATA].enum_ended = 0;
@@
-100,6
+99,7
@@
static int dev_stor_get(int type, int *more, struct device_info *di)
{
struct blk_desc *dd;
int found = 0;
{
struct blk_desc *dd;
int found = 0;
+ int found_last = 0;
int i = 0;
/* Wasn't configured for this type, return 0 directly */
int i = 0;
/* Wasn't configured for this type, return 0 directly */
@@
-112,9
+112,13
@@
static int dev_stor_get(int type, int *more, struct device_info *di)
if (di->cookie ==
(void *)blk_get_dev(specs[type].name, i)) {
i += 1;
if (di->cookie ==
(void *)blk_get_dev(specs[type].name, i)) {
i += 1;
+ found_last = 1;
break;
}
}
break;
}
}
+
+ if (!found_last)
+ i = 0;
}
for (; i < specs[type].max_dev; i++) {
}
for (; i < specs[type].max_dev; i++) {