Merge tag 'tpm-030822' of https://source.denx.de/u-boot/custodians/u-boot-tpm
[platform/kernel/u-boot.git] / arch / arm / mach-k3 / common.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * K3: Architecture common definitions
4  *
5  * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
6  *      Lokesh Vutla <lokeshvutla@ti.com>
7  */
8
9 #include <asm/armv7_mpu.h>
10 #include <asm/hardware.h>
11
12 #define J721E  0xbb64
13 #define J7200  0xbb6d
14
15 struct fwl_data {
16         const char *name;
17         u16 fwl_id;
18         u16 regions;
19 };
20
21 enum k3_device_type {
22         K3_DEVICE_TYPE_BAD,
23         K3_DEVICE_TYPE_GP,
24         K3_DEVICE_TYPE_TEST,
25         K3_DEVICE_TYPE_EMU,
26         K3_DEVICE_TYPE_HS_FS,
27         K3_DEVICE_TYPE_HS_SE,
28 };
29
30 void setup_k3_mpu_regions(void);
31 int early_console_init(void);
32 void disable_linefill_optimization(void);
33 void remove_fwl_configs(struct fwl_data *fwl_data, size_t fwl_data_size);
34 int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr);
35 void k3_sysfw_print_ver(void);
36 void spl_enable_dcache(void);
37 void mmr_unlock(phys_addr_t base, u32 partition);
38 bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data);
39 enum k3_device_type get_device_type(void);
40 void ti_secure_image_post_process(void **p_image, size_t *p_size);