1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Include file private to the SOC Interconnect support files. 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Portions of this code are copyright (c) 2021 Cypress Semiconductor Corporation 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * Copyright (C) 1999-2017, Broadcom Corporation 7*4882a593Smuzhiyun * 8*4882a593Smuzhiyun * Unless you and Broadcom execute a separate written software license 9*4882a593Smuzhiyun * agreement governing use of this software, this software is licensed to you 10*4882a593Smuzhiyun * under the terms of the GNU General Public License version 2 (the "GPL"), 11*4882a593Smuzhiyun * available at http://www.broadcom.com/licenses/GPLv2.php, with the 12*4882a593Smuzhiyun * following added to such license: 13*4882a593Smuzhiyun * 14*4882a593Smuzhiyun * As a special exception, the copyright holders of this software give you 15*4882a593Smuzhiyun * permission to link this software with independent modules, and to copy and 16*4882a593Smuzhiyun * distribute the resulting executable under terms of your choice, provided that 17*4882a593Smuzhiyun * you also meet, for each linked independent module, the terms and conditions of 18*4882a593Smuzhiyun * the license of that module. An independent module is a module which is not 19*4882a593Smuzhiyun * derived from this software. The special exception does not apply to any 20*4882a593Smuzhiyun * modifications of the software. 21*4882a593Smuzhiyun * 22*4882a593Smuzhiyun * Notwithstanding the above, under no circumstances may you combine this 23*4882a593Smuzhiyun * software in any way with any other Broadcom software provided under a license 24*4882a593Smuzhiyun * other than the GPL, without Broadcom's express prior written consent. 25*4882a593Smuzhiyun * 26*4882a593Smuzhiyun * 27*4882a593Smuzhiyun * <<Broadcom-WL-IPTag/Open:>> 28*4882a593Smuzhiyun * 29*4882a593Smuzhiyun * $Id: siutils_priv.h 698933 2017-05-11 06:05:10Z $ 30*4882a593Smuzhiyun */ 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun #ifndef _siutils_priv_h_ 33*4882a593Smuzhiyun #define _siutils_priv_h_ 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun #if defined(SI_ERROR_ENFORCE) 36*4882a593Smuzhiyun #define SI_ERROR(args) printf args 37*4882a593Smuzhiyun #else 38*4882a593Smuzhiyun #define SI_ERROR(args) 39*4882a593Smuzhiyun #endif // endif 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun #if defined(ENABLE_CORECAPTURE) 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun #define SI_PRINT(args) osl_wificc_logDebug args 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun #else 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun #define SI_PRINT(args) printf args 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun #endif /* ENABLE_CORECAPTURE */ 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun #define SI_MSG(args) 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun #ifdef BCMDBG_SI 54*4882a593Smuzhiyun #define SI_VMSG(args) printf args 55*4882a593Smuzhiyun #else 56*4882a593Smuzhiyun #define SI_VMSG(args) 57*4882a593Smuzhiyun #endif // endif 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun #define IS_SIM(chippkg) ((chippkg == HDLSIM_PKG_ID) || (chippkg == HWSIM_PKG_ID)) 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun typedef uint32 (*si_intrsoff_t)(void *intr_arg); 62*4882a593Smuzhiyun typedef void (*si_intrsrestore_t)(void *intr_arg, uint32 arg); 63*4882a593Smuzhiyun typedef bool (*si_intrsenabled_t)(void *intr_arg); 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun #define SI_GPIO_MAX 16 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun typedef struct gci_gpio_item { 68*4882a593Smuzhiyun void *arg; 69*4882a593Smuzhiyun uint8 gci_gpio; 70*4882a593Smuzhiyun uint8 status; 71*4882a593Smuzhiyun gci_gpio_handler_t handler; 72*4882a593Smuzhiyun struct gci_gpio_item *next; 73*4882a593Smuzhiyun } gci_gpio_item_t; 74*4882a593Smuzhiyun 75*4882a593Smuzhiyun #define AI_SLAVE_WRAPPER 0 76*4882a593Smuzhiyun #define AI_MASTER_WRAPPER 1 77*4882a593Smuzhiyun 78*4882a593Smuzhiyun typedef struct axi_wrapper { 79*4882a593Smuzhiyun uint32 mfg; 80*4882a593Smuzhiyun uint32 cid; 81*4882a593Smuzhiyun uint32 rev; 82*4882a593Smuzhiyun uint32 wrapper_type; 83*4882a593Smuzhiyun uint32 wrapper_addr; 84*4882a593Smuzhiyun uint32 wrapper_size; 85*4882a593Smuzhiyun } axi_wrapper_t; 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun #define SI_MAX_AXI_WRAPPERS 32 88*4882a593Smuzhiyun #define AI_REG_READ_TIMEOUT 300 /* in msec */ 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun /* for some combo chips, BT side accesses chipcommon->0x190, as a 16 byte addr */ 91*4882a593Smuzhiyun /* register at 0x19C doesn't exist, so error is logged at the slave wrapper */ 92*4882a593Smuzhiyun #define BT_CC_SPROM_BADREG_LO 0x18000190 93*4882a593Smuzhiyun #define BT_CC_SPROM_BADREG_SIZE 4 94*4882a593Smuzhiyun #define BT_CC_SPROM_BADREG_HI 0 95*4882a593Smuzhiyun #define BCM4350_BT_AXI_ID 6 96*4882a593Smuzhiyun #define BCM4345_BT_AXI_ID 6 97*4882a593Smuzhiyun #define BCM4349_BT_AXI_ID 5 98*4882a593Smuzhiyun #define BCM4364_BT_AXI_ID 5 99*4882a593Smuzhiyun 100*4882a593Smuzhiyun /* for BT logging and memory dump, ignore failed access to BT memory */ 101*4882a593Smuzhiyun #define BCM4347_BT_ADDR_HI 0 102*4882a593Smuzhiyun #define BCM4347_BT_ADDR_LO 0x19000000 /* BT address space */ 103*4882a593Smuzhiyun #define BCM4347_BT_SIZE 0x01000000 /* BT address space size */ 104*4882a593Smuzhiyun #define BCM4347_UNUSED_AXI_ID 0xffffffff 105*4882a593Smuzhiyun #define BCM4347_CC_AXI_ID 0 106*4882a593Smuzhiyun #define BCM4347_PCIE_AXI_ID 1 107*4882a593Smuzhiyun 108*4882a593Smuzhiyun typedef struct si_cores_info { 109*4882a593Smuzhiyun volatile void *regs[SI_MAXCORES]; /* other regs va */ 110*4882a593Smuzhiyun 111*4882a593Smuzhiyun uint coreid[SI_MAXCORES]; /**< id of each core */ 112*4882a593Smuzhiyun uint32 coresba[SI_MAXCORES]; /**< backplane address of each core */ 113*4882a593Smuzhiyun void *regs2[SI_MAXCORES]; /**< va of each core second register set (usbh20) */ 114*4882a593Smuzhiyun uint32 coresba2[SI_MAXCORES]; /**< address of each core second register set (usbh20) */ 115*4882a593Smuzhiyun uint32 coresba_size[SI_MAXCORES]; /**< backplane address space size */ 116*4882a593Smuzhiyun uint32 coresba2_size[SI_MAXCORES]; /**< second address space size */ 117*4882a593Smuzhiyun 118*4882a593Smuzhiyun void *wrappers[SI_MAXCORES]; /**< other cores wrapper va */ 119*4882a593Smuzhiyun uint32 wrapba[SI_MAXCORES]; /**< address of controlling wrapper */ 120*4882a593Smuzhiyun 121*4882a593Smuzhiyun void *wrappers2[SI_MAXCORES]; /**< other cores wrapper va */ 122*4882a593Smuzhiyun uint32 wrapba2[SI_MAXCORES]; /**< address of controlling wrapper */ 123*4882a593Smuzhiyun 124*4882a593Smuzhiyun void *wrappers3[SI_MAXCORES]; /**< other cores wrapper va */ 125*4882a593Smuzhiyun uint32 wrapba3[SI_MAXCORES]; /**< address of controlling wrapper */ 126*4882a593Smuzhiyun 127*4882a593Smuzhiyun uint32 cia[SI_MAXCORES]; /**< erom cia entry for each core */ 128*4882a593Smuzhiyun uint32 cib[SI_MAXCORES]; /**< erom cia entry for each core */ 129*4882a593Smuzhiyun 130*4882a593Smuzhiyun uint32 csp2ba[SI_MAXCORES]; /**< Second slave port base addr 0 */ 131*4882a593Smuzhiyun uint32 csp2ba_size[SI_MAXCORES]; /**< Second slave port addr space size */ 132*4882a593Smuzhiyun } si_cores_info_t; 133*4882a593Smuzhiyun 134*4882a593Smuzhiyun /** misc si info needed by some of the routines */ 135*4882a593Smuzhiyun typedef struct si_info { 136*4882a593Smuzhiyun struct si_pub pub; /**< back plane public state (must be first field) */ 137*4882a593Smuzhiyun 138*4882a593Smuzhiyun void *osh; /**< osl os handle */ 139*4882a593Smuzhiyun void *sdh; /**< bcmsdh handle */ 140*4882a593Smuzhiyun 141*4882a593Smuzhiyun uint dev_coreid; /**< the core provides driver functions */ 142*4882a593Smuzhiyun void *intr_arg; /**< interrupt callback function arg */ 143*4882a593Smuzhiyun si_intrsoff_t intrsoff_fn; /**< turns chip interrupts off */ 144*4882a593Smuzhiyun si_intrsrestore_t intrsrestore_fn; /**< restore chip interrupts */ 145*4882a593Smuzhiyun si_intrsenabled_t intrsenabled_fn; /**< check if interrupts are enabled */ 146*4882a593Smuzhiyun 147*4882a593Smuzhiyun void *pch; /**< PCI/E core handle */ 148*4882a593Smuzhiyun 149*4882a593Smuzhiyun bool memseg; /**< flag to toggle MEM_SEG register */ 150*4882a593Smuzhiyun 151*4882a593Smuzhiyun char *vars; 152*4882a593Smuzhiyun uint varsz; 153*4882a593Smuzhiyun 154*4882a593Smuzhiyun volatile void *curmap; /* current regs va */ 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun uint curidx; /**< current core index */ 157*4882a593Smuzhiyun uint numcores; /**< # discovered cores */ 158*4882a593Smuzhiyun 159*4882a593Smuzhiyun void *curwrap; /**< current wrapper va */ 160*4882a593Smuzhiyun 161*4882a593Smuzhiyun uint32 oob_router; /**< oob router registers for axi */ 162*4882a593Smuzhiyun uint32 oob_router1; /**< oob router registers for axi */ 163*4882a593Smuzhiyun 164*4882a593Smuzhiyun si_cores_info_t *cores_info; 165*4882a593Smuzhiyun gci_gpio_item_t *gci_gpio_head; /**< gci gpio interrupts head */ 166*4882a593Smuzhiyun uint chipnew; /**< new chip number */ 167*4882a593Smuzhiyun uint second_bar0win; /**< Backplane region */ 168*4882a593Smuzhiyun uint num_br; /**< # discovered bridges */ 169*4882a593Smuzhiyun uint32 br_wrapba[SI_MAXBR]; /**< address of bridge controlling wrapper */ 170*4882a593Smuzhiyun uint32 xtalfreq; 171*4882a593Smuzhiyun uint32 openloop_dco_code; /**< OPEN loop calibration dco code */ 172*4882a593Smuzhiyun uint8 spurmode; 173*4882a593Smuzhiyun bool device_removed; 174*4882a593Smuzhiyun uint axi_num_wrappers; 175*4882a593Smuzhiyun axi_wrapper_t * axi_wrapper; 176*4882a593Smuzhiyun uint8 device_wake_opt; /* device_wake GPIO number */ 177*4882a593Smuzhiyun uint8 lhl_ps_mode; 178*4882a593Smuzhiyun } si_info_t; 179*4882a593Smuzhiyun 180*4882a593Smuzhiyun #define SI_INFO(sih) ((si_info_t *)(uintptr)sih) 181*4882a593Smuzhiyun 182*4882a593Smuzhiyun #define GOODCOREADDR(x, b) (((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \ 183*4882a593Smuzhiyun ISALIGNED((x), SI_CORE_SIZE)) 184*4882a593Smuzhiyun #define GOODREGS(regs) ((regs) != NULL && ISALIGNED((uintptr)(regs), SI_CORE_SIZE)) 185*4882a593Smuzhiyun #define BADCOREADDR 0 186*4882a593Smuzhiyun #define GOODIDX(idx) (((uint)idx) < SI_MAXCORES) 187*4882a593Smuzhiyun #define NOREV -1 /**< Invalid rev */ 188*4882a593Smuzhiyun 189*4882a593Smuzhiyun #define PCI(si) ((BUSTYPE((si)->pub.bustype) == PCI_BUS) && \ 190*4882a593Smuzhiyun ((si)->pub.buscoretype == PCI_CORE_ID)) 191*4882a593Smuzhiyun 192*4882a593Smuzhiyun #define PCIE_GEN1(si) ((BUSTYPE((si)->pub.bustype) == PCI_BUS) && \ 193*4882a593Smuzhiyun ((si)->pub.buscoretype == PCIE_CORE_ID)) 194*4882a593Smuzhiyun 195*4882a593Smuzhiyun #define PCIE_GEN2(si) ((BUSTYPE((si)->pub.bustype) == PCI_BUS) && \ 196*4882a593Smuzhiyun ((si)->pub.buscoretype == PCIE2_CORE_ID)) 197*4882a593Smuzhiyun 198*4882a593Smuzhiyun #define PCIE(si) (PCIE_GEN1(si) || PCIE_GEN2(si)) 199*4882a593Smuzhiyun 200*4882a593Smuzhiyun #define PCMCIA(si) ((BUSTYPE((si)->pub.bustype) == PCMCIA_BUS) && ((si)->memseg == TRUE)) 201*4882a593Smuzhiyun 202*4882a593Smuzhiyun /** Newer chips can access PCI/PCIE and CC core without requiring to change PCI BAR0 WIN */ 203*4882a593Smuzhiyun #define SI_FAST(si) (PCIE(si) || (PCI(si) && ((si)->pub.buscorerev >= 13))) 204*4882a593Smuzhiyun 205*4882a593Smuzhiyun #define CCREGS_FAST(si) \ 206*4882a593Smuzhiyun (((si)->curmap == NULL) ? NULL : \ 207*4882a593Smuzhiyun ((volatile char *)((si)->curmap) + PCI_16KB0_CCREGS_OFFSET)) 208*4882a593Smuzhiyun #define PCIEREGS(si) (((volatile char *)((si)->curmap) + PCI_16KB0_PCIREGS_OFFSET)) 209*4882a593Smuzhiyun 210*4882a593Smuzhiyun /* 211*4882a593Smuzhiyun * Macros to disable/restore function core(D11, ENET, ILINE20, etc) interrupts before/ 212*4882a593Smuzhiyun * after core switching to avoid invalid register accesss inside ISR. 213*4882a593Smuzhiyun */ 214*4882a593Smuzhiyun #define INTR_OFF(si, intr_val) \ 215*4882a593Smuzhiyun if ((si)->intrsoff_fn && (si)->cores_info->coreid[(si)->curidx] == (si)->dev_coreid) { \ 216*4882a593Smuzhiyun intr_val = (*(si)->intrsoff_fn)((si)->intr_arg); } 217*4882a593Smuzhiyun #define INTR_RESTORE(si, intr_val) \ 218*4882a593Smuzhiyun if ((si)->intrsrestore_fn && (si)->cores_info->coreid[(si)->curidx] == (si)->dev_coreid) { \ 219*4882a593Smuzhiyun (*(si)->intrsrestore_fn)((si)->intr_arg, intr_val); } 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun /* dynamic clock control defines */ 222*4882a593Smuzhiyun #define LPOMINFREQ 25000 /**< low power oscillator min */ 223*4882a593Smuzhiyun #define LPOMAXFREQ 43000 /**< low power oscillator max */ 224*4882a593Smuzhiyun #define XTALMINFREQ 19800000 /**< 20 MHz - 1% */ 225*4882a593Smuzhiyun #define XTALMAXFREQ 20200000 /**< 20 MHz + 1% */ 226*4882a593Smuzhiyun #define PCIMINFREQ 25000000 /**< 25 MHz */ 227*4882a593Smuzhiyun #define PCIMAXFREQ 34000000 /**< 33 MHz + fudge */ 228*4882a593Smuzhiyun 229*4882a593Smuzhiyun #define ILP_DIV_5MHZ 0 /**< ILP = 5 MHz */ 230*4882a593Smuzhiyun #define ILP_DIV_1MHZ 4 /**< ILP = 1 MHz */ 231*4882a593Smuzhiyun 232*4882a593Smuzhiyun /* GPIO Based LED powersave defines */ 233*4882a593Smuzhiyun #define DEFAULT_GPIO_ONTIME 10 /**< Default: 10% on */ 234*4882a593Smuzhiyun #define DEFAULT_GPIO_OFFTIME 90 /**< Default: 10% on */ 235*4882a593Smuzhiyun 236*4882a593Smuzhiyun #ifndef DEFAULT_GPIOTIMERVAL 237*4882a593Smuzhiyun #define DEFAULT_GPIOTIMERVAL ((DEFAULT_GPIO_ONTIME << GPIO_ONTIME_SHIFT) | DEFAULT_GPIO_OFFTIME) 238*4882a593Smuzhiyun #endif // endif 239*4882a593Smuzhiyun 240*4882a593Smuzhiyun /* Silicon Backplane externs */ 241*4882a593Smuzhiyun extern void sb_scan(si_t *sih, volatile void *regs, uint devid); 242*4882a593Smuzhiyun extern uint sb_coreid(si_t *sih); 243*4882a593Smuzhiyun extern uint sb_intflag(si_t *sih); 244*4882a593Smuzhiyun extern uint sb_flag(si_t *sih); 245*4882a593Smuzhiyun extern void sb_setint(si_t *sih, int siflag); 246*4882a593Smuzhiyun extern uint sb_corevendor(si_t *sih); 247*4882a593Smuzhiyun extern uint sb_corerev(si_t *sih); 248*4882a593Smuzhiyun extern uint sb_corereg(si_t *sih, uint coreidx, uint regoff, uint mask, uint val); 249*4882a593Smuzhiyun extern volatile uint32 *sb_corereg_addr(si_t *sih, uint coreidx, uint regoff); 250*4882a593Smuzhiyun extern bool sb_iscoreup(si_t *sih); 251*4882a593Smuzhiyun extern volatile void *sb_setcoreidx(si_t *sih, uint coreidx); 252*4882a593Smuzhiyun extern uint32 sb_core_cflags(si_t *sih, uint32 mask, uint32 val); 253*4882a593Smuzhiyun extern void sb_core_cflags_wo(si_t *sih, uint32 mask, uint32 val); 254*4882a593Smuzhiyun extern uint32 sb_core_sflags(si_t *sih, uint32 mask, uint32 val); 255*4882a593Smuzhiyun extern void sb_commit(si_t *sih); 256*4882a593Smuzhiyun extern uint32 sb_base(uint32 admatch); 257*4882a593Smuzhiyun extern uint32 sb_size(uint32 admatch); 258*4882a593Smuzhiyun extern void sb_core_reset(si_t *sih, uint32 bits, uint32 resetbits); 259*4882a593Smuzhiyun extern void sb_core_disable(si_t *sih, uint32 bits); 260*4882a593Smuzhiyun extern uint32 sb_addrspace(si_t *sih, uint asidx); 261*4882a593Smuzhiyun extern uint32 sb_addrspacesize(si_t *sih, uint asidx); 262*4882a593Smuzhiyun extern int sb_numaddrspaces(si_t *sih); 263*4882a593Smuzhiyun 264*4882a593Smuzhiyun extern uint32 sb_set_initiator_to(si_t *sih, uint32 to, uint idx); 265*4882a593Smuzhiyun 266*4882a593Smuzhiyun extern bool sb_taclear(si_t *sih, bool details); 267*4882a593Smuzhiyun 268*4882a593Smuzhiyun #if defined(BCMDBG_PHYDUMP) 269*4882a593Smuzhiyun extern void sb_dumpregs(si_t *sih, struct bcmstrbuf *b); 270*4882a593Smuzhiyun #endif // endif 271*4882a593Smuzhiyun 272*4882a593Smuzhiyun /* Wake-on-wireless-LAN (WOWL) */ 273*4882a593Smuzhiyun extern bool sb_pci_pmecap(si_t *sih); 274*4882a593Smuzhiyun struct osl_info; 275*4882a593Smuzhiyun extern bool sb_pci_fastpmecap(struct osl_info *osh); 276*4882a593Smuzhiyun extern bool sb_pci_pmeclr(si_t *sih); 277*4882a593Smuzhiyun extern void sb_pci_pmeen(si_t *sih); 278*4882a593Smuzhiyun extern uint sb_pcie_readreg(void *sih, uint addrtype, uint offset); 279*4882a593Smuzhiyun 280*4882a593Smuzhiyun /* AMBA Interconnect exported externs */ 281*4882a593Smuzhiyun extern si_t *ai_attach(uint pcidev, osl_t *osh, void *regs, uint bustype, 282*4882a593Smuzhiyun void *sdh, char **vars, uint *varsz); 283*4882a593Smuzhiyun extern si_t *ai_kattach(osl_t *osh); 284*4882a593Smuzhiyun extern void ai_scan(si_t *sih, void *regs, uint32 erombase, uint devid); 285*4882a593Smuzhiyun 286*4882a593Smuzhiyun extern uint ai_flag(si_t *sih); 287*4882a593Smuzhiyun extern uint ai_flag_alt(si_t *sih); 288*4882a593Smuzhiyun extern void ai_setint(si_t *sih, int siflag); 289*4882a593Smuzhiyun extern uint ai_coreidx(si_t *sih); 290*4882a593Smuzhiyun extern uint ai_corevendor(si_t *sih); 291*4882a593Smuzhiyun extern uint ai_corerev(si_t *sih); 292*4882a593Smuzhiyun extern uint ai_corerev_minor(si_t *sih); 293*4882a593Smuzhiyun extern volatile uint32 *ai_corereg_addr(si_t *sih, uint coreidx, uint regoff); 294*4882a593Smuzhiyun extern bool ai_iscoreup(si_t *sih); 295*4882a593Smuzhiyun extern volatile void *ai_setcoreidx(si_t *sih, uint coreidx); 296*4882a593Smuzhiyun extern volatile void *ai_setcoreidx_2ndwrap(si_t *sih, uint coreidx); 297*4882a593Smuzhiyun extern volatile void *ai_setcoreidx_3rdwrap(si_t *sih, uint coreidx); 298*4882a593Smuzhiyun extern uint32 ai_core_cflags(si_t *sih, uint32 mask, uint32 val); 299*4882a593Smuzhiyun extern void ai_core_cflags_wo(si_t *sih, uint32 mask, uint32 val); 300*4882a593Smuzhiyun extern uint32 ai_core_sflags(si_t *sih, uint32 mask, uint32 val); 301*4882a593Smuzhiyun extern uint ai_corereg(si_t *sih, uint coreidx, uint regoff, uint mask, uint val); 302*4882a593Smuzhiyun extern uint ai_corereg_writeonly(si_t *sih, uint coreidx, uint regoff, uint mask, uint val); 303*4882a593Smuzhiyun extern void ai_core_reset(si_t *sih, uint32 bits, uint32 resetbits); 304*4882a593Smuzhiyun extern void ai_d11rsdb_core_reset(si_t *sih, uint32 bits, 305*4882a593Smuzhiyun uint32 resetbits, void *p, volatile void *s); 306*4882a593Smuzhiyun extern void ai_core_disable(si_t *sih, uint32 bits); 307*4882a593Smuzhiyun extern void ai_d11rsdb_core_disable(const si_info_t *sii, uint32 bits, 308*4882a593Smuzhiyun aidmp_t *pmacai, aidmp_t *smacai); 309*4882a593Smuzhiyun extern int ai_numaddrspaces(si_t *sih); 310*4882a593Smuzhiyun extern uint32 ai_addrspace(si_t *sih, uint spidx, uint baidx); 311*4882a593Smuzhiyun extern uint32 ai_addrspacesize(si_t *sih, uint spidx, uint baidx); 312*4882a593Smuzhiyun extern void ai_coreaddrspaceX(si_t *sih, uint asidx, uint32 *addr, uint32 *size); 313*4882a593Smuzhiyun extern uint ai_wrap_reg(si_t *sih, uint32 offset, uint32 mask, uint32 val); 314*4882a593Smuzhiyun extern void ai_update_backplane_timeouts(si_t *sih, bool enable, uint32 timeout, uint32 cid); 315*4882a593Smuzhiyun extern uint32 ai_clear_backplane_to(si_t *sih); 316*4882a593Smuzhiyun void ai_force_clocks(si_t *sih, uint clock_state); 317*4882a593Smuzhiyun extern uint ai_num_slaveports(si_t *sih, uint coreidx); 318*4882a593Smuzhiyun 319*4882a593Smuzhiyun #ifdef BCM_BACKPLANE_TIMEOUT 320*4882a593Smuzhiyun uint32 ai_clear_backplane_to_fast(si_t *sih, void * addr); 321*4882a593Smuzhiyun #endif /* BCM_BACKPLANE_TIMEOUT */ 322*4882a593Smuzhiyun 323*4882a593Smuzhiyun #if defined(AXI_TIMEOUTS) || defined(BCM_BACKPLANE_TIMEOUT) 324*4882a593Smuzhiyun extern uint32 ai_clear_backplane_to_per_core(si_t *sih, uint coreid, uint coreunit, void * wrap); 325*4882a593Smuzhiyun #endif /* AXI_TIMEOUTS || BCM_BACKPLANE_TIMEOUT */ 326*4882a593Smuzhiyun 327*4882a593Smuzhiyun #if defined(BCMDBG_PHYDUMP) 328*4882a593Smuzhiyun extern void ai_dumpregs(si_t *sih, struct bcmstrbuf *b); 329*4882a593Smuzhiyun #endif // endif 330*4882a593Smuzhiyun 331*4882a593Smuzhiyun extern uint32 ai_wrapper_dump_buf_size(si_t *sih); 332*4882a593Smuzhiyun extern uint32 ai_wrapper_dump_binary(si_t *sih, uchar *p); 333*4882a593Smuzhiyun extern bool ai_check_enable_backplane_log(si_t *sih); 334*4882a593Smuzhiyun extern uint32 ai_wrapper_dump_last_timeout(si_t *sih, uint32 *error, uint32 *core, uint32 *ba, 335*4882a593Smuzhiyun uchar *p); 336*4882a593Smuzhiyun 337*4882a593Smuzhiyun #define ub_scan(a, b, c) do {} while (0) 338*4882a593Smuzhiyun #define ub_flag(a) (0) 339*4882a593Smuzhiyun #define ub_setint(a, b) do {} while (0) 340*4882a593Smuzhiyun #define ub_coreidx(a) (0) 341*4882a593Smuzhiyun #define ub_corevendor(a) (0) 342*4882a593Smuzhiyun #define ub_corerev(a) (0) 343*4882a593Smuzhiyun #define ub_iscoreup(a) (0) 344*4882a593Smuzhiyun #define ub_setcoreidx(a, b) (0) 345*4882a593Smuzhiyun #define ub_core_cflags(a, b, c) (0) 346*4882a593Smuzhiyun #define ub_core_cflags_wo(a, b, c) do {} while (0) 347*4882a593Smuzhiyun #define ub_core_sflags(a, b, c) (0) 348*4882a593Smuzhiyun #define ub_corereg(a, b, c, d, e) (0) 349*4882a593Smuzhiyun #define ub_core_reset(a, b, c) do {} while (0) 350*4882a593Smuzhiyun #define ub_core_disable(a, b) do {} while (0) 351*4882a593Smuzhiyun #define ub_numaddrspaces(a) (0) 352*4882a593Smuzhiyun #define ub_addrspace(a, b) (0) 353*4882a593Smuzhiyun #define ub_addrspacesize(a, b) (0) 354*4882a593Smuzhiyun #define ub_view(a, b) do {} while (0) 355*4882a593Smuzhiyun #define ub_dumpregs(a, b) do {} while (0) 356*4882a593Smuzhiyun 357*4882a593Smuzhiyun #endif /* _siutils_priv_h_ */ 358