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