Lokesh Vutla | c1e60e8 | 2018-11-02 19:51:03 +0530 | [diff] [blame] | 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> |
Lokesh Vutla | 8be6bbf | 2020-08-05 22:44:23 +0530 | [diff] [blame] | 10 | #include <asm/hardware.h> |
Lokesh Vutla | c1e60e8 | 2018-11-02 19:51:03 +0530 | [diff] [blame] | 11 | |
Manorit Chawdhry | a2cfec4 | 2023-07-14 11:22:27 +0530 | [diff] [blame] | 12 | #define K3_FIREWALL_BACKGROUND_BIT (8) |
Manorit Chawdhry | 33f75ee | 2023-05-05 15:54:00 +0530 | [diff] [blame] | 13 | |
Andrew F. Davis | f0bcb66 | 2020-01-10 14:35:21 -0500 | [diff] [blame] | 14 | struct fwl_data { |
| 15 | const char *name; |
| 16 | u16 fwl_id; |
| 17 | u16 regions; |
| 18 | }; |
| 19 | |
Manorit Chawdhry | 33f75ee | 2023-05-05 15:54:00 +0530 | [diff] [blame] | 20 | enum k3_firewall_region_type { |
| 21 | K3_FIREWALL_REGION_FOREGROUND, |
| 22 | K3_FIREWALL_REGION_BACKGROUND |
| 23 | }; |
| 24 | |
Andrew Davis | f8c9836 | 2022-07-15 11:34:32 -0500 | [diff] [blame] | 25 | enum k3_device_type { |
| 26 | K3_DEVICE_TYPE_BAD, |
| 27 | K3_DEVICE_TYPE_GP, |
| 28 | K3_DEVICE_TYPE_TEST, |
| 29 | K3_DEVICE_TYPE_EMU, |
| 30 | K3_DEVICE_TYPE_HS_FS, |
| 31 | K3_DEVICE_TYPE_HS_SE, |
| 32 | }; |
| 33 | |
Lokesh Vutla | c1e60e8 | 2018-11-02 19:51:03 +0530 | [diff] [blame] | 34 | void setup_k3_mpu_regions(void); |
Andreas Dannenberg | d13ec8c | 2019-08-15 15:55:28 -0500 | [diff] [blame] | 35 | int early_console_init(void); |
Lokesh Vutla | 5fbd6fe | 2019-12-31 15:49:55 +0530 | [diff] [blame] | 36 | void disable_linefill_optimization(void); |
Andrew F. Davis | f0bcb66 | 2020-01-10 14:35:21 -0500 | [diff] [blame] | 37 | void remove_fwl_configs(struct fwl_data *fwl_data, size_t fwl_data_size); |
Keerthy | 7007adc | 2020-02-12 13:55:04 +0530 | [diff] [blame] | 38 | int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr); |
Lokesh Vutla | 5fafe44 | 2020-03-10 16:50:58 +0530 | [diff] [blame] | 39 | void k3_sysfw_print_ver(void); |
Jan Kiszka | 7ce99f7 | 2020-05-18 07:57:22 +0200 | [diff] [blame] | 40 | void spl_enable_dcache(void); |
Lokesh Vutla | ff7ab09 | 2020-08-05 22:44:17 +0530 | [diff] [blame] | 41 | void mmr_unlock(phys_addr_t base, u32 partition); |
Lokesh Vutla | 8be6bbf | 2020-08-05 22:44:23 +0530 | [diff] [blame] | 42 | bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data); |
Andrew Davis | f8c9836 | 2022-07-15 11:34:32 -0500 | [diff] [blame] | 43 | enum k3_device_type get_device_type(void); |
Tero Kristo | 738c590 | 2021-06-11 11:45:19 +0300 | [diff] [blame] | 44 | void ti_secure_image_post_process(void **p_image, size_t *p_size); |
Andrew Davis | 2dde9a7 | 2023-04-06 11:38:17 -0500 | [diff] [blame] | 45 | struct ti_sci_handle *get_ti_sci_handle(void); |
| 46 | void do_board_detect(void); |
Manorit Chawdhry | db01bcc | 2023-05-18 12:44:17 +0530 | [diff] [blame] | 47 | void ti_secure_image_check_binary(void **p_image, size_t *p_size); |