2018-11-02 14:21:03 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
/*
|
|
|
|
* K3: Architecture common definitions
|
|
|
|
*
|
|
|
|
* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
|
|
|
|
* Lokesh Vutla <lokeshvutla@ti.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <asm/armv7_mpu.h>
|
2020-08-05 17:14:23 +00:00
|
|
|
#include <asm/hardware.h>
|
2018-11-02 14:21:03 +00:00
|
|
|
|
2023-04-20 11:46:24 +00:00
|
|
|
#define J721E 0xbb64
|
|
|
|
#define J7200 0xbb6d
|
|
|
|
#define K3_BACKGROUND_FIREWALL_BIT BIT(8)
|
|
|
|
|
2020-01-10 19:35:21 +00:00
|
|
|
struct fwl_data {
|
|
|
|
const char *name;
|
|
|
|
u16 fwl_id;
|
|
|
|
u16 regions;
|
|
|
|
};
|
|
|
|
|
2022-07-15 16:34:32 +00:00
|
|
|
enum k3_device_type {
|
|
|
|
K3_DEVICE_TYPE_BAD,
|
|
|
|
K3_DEVICE_TYPE_GP,
|
|
|
|
K3_DEVICE_TYPE_TEST,
|
|
|
|
K3_DEVICE_TYPE_EMU,
|
|
|
|
K3_DEVICE_TYPE_HS_FS,
|
|
|
|
K3_DEVICE_TYPE_HS_SE,
|
|
|
|
};
|
|
|
|
|
2018-11-02 14:21:03 +00:00
|
|
|
void setup_k3_mpu_regions(void);
|
2019-08-15 20:55:28 +00:00
|
|
|
int early_console_init(void);
|
2019-12-31 10:19:55 +00:00
|
|
|
void disable_linefill_optimization(void);
|
2020-01-10 19:35:21 +00:00
|
|
|
void remove_fwl_configs(struct fwl_data *fwl_data, size_t fwl_data_size);
|
2020-02-12 08:25:04 +00:00
|
|
|
int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr);
|
2020-03-10 11:20:58 +00:00
|
|
|
void k3_sysfw_print_ver(void);
|
2020-05-18 05:57:22 +00:00
|
|
|
void spl_enable_dcache(void);
|
2020-08-05 17:14:17 +00:00
|
|
|
void mmr_unlock(phys_addr_t base, u32 partition);
|
2020-08-05 17:14:23 +00:00
|
|
|
bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data);
|
2022-07-15 16:34:32 +00:00
|
|
|
enum k3_device_type get_device_type(void);
|
2021-06-11 08:45:19 +00:00
|
|
|
void ti_secure_image_post_process(void **p_image, size_t *p_size);
|
2023-04-06 16:38:17 +00:00
|
|
|
struct ti_sci_handle *get_ti_sci_handle(void);
|
|
|
|
void do_board_detect(void);
|