]> git.ipfire.org Git - thirdparty/u-boot.git/blame - arch/arm/mach-k3/common.h
arm: mach-k3: Refactor QoS settings
[thirdparty/u-boot.git] / arch / arm / mach-k3 / common.h
CommitLineData
23f7b1a7
LV
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * K3: Architecture common definitions
4 *
a94a4071 5 * Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/
23f7b1a7
LV
6 * Lokesh Vutla <lokeshvutla@ti.com>
7 */
8
9#include <asm/armv7_mpu.h>
01dbe366 10#include <asm/hardware.h>
23f7b1a7 11
2bfd63d5 12#define K3_FIREWALL_BACKGROUND_BIT (8)
8bfce2f9 13
ea70da14
AD
14struct fwl_data {
15 const char *name;
16 u16 fwl_id;
17 u16 regions;
18};
19
8bfce2f9
MC
20enum k3_firewall_region_type {
21 K3_FIREWALL_REGION_FOREGROUND,
22 K3_FIREWALL_REGION_BACKGROUND
23};
24
d1c07955
AD
25enum 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
23f7b1a7 34void setup_k3_mpu_regions(void);
e630afe1 35int early_console_init(void);
40109f4d 36void disable_linefill_optimization(void);
ea70da14 37void remove_fwl_configs(struct fwl_data *fwl_data, size_t fwl_data_size);
3ab34bc0 38int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr);
6e44aebd 39void k3_sysfw_print_ver(void);
52a86e69 40void spl_enable_cache(void);
17deab0e 41void mmr_unlock(uintptr_t base, u32 partition);
01dbe366 42bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data);
d1c07955 43enum k3_device_type get_device_type(void);
547b277c 44void ti_secure_image_post_process(void **p_image, size_t *p_size);
e25fe5b2
AD
45struct ti_sci_handle *get_ti_sci_handle(void);
46void do_board_detect(void);
bd6a2475 47void ti_secure_image_check_binary(void **p_image, size_t *p_size);
72703c7a
AB
48
49#if (IS_ENABLED(CONFIG_K3_QOS))
50void setup_qos(void);
51#else
52static inline void setup_qos(void)
53{
54}
55#endif