Lines Matching refs:core

14 static void bcma_host_pci_switch_core(struct bcma_device *core)
16 int win2 = core->bus->host_is_pcie2 ?
19 pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN,
20 core->addr);
21 pci_write_config_dword(core->bus->host_pci, win2, core->wrap);
22 core->bus->mapped_core = core;
23 bcma_debug(core->bus, "Switched to core: 0x%X\n", core->id.id);
26 /* Provides access to the requested core. Returns base offset that has to be
28 static u16 bcma_host_pci_provide_access_to_core(struct bcma_device *core)
30 switch (core->id.id) {
37 if (core->bus->mapped_core != core)
38 bcma_host_pci_switch_core(core);
42 static u8 bcma_host_pci_read8(struct bcma_device *core, u16 offset)
44 offset += bcma_host_pci_provide_access_to_core(core);
45 return ioread8(core->bus->mmio + offset);
48 static u16 bcma_host_pci_read16(struct bcma_device *core, u16 offset)
50 offset += bcma_host_pci_provide_access_to_core(core);
51 return ioread16(core->bus->mmio + offset);
54 static u32 bcma_host_pci_read32(struct bcma_device *core, u16 offset)
56 offset += bcma_host_pci_provide_access_to_core(core);
57 return ioread32(core->bus->mmio + offset);
60 static void bcma_host_pci_write8(struct bcma_device *core, u16 offset,
63 offset += bcma_host_pci_provide_access_to_core(core);
64 iowrite8(value, core->bus->mmio + offset);
67 static void bcma_host_pci_write16(struct bcma_device *core, u16 offset,
70 offset += bcma_host_pci_provide_access_to_core(core);
71 iowrite16(value, core->bus->mmio + offset);
74 static void bcma_host_pci_write32(struct bcma_device *core, u16 offset,
77 offset += bcma_host_pci_provide_access_to_core(core);
78 iowrite32(value, core->bus->mmio + offset);
82 static void bcma_host_pci_block_read(struct bcma_device *core, void *buffer,
85 void __iomem *addr = core->bus->mmio + offset;
86 if (core->bus->mapped_core != core)
87 bcma_host_pci_switch_core(core);
105 static void bcma_host_pci_block_write(struct bcma_device *core,
109 void __iomem *addr = core->bus->mmio + offset;
110 if (core->bus->mapped_core != core)
111 bcma_host_pci_switch_core(core);
130 static u32 bcma_host_pci_aread32(struct bcma_device *core, u16 offset)
132 if (core->bus->mapped_core != core)
133 bcma_host_pci_switch_core(core);
134 return ioread32(core->bus->mmio + (1 * BCMA_CORE_SIZE) + offset);
137 static void bcma_host_pci_awrite32(struct bcma_device *core, u16 offset,
140 if (core->bus->mapped_core != core)
141 bcma_host_pci_switch_core(core);
142 iowrite32(value, core->bus->mmio + (1 * BCMA_CORE_SIZE) + offset);
218 /* Scan bus to find out generation of PCIe core */
359 int bcma_host_pci_irq_ctl(struct bcma_bus *bus, struct bcma_device *core,
368 * not routed through the PCI core.
369 * So we must not enable routing through the PCI core. */
379 coremask = BIT(core->core_index) << 8;