Lines Matching full:shared
261 struct brcmf_pcie_shared_info shared; member
286 * struct brcmf_pcie_dhi_ringinfo - dongle/host interface shared ring info
669 struct brcmf_pcie_shared_info *shared; in brcmf_pcie_send_mb_data() local
675 shared = &devinfo->shared; in brcmf_pcie_send_mb_data()
676 addr = shared->htod_mb_data_addr; in brcmf_pcie_send_mb_data()
706 struct brcmf_pcie_shared_info *shared; in brcmf_pcie_handle_mb_data() local
710 shared = &devinfo->shared; in brcmf_pcie_handle_mb_data()
711 addr = shared->dtoh_mb_data_addr; in brcmf_pcie_handle_mb_data()
741 struct brcmf_pcie_shared_info *shared; in brcmf_pcie_bus_console_init() local
745 shared = &devinfo->shared; in brcmf_pcie_bus_console_init()
746 console = &shared->console; in brcmf_pcie_bus_console_init()
747 addr = shared->tcm_base_address + BRCMF_SHARED_CONSOLE_ADDR_OFFSET; in brcmf_pcie_bus_console_init()
777 console = &devinfo->shared.console; in brcmf_pcie_bus_console_read()
825 if (devinfo->shared.flags & BRCMF_PCIE_SHARED_HOSTRDY_DB1) in brcmf_pcie_hostready()
1044 if (devinfo->shared.version < BRCMF_PCIE_SHARED_VERSION_7) in brcmf_pcie_alloc_dma_and_ring()
1106 devinfo->shared.commonrings[i]); in brcmf_pcie_release_ringbuffers()
1107 devinfo->shared.commonrings[i] = NULL; in brcmf_pcie_release_ringbuffers()
1109 kfree(devinfo->shared.flowrings); in brcmf_pcie_release_ringbuffers()
1110 devinfo->shared.flowrings = NULL; in brcmf_pcie_release_ringbuffers()
1140 memcpy_fromio(&ringinfo, devinfo->tcm + devinfo->shared.ring_info_addr, in brcmf_pcie_init_ringbuffers()
1142 if (devinfo->shared.version >= 6) { in brcmf_pcie_init_ringbuffers()
1210 memcpy_toio(devinfo->tcm + devinfo->shared.ring_info_addr, in brcmf_pcie_init_ringbuffers()
1224 devinfo->shared.commonrings[i] = ring; in brcmf_pcie_init_ringbuffers()
1239 devinfo->shared.commonrings[i] = ring; in brcmf_pcie_init_ringbuffers()
1246 devinfo->shared.max_flowrings = max_flowrings; in brcmf_pcie_init_ringbuffers()
1247 devinfo->shared.max_submissionrings = max_submissionrings; in brcmf_pcie_init_ringbuffers()
1248 devinfo->shared.max_completionrings = max_completionrings; in brcmf_pcie_init_ringbuffers()
1271 devinfo->shared.flowrings = rings; in brcmf_pcie_init_ringbuffers()
1285 if (devinfo->shared.scratch) in brcmf_pcie_release_scratchbuffers()
1288 devinfo->shared.scratch, in brcmf_pcie_release_scratchbuffers()
1289 devinfo->shared.scratch_dmahandle); in brcmf_pcie_release_scratchbuffers()
1290 if (devinfo->shared.ringupd) in brcmf_pcie_release_scratchbuffers()
1293 devinfo->shared.ringupd, in brcmf_pcie_release_scratchbuffers()
1294 devinfo->shared.ringupd_dmahandle); in brcmf_pcie_release_scratchbuffers()
1303 devinfo->shared.scratch = in brcmf_pcie_init_scratchbuffers()
1306 &devinfo->shared.scratch_dmahandle, in brcmf_pcie_init_scratchbuffers()
1308 if (!devinfo->shared.scratch) in brcmf_pcie_init_scratchbuffers()
1311 addr = devinfo->shared.tcm_base_address + in brcmf_pcie_init_scratchbuffers()
1313 address = (u64)devinfo->shared.scratch_dmahandle; in brcmf_pcie_init_scratchbuffers()
1316 addr = devinfo->shared.tcm_base_address + in brcmf_pcie_init_scratchbuffers()
1320 devinfo->shared.ringupd = in brcmf_pcie_init_scratchbuffers()
1323 &devinfo->shared.ringupd_dmahandle, in brcmf_pcie_init_scratchbuffers()
1325 if (!devinfo->shared.ringupd) in brcmf_pcie_init_scratchbuffers()
1328 addr = devinfo->shared.tcm_base_address + in brcmf_pcie_init_scratchbuffers()
1330 address = (u64)devinfo->shared.ringupd_dmahandle; in brcmf_pcie_init_scratchbuffers()
1333 addr = devinfo->shared.tcm_base_address + in brcmf_pcie_init_scratchbuffers()
1496 struct brcmf_pcie_shared_info *shared; in brcmf_pcie_init_share_ram_info() local
1499 shared = &devinfo->shared; in brcmf_pcie_init_share_ram_info()
1500 shared->tcm_base_address = sharedram_addr; in brcmf_pcie_init_share_ram_info()
1502 shared->flags = brcmf_pcie_read_tcm32(devinfo, sharedram_addr); in brcmf_pcie_init_share_ram_info()
1503 shared->version = (u8)(shared->flags & BRCMF_PCIE_SHARED_VERSION_MASK); in brcmf_pcie_init_share_ram_info()
1504 brcmf_dbg(PCIE, "PCIe protocol version %d\n", shared->version); in brcmf_pcie_init_share_ram_info()
1505 if ((shared->version > BRCMF_PCIE_MAX_SHARED_VERSION) || in brcmf_pcie_init_share_ram_info()
1506 (shared->version < BRCMF_PCIE_MIN_SHARED_VERSION)) { in brcmf_pcie_init_share_ram_info()
1508 shared->version); in brcmf_pcie_init_share_ram_info()
1513 if (shared->flags & BRCMF_PCIE_SHARED_DMA_INDEX) { in brcmf_pcie_init_share_ram_info()
1514 if (shared->flags & BRCMF_PCIE_SHARED_DMA_2B_IDX) in brcmf_pcie_init_share_ram_info()
1521 shared->max_rxbufpost = brcmf_pcie_read_tcm16(devinfo, addr); in brcmf_pcie_init_share_ram_info()
1522 if (shared->max_rxbufpost == 0) in brcmf_pcie_init_share_ram_info()
1523 shared->max_rxbufpost = BRCMF_DEF_MAX_RXBUFPOST; in brcmf_pcie_init_share_ram_info()
1526 shared->rx_dataoffset = brcmf_pcie_read_tcm32(devinfo, addr); in brcmf_pcie_init_share_ram_info()
1529 shared->htod_mb_data_addr = brcmf_pcie_read_tcm32(devinfo, addr); in brcmf_pcie_init_share_ram_info()
1532 shared->dtoh_mb_data_addr = brcmf_pcie_read_tcm32(devinfo, addr); in brcmf_pcie_init_share_ram_info()
1535 shared->ring_info_addr = brcmf_pcie_read_tcm32(devinfo, addr); in brcmf_pcie_init_share_ram_info()
1538 shared->max_rxbufpost, shared->rx_dataoffset); in brcmf_pcie_init_share_ram_info()
1570 /* reset last 4 bytes of RAM address. to be used for shared in brcmf_pcie_download_fw_nvram()
1610 brcmf_err(bus, "Invalid shared RAM address 0x%08x\n", in brcmf_pcie_download_fw_nvram()
1614 brcmf_dbg(PCIE, "Shared RAM addr: 0x%08x\n", sharedram_addr); in brcmf_pcie_download_fw_nvram()
1783 * the device is shared and the devision is determined by FW. Parse in brcmf_pcie_setup()
1810 &devinfo->shared.commonrings[i]->commonring; in brcmf_pcie_setup()
1812 flowrings = kcalloc(devinfo->shared.max_flowrings, sizeof(*flowrings), in brcmf_pcie_setup()
1817 for (i = 0; i < devinfo->shared.max_flowrings; i++) in brcmf_pcie_setup()
1818 flowrings[i] = &devinfo->shared.flowrings[i].commonring; in brcmf_pcie_setup()
1821 bus->msgbuf->rx_dataoffset = devinfo->shared.rx_dataoffset; in brcmf_pcie_setup()
1822 bus->msgbuf->max_rxbufpost = devinfo->shared.max_rxbufpost; in brcmf_pcie_setup()
1823 bus->msgbuf->max_flowrings = devinfo->shared.max_flowrings; in brcmf_pcie_setup()