Lines Matching refs:sdh
126 uint bustype, void *sdh, char **vars, uint *varsz);
127 static bool si_buscore_prep(si_info_t *sii, uint bustype, uint devid, void *sdh);
172 uint bustype, void *sdh, char **vars, uint *varsz) in si_attach() argument
192 if (si_doattach(sii, devid, osh, regs, bustype, sdh, vars, varsz) == NULL) { in si_attach()
277 si_buscore_prep(si_info_t *sii, uint bustype, uint devid, void *sdh) in si_buscore_prep() argument
279 BCM_REFERENCE(sdh); in si_buscore_prep()
292 bcmsdh_cfg_write(sdh, SDIO_FUNC_1, SBSDIO_FUNC1_CHIPCLKCSR, clkset, &err); in si_buscore_prep()
297 clkval = bcmsdh_cfg_read(sdh, SDIO_FUNC_1, SBSDIO_FUNC1_CHIPCLKCSR, NULL); in si_buscore_prep()
299 SPINWAIT(((clkval = bcmsdh_cfg_read(sdh, SDIO_FUNC_1, in si_buscore_prep()
308 bcmsdh_cfg_write(sdh, SDIO_FUNC_1, SBSDIO_FUNC1_CHIPCLKCSR, in si_buscore_prep()
315 bcmsdh_cfg_write(sdh, SDIO_FUNC_1, SBSDIO_FUNC1_SDIOPULLUP, 0, NULL); in si_buscore_prep()
327 regdata = bcmsdh_cfg_read_word(sdh, SDIO_FUNC_0, SPID_CONFIG, NULL); in si_buscore_prep()
331 bcmsdh_cfg_write_word(sdh, SDIO_FUNC_0, SPID_CONFIG, regdata, &err); in si_buscore_prep()
648 si_get_sdio_addrbase(void *sdh) in si_get_sdio_addrbase() argument
654 devctl = bcmsdh_cfg_read(sdh, SDIO_FUNC_1, SBSDIO_DEVICE_CTL, &err); in si_get_sdio_addrbase()
658 bcmsdh_cfg_write(sdh, SDIO_FUNC_1, in si_get_sdio_addrbase()
663 addr |= (bcmsdh_cfg_read(sdh, SDIO_FUNC_1, SBSDIO_FUNC1_SBADDRLOW, NULL) << 8) | in si_get_sdio_addrbase()
664 (bcmsdh_cfg_read(sdh, SDIO_FUNC_1, SBSDIO_FUNC1_SBADDRMID, NULL) << 16) | in si_get_sdio_addrbase()
665 (bcmsdh_cfg_read(sdh, SDIO_FUNC_1, SBSDIO_FUNC1_SBADDRHIGH, NULL) << 24); in si_get_sdio_addrbase()
673 bcmsdh_cfg_write(sdh, SDIO_FUNC_1, SBSDIO_DEVICE_CTL, devctl, &err); in si_get_sdio_addrbase()
688 uint bustype, void *sdh, char **vars, uint *varsz) in si_doattach() argument
713 sii->sdh = sdh; in si_doattach()
751 cardcap = bcmsdh_cfg_read(sdh, SDIO_FUNC_0, SDIOD_CCCR_BRCM_CARDCAP, NULL); in si_doattach()
754 sdioc = si_get_sdio_addrbase(sdh); in si_doattach()
779 if (!si_buscore_prep(sii, bustype, devid, sdh)) { in si_doattach()