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},
};
static unsigned char rc4_key[16] = {
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)
{
/* 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