@@ -489,19 +489,22 @@ int board_fit_config_name_match(const char *name)
return 0;
}
- if (is_mx6dq() && is_revd1()) {
- if (!strcmp(name, "imx6q-wandboard-revd1"))
- return 0;
- } else if ((is_mx6dl() || is_mx6solo()) && is_revd1()) {
- if (!strcmp(name, "imx6dl-wandboard-revd1"))
- return 0;
- }
- if (is_mx6dq()) {
- if (!strcmp(name, "imx6q-wandboard-revb1"))
- return 0;
- } else if (is_mx6dl() || is_mx6solo()) {
- if (!strcmp(name, "imx6dl-wandboard-revb1"))
- return 0;
+ if (is_revd1()) {
+ if (is_mx6dq()) {
+ if (!strcmp(name, "imx6q-wandboard-revd1"))
+ return 0;
+ } else if (is_mx6dl() || is_mx6solo()) {
+ if (!strcmp(name, "imx6dl-wandboard-revd1"))
+ return 0;
+ }
+ } else {
+ if (is_mx6dq()) {
+ if (!strcmp(name, "imx6q-wandboard-revb1"))
+ return 0;
+ } else if (is_mx6dl() || is_mx6solo()) {
+ if (!strcmp(name, "imx6dl-wandboard-revb1"))
+ return 0;
+ }
}
return -EINVAL;
handle different board revisions in one if path. Without this change if "imx6dl-wandboard-revb1" is passed before "imx6dl-wandboard-revd1" to this function, "imx6dl-wandboard-revb1" is detected as the correct version, on revd1 boards, as "imx6dl-wandboard-revb1" is not dependend on is_revd1(). Signed-off-by: Heiko Schocher <hs at denx.de> --- board/wandboard/wandboard.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-)