1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright 2019 Broadcom. 4 */ 5 6 #ifndef BNXT_H 7 #define BNXT_H 8 9 #include <compiler.h> 10 #include <io.h> 11 #include <mm/core_memprot.h> 12 #include <util.h> 13 14 #define BNXT_SUCCESS 0 15 #define BNXT_FAILURE (!BNXT_SUCCESS) 16 17 uint32_t bnxt_write32_multiple(uintptr_t dst, 18 uintptr_t src, 19 uint32_t num_entries, 20 int src_4byte_increment); 21 void bnxt_chimp_halt(void); 22 void bnxt_kong_halt(void); 23 int bnxt_fastboot(uintptr_t addr); 24 int bnxt_wait_handshake(void); 25 TEE_Result bnxt_load_fw(int chip_type); 26 27 struct bnxt_images_info { 28 vaddr_t bnxt_fw_vaddr; 29 uint32_t bnxt_fw_len; 30 vaddr_t bnxt_cfg_vaddr; 31 uint32_t bnxt_cfg_len; 32 vaddr_t bnxt_bspd_cfg_vaddr; 33 uint32_t bnxt_bspd_cfg_len; 34 }; 35 36 int get_bnxt_images_info(struct bnxt_images_info *bnxt_info, int chip_type); 37 38 #endif 39