Skip to content

Commit 1c8e951

Browse files
authored
Merge pull request #13 from jamin-aspeed/master
ast27x0: Fix compilation issues on Ubuntu 22.04
2 parents a541bf2 + 1b9086b commit 1c8e951

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

ast27x0/ast_loader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ uint32_t calc_checksum(const uint8_t *data, size_t length)
5454
return crc ^ FINAL_XOR;
5555
}
5656

57-
int ast_loader_read(uint64_t *dst, uint64_t src, uint32_t len)
57+
int ast_loader_read(void *dst, uint64_t src, uint32_t len)
5858
{
5959
uprintf("%s: dst=0x%lx, src=0x%lx, len=%d\n",
6060
__func__, dst, src, len);

ast27x0/include/ast_loader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
void generate_crc32_table(void);
2323
uint32_t calc_checksum(const uint8_t *data, size_t length);
2424

25-
int ast_loader_read(uint64_t *dst, uint64_t src, uint32_t len);
25+
int ast_loader_read(void *dst, uint64_t src, uint32_t len);
2626
int ast_loader_load_image(uint32_t type, uint32_t *dst);
2727
int ast_loader_load_manifest_image(uint32_t type, uint32_t *dst);
2828

ast27x0/include/manifest.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#define __AST27X0_INCLUDE_MANIFEST_H__
1919

2020
#include <stdint.h>
21+
#include <stdbool.h>
2122
#include <image.h>
2223

2324
#define CPTRA_FLASH_IMG_MAGIC (0x48534C46) /* 'FLSH' in little endian */

ast27x0/manifest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static int cptra_read_header(struct cptra_image_context *ctx)
4848
static struct cptra_manifest_hdr hdr = { 0 };
4949

5050
/* Read the manfiest header */
51-
ret = ast_loader_read((uint64_t *)&hdr, ctx->manifest_base,
51+
ret = ast_loader_read(&hdr, ctx->manifest_base,
5252
sizeof(struct cptra_manifest_hdr));
5353
if (ret) {
5454
uprintf("Failed to read manifest header.\n");
@@ -88,7 +88,7 @@ static int cptra_read_chk_img_info(struct cptra_image_context *ctx)
8888

8989
size = sizeof(struct cptra_checksum_info);
9090
size += sizeof(struct cptra_image_info) * img_num;
91-
ret = ast_loader_read((uint64_t *)chk_img, ctx->manifest_base + ofst,
91+
ret = ast_loader_read(chk_img, ctx->manifest_base + ofst,
9292
size);
9393
if (ret) {
9494
return CPTRA_ERR_READ_IMG_INFO;

0 commit comments

Comments
 (0)