Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/wl/include/bcmsdbrcm.h
Views: 3959
/*1* BRCM SDIO HOST CONTROLLER driver2*3* Copyright (C) 2012, Broadcom Corporation4* All Rights Reserved.5*6* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;7* the contents of this file may not be disclosed to third parties, copied8* or duplicated in any form, in whole or in part, without the prior9* written permission of Broadcom Corporation.10*11* $Id: bcmsdbrcm.h 241182 2011-02-17 21:50:03Z gmo $12*/1314/* global msglevel for debug messages */15#ifdef BCMDBG16#define sd_err(x) do { if (sd_msglevel & SDH_ERROR_VAL) printf x; } while (0)17#define sd_trace(x) do { if (sd_msglevel & SDH_TRACE_VAL) printf x; } while (0)18#define sd_info(x) do { if (sd_msglevel & SDH_INFO_VAL) printf x; } while (0)19#define sd_debug(x) do { if (sd_msglevel & SDH_DEBUG_VAL) printf x; } while (0)20#define sd_data(x) do { if (sd_msglevel & SDH_DATA_VAL) printf x; } while (0)21#define sd_ctrl(x) do { if (sd_msglevel & SDH_CTRL_VAL) printf x; } while (0)22#else23#define sd_err(x)24#define sd_trace(x)25#define sd_info(x)26#define sd_debug(x)27#define sd_data(x)28#define sd_ctrl(x)29#endif3031#ifdef BCMPERFSTATS32#define sd_log(x) do { if (sd_msglevel & SDH_LOG_VAL) bcmlog x; } while (0)33#else34#define sd_log(x)35#endif3637/* SDIOH public information, used by per-port code */38struct sdioh_pubinfo {39int local_intrcount; /* Controller interrupt count */40bool dev_init_done; /* Client SDIO interface initted */41bool host_init_done; /* Controller initted */42bool intr_registered; /* Client handler registered */43bool dev_intr_enabled; /* Device interrupt enabled/disabled */44uint lockcount; /* Next count of sdbrcm_lock() calls */45void *sdos_info; /* Pointer to per-OS private data */46};474849#define BLOCK_SIZE_4318 6450#define BLOCK_SIZE_4328 5125152/* private bus modes */53/* move to API or hardware header. */54#define SDIOH_MODE_SPI 055#define SDIOH_MODE_SD1 156#define SDIOH_MODE_SD4 25758/* Expected dev status value for CMD7 */59#define SDIOH_CMD7_EXP_STATUS 0x00001E006061#define RETRIES_SMALL 2062#define RETRIES_LARGE 50000063#define SD_TIMEOUT 250000 /* Timeout after several ms if CMD not complete. */6465#define ARVM_MASK 0xFF106667#define USE_PIO 0x0 /* DMA or PIO */68#define USE_DMA 0x16970#define NTXD 471#define NRXD 472#define RXBUFSZ 819273#define NRXBUFPOST 474#define HWRXOFF 87576#define USE_BLOCKMODE 0x2 /* Block mode can be single block or multi */77#define USE_MULTIBLOCK 0x47879#define EXT_CLK 0xffffffff /* external clock improve comment. */8081extern int isr_sdbrcm_check_dev_intr(struct sdioh_pubinfo *sd);82extern uint sd_msglevel;8384extern uint32 *sdbrcm_reg_map(osl_t *osh, int32 addr, int size);85extern void sdbrcm_reg_unmap(osl_t *osh, int32 addr, int size);86extern int sdbrcm_register_irq(sdioh_info_t *sd, uint irq);87extern void sdbrcm_free_irq(uint irq, sdioh_info_t *sd);8889extern void sdbrcm_lock(sdioh_info_t *sd);90extern void sdbrcm_unlock(sdioh_info_t *sd);9192extern void sdbrcm_devintr_on(sdioh_info_t *sd);93extern void sdbrcm_devintr_off(sdioh_info_t *sd);9495/* Allocate/init/free per-OS private data */96extern int sdbrcm_osinit(sdioh_info_t *sd, osl_t *osh);97extern void sdbrcm_osfree(sdioh_info_t *sd, osl_t *osh);9899100