blob: 8f38fcef7f01033cf4941ace8b6e15a0d9316e84 [file] [log] [blame]
Lokesh Vutlac1e60e82018-11-02 19:51:03 +05301/* 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>
Lokesh Vutla8be6bbf2020-08-05 22:44:23 +053010#include <asm/hardware.h>
Lokesh Vutlac1e60e82018-11-02 19:51:03 +053011
Lokesh Vutla65549942020-08-05 22:44:19 +053012#define J721E 0xbb64
Lokesh Vutla0318a082020-08-05 22:44:21 +053013#define J7200 0xbb6d
Lokesh Vutla65549942020-08-05 22:44:19 +053014
Andrew F. Davisf0bcb662020-01-10 14:35:21 -050015struct fwl_data {
16 const char *name;
17 u16 fwl_id;
18 u16 regions;
19};
20
Andrew Davisf8c98362022-07-15 11:34:32 -050021enum 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
Lokesh Vutlac1e60e82018-11-02 19:51:03 +053030void setup_k3_mpu_regions(void);
Andreas Dannenbergd13ec8c2019-08-15 15:55:28 -050031int early_console_init(void);
Lokesh Vutla5fbd6fe2019-12-31 15:49:55 +053032void disable_linefill_optimization(void);
Andrew F. Davisf0bcb662020-01-10 14:35:21 -050033void remove_fwl_configs(struct fwl_data *fwl_data, size_t fwl_data_size);
Keerthy7007adc2020-02-12 13:55:04 +053034int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr);
Lokesh Vutla5fafe442020-03-10 16:50:58 +053035void k3_sysfw_print_ver(void);
Jan Kiszka7ce99f72020-05-18 07:57:22 +020036void spl_enable_dcache(void);
Lokesh Vutlaff7ab092020-08-05 22:44:17 +053037void mmr_unlock(phys_addr_t base, u32 partition);
Lokesh Vutla8be6bbf2020-08-05 22:44:23 +053038bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data);
Andrew Davisf8c98362022-07-15 11:34:32 -050039enum k3_device_type get_device_type(void);
Tero Kristo738c5902021-06-11 11:45:19 +030040void ti_secure_image_post_process(void **p_image, size_t *p_size);