Lines Matching refs:ctx
24 static int sst_platform_get_resources(struct intel_sst_drv *ctx)
27 struct pci_dev *pci = ctx->pci;
35 if (ctx->dev_id == PCI_DEVICE_ID_INTEL_SST_TNG) {
36 ctx->ddr_base = pci_resource_start(pci, 0);
38 ddr_base = relocate_imr_addr_mrfld(ctx->ddr_base);
39 if (!ctx->pdata->lib_info) {
40 dev_err(ctx->dev, "lib_info pointer NULL\n");
44 if (ddr_base != ctx->pdata->lib_info->mod_base) {
45 dev_err(ctx->dev,
50 ctx->ddr_end = pci_resource_end(pci, 0);
52 ctx->ddr = pcim_iomap(pci, 0,
54 if (!ctx->ddr) {
58 dev_dbg(ctx->dev, "sst: DDR Ptr %p\n", ctx->ddr);
60 ctx->ddr = NULL;
63 ctx->shim_phy_add = pci_resource_start(pci, 1);
64 ctx->shim = pcim_iomap(pci, 1, pci_resource_len(pci, 1));
65 if (!ctx->shim) {
69 dev_dbg(ctx->dev, "SST Shim Ptr %p\n", ctx->shim);
72 ctx->mailbox_add = pci_resource_start(pci, 2);
73 ctx->mailbox = pcim_iomap(pci, 2, pci_resource_len(pci, 2));
74 if (!ctx->mailbox) {
78 dev_dbg(ctx->dev, "SRAM Ptr %p\n", ctx->mailbox);
81 ctx->iram_end = pci_resource_end(pci, 3);
82 ctx->iram_base = pci_resource_start(pci, 3);
83 ctx->iram = pcim_iomap(pci, 3, pci_resource_len(pci, 3));
84 if (!ctx->iram) {
88 dev_dbg(ctx->dev, "IRAM Ptr %p\n", ctx->iram);
91 ctx->dram_end = pci_resource_end(pci, 4);
92 ctx->dram_base = pci_resource_start(pci, 4);
93 ctx->dram = pcim_iomap(pci, 4, pci_resource_len(pci, 4));
94 if (!ctx->dram) {
98 dev_dbg(ctx->dev, "DRAM Ptr %p\n", ctx->dram);