Lines Matching full:core
14 static void bcma_host_pci_switch_core(struct bcma_device *core) in bcma_host_pci_switch_core() argument
16 pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN, in bcma_host_pci_switch_core()
17 core->addr); in bcma_host_pci_switch_core()
18 pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN2, in bcma_host_pci_switch_core()
19 core->wrap); in bcma_host_pci_switch_core()
20 core->bus->mapped_core = core; in bcma_host_pci_switch_core()
21 pr_debug("Switched to core: 0x%X\n", core->id.id); in bcma_host_pci_switch_core()
24 /* Provides access to the requested core. Returns base offset that has to be
26 static u16 bcma_host_pci_provide_access_to_core(struct bcma_device *core) in bcma_host_pci_provide_access_to_core() argument
28 switch (core->id.id) { in bcma_host_pci_provide_access_to_core()
35 if (core->bus->mapped_core != core) in bcma_host_pci_provide_access_to_core()
36 bcma_host_pci_switch_core(core); in bcma_host_pci_provide_access_to_core()
40 static u8 bcma_host_pci_read8(struct bcma_device *core, u16 offset) in bcma_host_pci_read8() argument
42 offset += bcma_host_pci_provide_access_to_core(core); in bcma_host_pci_read8()
43 return ioread8(core->bus->mmio + offset); in bcma_host_pci_read8()
46 static u16 bcma_host_pci_read16(struct bcma_device *core, u16 offset) in bcma_host_pci_read16() argument
48 offset += bcma_host_pci_provide_access_to_core(core); in bcma_host_pci_read16()
49 return ioread16(core->bus->mmio + offset); in bcma_host_pci_read16()
52 static u32 bcma_host_pci_read32(struct bcma_device *core, u16 offset) in bcma_host_pci_read32() argument
54 offset += bcma_host_pci_provide_access_to_core(core); in bcma_host_pci_read32()
55 return ioread32(core->bus->mmio + offset); in bcma_host_pci_read32()
58 static void bcma_host_pci_write8(struct bcma_device *core, u16 offset, in bcma_host_pci_write8() argument
61 offset += bcma_host_pci_provide_access_to_core(core); in bcma_host_pci_write8()
62 iowrite8(value, core->bus->mmio + offset); in bcma_host_pci_write8()
65 static void bcma_host_pci_write16(struct bcma_device *core, u16 offset, in bcma_host_pci_write16() argument
68 offset += bcma_host_pci_provide_access_to_core(core); in bcma_host_pci_write16()
69 iowrite16(value, core->bus->mmio + offset); in bcma_host_pci_write16()
72 static void bcma_host_pci_write32(struct bcma_device *core, u16 offset, in bcma_host_pci_write32() argument
75 offset += bcma_host_pci_provide_access_to_core(core); in bcma_host_pci_write32()
76 iowrite32(value, core->bus->mmio + offset); in bcma_host_pci_write32()
80 void bcma_host_pci_block_read(struct bcma_device *core, void *buffer, in bcma_host_pci_block_read() argument
83 void __iomem *addr = core->bus->mmio + offset; in bcma_host_pci_block_read()
84 if (core->bus->mapped_core != core) in bcma_host_pci_block_read()
85 bcma_host_pci_switch_core(core); in bcma_host_pci_block_read()
103 void bcma_host_pci_block_write(struct bcma_device *core, const void *buffer, in bcma_host_pci_block_write() argument
106 void __iomem *addr = core->bus->mmio + offset; in bcma_host_pci_block_write()
107 if (core->bus->mapped_core != core) in bcma_host_pci_block_write()
108 bcma_host_pci_switch_core(core); in bcma_host_pci_block_write()
127 static u32 bcma_host_pci_aread32(struct bcma_device *core, u16 offset) in bcma_host_pci_aread32() argument
129 if (core->bus->mapped_core != core) in bcma_host_pci_aread32()
130 bcma_host_pci_switch_core(core); in bcma_host_pci_aread32()
131 return ioread32(core->bus->mmio + (1 * BCMA_CORE_SIZE) + offset); in bcma_host_pci_aread32()
134 static void bcma_host_pci_awrite32(struct bcma_device *core, u16 offset, in bcma_host_pci_awrite32() argument
137 if (core->bus->mapped_core != core) in bcma_host_pci_awrite32()
138 bcma_host_pci_switch_core(core); in bcma_host_pci_awrite32()
139 iowrite32(value, core->bus->mmio + (1 * BCMA_CORE_SIZE) + offset); in bcma_host_pci_awrite32()