summaryrefslogtreecommitdiff
path: root/tools/rkcommon.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-03-26 21:39:59 -0400
committerTom Rini <trini@konsulko.com>2020-03-26 21:39:59 -0400
commitfa041198a803f5ee44362a32431ce7373f5f4ae5 (patch)
tree3194e75991e35b5fa8cbbc6f87946903065c01c5 /tools/rkcommon.c
parentaf827140e5965e5bb2bcad1c53ca8419b428ff6d (diff)
parente5a405583f5ce9576c5084a178622e2fdd49cb23 (diff)
Merge tag 'u-boot-rockchip-20200327' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- Fixed for rv1108 and elgin-rv1108 board - Fix the keyboard from USB instead of CrOS EC
Diffstat (limited to 'tools/rkcommon.c')
-rw-r--r--tools/rkcommon.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/rkcommon.c b/tools/rkcommon.c
index c2382dfe5a1..8f281f5901a 100644
--- a/tools/rkcommon.c
+++ b/tools/rkcommon.c
@@ -307,11 +307,13 @@ static int rkcommon_parse_header(const void *buf, struct header0_info *header0,
rkcommon_offset_to_spi(hdr1_offset));
for (i = 0; i < ARRAY_SIZE(spl_infos); i++) {
- if (!memcmp(&hdr1_sdmmc->magic, spl_infos[i].spl_hdr, 4)) {
+ if (!memcmp(&hdr1_sdmmc->magic, spl_infos[i].spl_hdr,
+ RK_SPL_HDR_SIZE)) {
if (spl_info)
*spl_info = &spl_infos[i];
return IH_TYPE_RKSD;
- } else if (!memcmp(&hdr1_spi->magic, spl_infos[i].spl_hdr, 4)) {
+ } else if (!memcmp(&hdr1_spi->magic, spl_infos[i].spl_hdr,
+ RK_SPL_HDR_SIZE)) {
if (spl_info)
*spl_info = &spl_infos[i];
return IH_TYPE_RKSPI;