1 /* Copyright (c) 2015 Qualcomm Atheros, Inc. 2 * Copyright (c) 2018, The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 /* This file contains the definitions for the boot loader 18 * for the Qualcomm "Sparrow" 60 Gigabit wireless solution. 19 */ 20 #ifndef BOOT_LOADER_EXPORT_H_ 21 #define BOOT_LOADER_EXPORT_H_ 22 23 struct bl_dedicated_registers_v1 { 24 __le32 boot_loader_ready; /* 0x880A3C driver will poll 25 * this Dword until BL will 26 * set it to 1 (initial value 27 * should be 0) 28 */ 29 __le32 boot_loader_struct_version; /* 0x880A40 BL struct ver. */ 30 __le16 rf_type; /* 0x880A44 connected RF ID */ 31 __le16 rf_status; /* 0x880A46 RF status, 32 * 0 is OK else error 33 */ 34 __le32 baseband_type; /* 0x880A48 board type ID */ 35 u8 mac_address[6]; /* 0x880A4c BL mac address */ 36 u8 bl_version_major; /* 0x880A52 BL ver. major */ 37 u8 bl_version_minor; /* 0x880A53 BL ver. minor */ 38 __le16 bl_version_subminor; /* 0x880A54 BL ver. subminor */ 39 __le16 bl_version_build; /* 0x880A56 BL ver. build */ 40 /* valid only for version 2 and above */ 41 __le32 bl_assert_code; /* 0x880A58 BL Assert code */ 42 __le32 bl_assert_blink; /* 0x880A5C BL Assert Branch */ 43 __le32 bl_shutdown_handshake; /* 0x880A60 BL cleaner shutdown */ 44 __le32 bl_reserved[21]; /* 0x880A64 - 0x880AB4 */ 45 __le32 bl_magic_number; /* 0x880AB8 BL Magic number */ 46 } __packed; 47 48 /* the following struct is the version 0 struct */ 49 50 struct bl_dedicated_registers_v0 { 51 __le32 boot_loader_ready; /* 0x880A3C driver will poll 52 * this Dword until BL will 53 * set it to 1 (initial value 54 * should be 0) 55 */ 56 #define BL_READY (1) /* ready indication */ 57 __le32 boot_loader_struct_version; /* 0x880A40 BL struct ver. */ 58 __le32 rf_type; /* 0x880A44 connected RF ID */ 59 __le32 baseband_type; /* 0x880A48 board type ID */ 60 u8 mac_address[6]; /* 0x880A4c BL mac address */ 61 } __packed; 62 63 /* bits for bl_shutdown_handshake */ 64 #define BL_SHUTDOWN_HS_GRTD BIT(0) 65 #define BL_SHUTDOWN_HS_RTD BIT(1) 66 #define BL_SHUTDOWN_HS_PROT_VER(x) WIL_GET_BITS(x, 28, 31) 67 68 #endif /* BOOT_LOADER_EXPORT_H_ */