]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - tools/rkcommon.c
omap4: sdp4430: remove CONFIG_4430SDP
[people/ms/u-boot.git] / tools / rkcommon.c
index fd95abc79aed5533d578e93a7e9d2a5ba0ca1074..1a24e165894c45435daef9f4404b9ea7280b843f 100644 (file)
@@ -73,10 +73,13 @@ struct spl_info {
 
 static struct spl_info spl_infos[] = {
        { "rk3036", "RK30", 0x1000, false, false },
+       { "rk3128", "RK31", 0x1800, false, false },
        { "rk3188", "RK31", 0x8000 - 0x800, true, false },
+       { "rk322x", "RK32", 0x8000 - 0x1000, false, false },
        { "rk3288", "RK32", 0x8000, false, false },
        { "rk3328", "RK32", 0x8000 - 0x1000, false, false },
-       { "rk3399", "RK33", 0x20000, false, true },
+       { "rk3368", "RK33", 0x8000 - 0x1000, false, true },
+       { "rk3399", "RK33", 0x30000 - 0x2000, false, true },
        { "rv1108", "RK11", 0x1800, false, false},
 };
 
@@ -226,11 +229,6 @@ static inline unsigned rkcommon_offset_to_spi(unsigned offset)
        return ((offset & ~0x7ff) << 1) + (offset & 0x7ff);
 }
 
-static inline unsigned rkcommon_spi_to_offset(unsigned offset)
-{
-       return ((offset & ~0x7ff) >> 1) + (offset & 0x7ff);
-}
-
 static int rkcommon_parse_header(const void *buf, struct header0_info *header0,
                                 struct spl_info **spl_info)
 {
@@ -380,8 +378,9 @@ int rkcommon_vrec_header(struct image_tool_params *params,
 
        /* Allocate, clear and install the header */
        tparams->hdr = malloc(tparams->header_size);
+       if (!tparams->hdr)
+               return -ENOMEM;
        memset(tparams->hdr, 0, tparams->header_size);
-       tparams->header_size = tparams->header_size;
 
        /*
         * If someone passed in 0 for the alignment, we'd better handle