| .. | .. |
|---|
| 1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 2 | 1 | /* |
|---|
| 3 | 2 | * Broadcom SDIO/PCMCIA |
|---|
| 4 | 3 | * Software-specific definitions shared between device and host side |
|---|
| 5 | 4 | * |
|---|
| 6 | | - * Copyright (C) 1999-2019, Broadcom Corporation |
|---|
| 7 | | - * |
|---|
| 5 | + * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation |
|---|
| 6 | + * |
|---|
| 7 | + * Copyright (C) 1999-2017, Broadcom Corporation |
|---|
| 8 | + * |
|---|
| 8 | 9 | * Unless you and Broadcom execute a separate written software license |
|---|
| 9 | 10 | * agreement governing use of this software, this software is licensed to you |
|---|
| 10 | 11 | * under the terms of the GNU General Public License version 2 (the "GPL"), |
|---|
| 11 | 12 | * available at http://www.broadcom.com/licenses/GPLv2.php, with the |
|---|
| 12 | 13 | * following added to such license: |
|---|
| 13 | | - * |
|---|
| 14 | + * |
|---|
| 14 | 15 | * As a special exception, the copyright holders of this software give you |
|---|
| 15 | 16 | * permission to link this software with independent modules, and to copy and |
|---|
| 16 | 17 | * distribute the resulting executable under terms of your choice, provided that |
|---|
| .. | .. |
|---|
| 18 | 19 | * the license of that module. An independent module is a module which is not |
|---|
| 19 | 20 | * derived from this software. The special exception does not apply to any |
|---|
| 20 | 21 | * modifications of the software. |
|---|
| 21 | | - * |
|---|
| 22 | + * |
|---|
| 22 | 23 | * Notwithstanding the above, under no circumstances may you combine this |
|---|
| 23 | 24 | * software in any way with any other Broadcom software provided under a license |
|---|
| 24 | 25 | * other than the GPL, without Broadcom's express prior written consent. |
|---|
| .. | .. |
|---|
| 26 | 27 | * |
|---|
| 27 | 28 | * <<Broadcom-WL-IPTag/Open:>> |
|---|
| 28 | 29 | * |
|---|
| 29 | | - * $Id: bcmsdpcm.h 514727 2014-11-12 03:02:48Z $ |
|---|
| 30 | + * $Id$ |
|---|
| 30 | 31 | */ |
|---|
| 31 | 32 | |
|---|
| 32 | 33 | #ifndef _bcmsdpcm_h_ |
|---|
| .. | .. |
|---|
| 52 | 53 | #define SMB_MASK 0x0000000f /* To SB Mailbox Mask */ |
|---|
| 53 | 54 | |
|---|
| 54 | 55 | /* tosbmailboxdata */ |
|---|
| 56 | + |
|---|
| 57 | +#ifdef DS_PROT |
|---|
| 58 | +/* Bit msgs for custom deep sleep protocol */ |
|---|
| 59 | +#define SMB_DATA_D3INFORM 0x100 /* host announcing D3 entry */ |
|---|
| 60 | +#define SMB_DATA_DSACK 0x200 /* host acking a deepsleep request */ |
|---|
| 61 | +#define SMB_DATA_DSNACK 0x400 /* host nacking a deepsleep request */ |
|---|
| 62 | +#endif /* DS_PROT */ |
|---|
| 63 | +/* force a trap */ |
|---|
| 64 | +#define SMB_DATA_TRAP 0x800 /* host forcing trap */ |
|---|
| 65 | + |
|---|
| 55 | 66 | #define SMB_DATA_VERSION_MASK 0x00ff0000 /* host protocol version (sent with F2 enable) */ |
|---|
| 56 | 67 | #define SMB_DATA_VERSION_SHIFT 16 /* host protocol version (sent with F2 enable) */ |
|---|
| 57 | 68 | |
|---|
| .. | .. |
|---|
| 60 | 71 | */ |
|---|
| 61 | 72 | |
|---|
| 62 | 73 | /* intstatus bits */ |
|---|
| 74 | +#define I_HMB_INT_ACK I_HMB_SW0 /* To Host Mailbox Dev Interrupt ACK */ |
|---|
| 63 | 75 | #define I_HMB_FC_STATE I_HMB_SW0 /* To Host Mailbox Flow Control State */ |
|---|
| 64 | 76 | #define I_HMB_FC_CHANGE I_HMB_SW1 /* To Host Mailbox Flow Control State Changed */ |
|---|
| 65 | 77 | #define I_HMB_FRAME_IND I_HMB_SW2 /* To Host Mailbox Frame Indication */ |
|---|
| 66 | 78 | #define I_HMB_HOST_INT I_HMB_SW3 /* To Host Mailbox Miscellaneous Interrupt */ |
|---|
| 67 | 79 | |
|---|
| 68 | | -#define I_TOHOSTMAIL (I_HMB_FC_CHANGE | I_HMB_FRAME_IND | I_HMB_HOST_INT) |
|---|
| 80 | +#define I_TOHOSTMAIL (I_HMB_INT_ACK | I_HMB_FRAME_IND | I_HMB_HOST_INT) |
|---|
| 69 | 81 | |
|---|
| 70 | 82 | /* tohostmailbox bits corresponding to intstatus bits */ |
|---|
| 71 | | -#define HMB_FC_ON (1 << 0) /* To Host Mailbox Flow Control State */ |
|---|
| 72 | | -#define HMB_FC_CHANGE (1 << 1) /* To Host Mailbox Flow Control State Changed */ |
|---|
| 83 | +#define HMB_INT_ACK (1 << 0) /* To Host Mailbox Dev Interrupt ACK */ |
|---|
| 73 | 84 | #define HMB_FRAME_IND (1 << 2) /* To Host Mailbox Frame Indication */ |
|---|
| 74 | 85 | #define HMB_HOST_INT (1 << 3) /* To Host Mailbox Miscellaneous Interrupt */ |
|---|
| 75 | 86 | #define HMB_MASK 0x0000000f /* To Host Mailbox Mask */ |
|---|
| .. | .. |
|---|
| 80 | 91 | #define HMB_DATA_FC 0x04 /* per prio flowcontrol update flag to host */ |
|---|
| 81 | 92 | #define HMB_DATA_FWREADY 0x08 /* firmware is ready for protocol activity */ |
|---|
| 82 | 93 | #define HMB_DATA_FWHALT 0x10 /* firmware has halted operation */ |
|---|
| 94 | + |
|---|
| 95 | +#ifdef DS_PROT |
|---|
| 96 | +/* Bit msgs for custom deep sleep protocol */ |
|---|
| 97 | +#define HMB_DATA_DSREQ 0x100 /* firmware requesting deepsleep entry */ |
|---|
| 98 | +#define HMB_DATA_DSEXIT 0x200 /* firmware announcing deepsleep exit */ |
|---|
| 99 | +#define HMB_DATA_D3ACK 0x400 /* firmware acking a D3 notice from host */ |
|---|
| 100 | +#define HMB_DATA_D3EXIT 0x800 /* firmware announcing D3 exit */ |
|---|
| 101 | +#define HMB_DATA_DSPROT_MASK 0xf00 |
|---|
| 102 | +#endif /* DS_PROT */ |
|---|
| 83 | 103 | |
|---|
| 84 | 104 | #define HMB_DATA_FCDATA_MASK 0xff000000 /* per prio flowcontrol data */ |
|---|
| 85 | 105 | #define HMB_DATA_FCDATA_SHIFT 24 /* per prio flowcontrol data */ |
|---|
| .. | .. |
|---|
| 114 | 134 | |
|---|
| 115 | 135 | /* Data Offset from SOF (HW Tag, SW Tag, Pad) */ |
|---|
| 116 | 136 | #define SDPCM_DOFFSET_OFFSET 3 /* Data Offset */ |
|---|
| 117 | | -#define SDPCM_DOFFSET_VALUE(p) (((uint8 *)p)[SDPCM_DOFFSET_OFFSET] & 0xff) |
|---|
| 137 | +#define SDPCM_DOFFSET_VALUE(p) (((uint8 *)p)[SDPCM_DOFFSET_OFFSET] & 0xff) |
|---|
| 118 | 138 | #define SDPCM_DOFFSET_MASK 0xff000000 |
|---|
| 119 | 139 | #define SDPCM_DOFFSET_SHIFT 24 |
|---|
| 120 | 140 | |
|---|
| .. | .. |
|---|
| 265 | 285 | #define SDPCM_SHARED_IN_BRPT 0x0800 |
|---|
| 266 | 286 | #define SDPCM_SHARED_SET_BRPT 0x1000 |
|---|
| 267 | 287 | #define SDPCM_SHARED_PENDING_BRPT 0x2000 |
|---|
| 288 | +#define SDPCM_SHARED_FATAL_LOGBUF_VALID 0x100000 |
|---|
| 268 | 289 | |
|---|
| 269 | 290 | typedef struct { |
|---|
| 270 | 291 | uint32 flags; |
|---|
| .. | .. |
|---|
| 275 | 296 | uint32 console_addr; /* Address of hnd_cons_t */ |
|---|
| 276 | 297 | uint32 msgtrace_addr; |
|---|
| 277 | 298 | uint32 fwid; |
|---|
| 299 | + uint32 device_fatal_logbuf_start; |
|---|
| 300 | + uint32 debug_info_addr; /* Address of debug_info area */ |
|---|
| 278 | 301 | } sdpcm_shared_t; |
|---|
| 279 | 302 | |
|---|
| 280 | | -extern sdpcm_shared_t sdpcm_shared; |
|---|
| 303 | +/* Device F/W provides the following access function: |
|---|
| 304 | + * sdpcm_shared_t *hnd_get_sdpcm_shared(void); |
|---|
| 305 | + */ |
|---|
| 281 | 306 | |
|---|
| 282 | 307 | #endif /* _bcmsdpcm_h_ */ |
|---|