Lines Matching refs:f

102 static void resource_dump(struct resource_file *f)  in resource_dump()  argument
104 printf("%s\n", f->name); in resource_dump()
105 printf(" blk_start: 0x%08lx\n", (ulong)f->blk_start); in resource_dump()
106 printf(" blk_offset: 0x%08lx\n", (ulong)f->blk_offset); in resource_dump()
107 printf(" size: 0x%08x\n", f->size); in resource_dump()
108 printf(" in_ram: %d\n", f->in_ram); in resource_dump()
109 printf(" hash_size: %d\n\n", f->hash_size); in resource_dump()
117 struct resource_file *f; in resource_add_file() local
123 f = list_entry(node, struct resource_file, link); in resource_add_file()
124 if (!strcmp(f->name, name)) { in resource_add_file()
131 f = calloc(1, sizeof(*f)); in resource_add_file()
132 if (!f) in resource_add_file()
135 list_add_tail(&f->link, &entry_head); in resource_add_file()
138 strcpy(f->name, name); in resource_add_file()
139 f->size = size; in resource_add_file()
140 f->in_ram = in_ram; in resource_add_file()
141 f->blk_start = blk_start; in resource_add_file()
142 f->blk_offset = blk_offset; in resource_add_file()
143 f->hash_size = hash_size; in resource_add_file()
144 memcpy(f->hash, hash, hash_size); in resource_add_file()
146 resource_dump(f); in resource_add_file()
412 struct resource_file *f; in resource_get_file() local
419 f = list_entry(node, struct resource_file, link); in resource_get_file()
420 if (!strcmp(f->name, name)) in resource_get_file()
421 return f; in resource_get_file()
430 struct resource_file *f; in rockchip_read_resource_file() local
437 f = resource_get_file(name); in rockchip_read_resource_file()
438 if (!f) { in rockchip_read_resource_file()
443 if (len <= 0 || len > f->size) in rockchip_read_resource_file()
444 len = f->size; in rockchip_read_resource_file()
446 if (f->in_ram) { in rockchip_read_resource_file()
447 pos = f->blk_start + (f->blk_offset + blk_offset) * desc->blksz; in rockchip_read_resource_file()
452 f->blk_start + f->blk_offset + blk_offset, in rockchip_read_resource_file()
464 struct resource_file *f = NULL; in rockchip_read_resource_dtb() local
471 f = resource_read_hwid_dtb(); in rockchip_read_resource_dtb()
474 if (!f) in rockchip_read_resource_dtb()
475 f = resource_get_file(DEFAULT_DTB_FILE); in rockchip_read_resource_dtb()
477 if (!f) in rockchip_read_resource_dtb()
480 ret = rockchip_read_resource_file(fdt_addr, f->name, 0, 0); in rockchip_read_resource_dtb()
487 *hash = f->hash; in rockchip_read_resource_dtb()
488 *hash_size = f->hash_size; in rockchip_read_resource_dtb()
490 printf("DTB: %s\n", f->name); in rockchip_read_resource_dtb()
498 struct resource_file *f; in do_dump_resource() local
502 f = list_entry(node, struct resource_file, link); in do_dump_resource()
503 resource_dump(f); in do_dump_resource()