]> git.ipfire.org Git - thirdparty/u-boot.git/blob - arch/arm/mach-k3/common.h
arm: mach-k3: Refactor QoS settings
[thirdparty/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 - https://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 K3_FIREWALL_BACKGROUND_BIT (8)
13
14 struct fwl_data {
15 const char *name;
16 u16 fwl_id;
17 u16 regions;
18 };
19
20 enum k3_firewall_region_type {
21 K3_FIREWALL_REGION_FOREGROUND,
22 K3_FIREWALL_REGION_BACKGROUND
23 };
24
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
34 void setup_k3_mpu_regions(void);
35 int early_console_init(void);
36 void disable_linefill_optimization(void);
37 void remove_fwl_configs(struct fwl_data *fwl_data, size_t fwl_data_size);
38 int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr);
39 void k3_sysfw_print_ver(void);
40 void spl_enable_cache(void);
41 void mmr_unlock(uintptr_t base, u32 partition);
42 bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data);
43 enum k3_device_type get_device_type(void);
44 void ti_secure_image_post_process(void **p_image, size_t *p_size);
45 struct ti_sci_handle *get_ti_sci_handle(void);
46 void do_board_detect(void);
47 void ti_secure_image_check_binary(void **p_image, size_t *p_size);
48
49 #if (IS_ENABLED(CONFIG_K3_QOS))
50 void setup_qos(void);
51 #else
52 static inline void setup_qos(void)
53 {
54 }
55 #endif