Lines Matching refs:io7

49 static struct io7 *io7_head = NULL;
94 inline struct io7 *
95 marvel_next_io7(struct io7 *prev) in marvel_next_io7()
100 struct io7 *
103 struct io7 *io7; in marvel_find_io7() local
105 for (io7 = io7_head; io7 && io7->pe != pe; io7 = io7->next) in marvel_find_io7()
108 return io7; in marvel_find_io7()
111 static struct io7 * __init
114 struct io7 *io7; in alloc_io7() local
115 struct io7 *insp; in alloc_io7()
123 io7 = memblock_alloc(sizeof(*io7), SMP_CACHE_BYTES); in alloc_io7()
124 if (!io7) in alloc_io7()
126 sizeof(*io7)); in alloc_io7()
127 io7->pe = pe; in alloc_io7()
128 raw_spin_lock_init(&io7->irq_lock); in alloc_io7()
131 io7->ports[h].io7 = io7; in alloc_io7()
132 io7->ports[h].port = h; in alloc_io7()
133 io7->ports[h].enabled = 0; /* default to disabled */ in alloc_io7()
140 io7_head = io7; in alloc_io7()
141 else if (io7_head->pe > io7->pe) { /* insert at head */ in alloc_io7()
142 io7->next = io7_head; in alloc_io7()
143 io7_head = io7; in alloc_io7()
146 if (insp->pe == io7->pe) { in alloc_io7()
148 io7->pe); in alloc_io7()
153 insp->next->pe > io7->pe) { /* insert here */ in alloc_io7()
154 io7->next = insp->next; in alloc_io7()
155 insp->next = io7; in alloc_io7()
162 " - adding at head of list\n", io7->pe); in alloc_io7()
163 io7->next = io7_head; in alloc_io7()
164 io7_head = io7; in alloc_io7()
168 return io7; in alloc_io7()
172 io7_clear_errors(struct io7 *io7) in io7_clear_errors() argument
183 csrs = IO7_CSRS_KERN(io7->pe, port); in io7_clear_errors()
194 p7csrs = IO7_PORT7_CSRS_KERN(io7->pe); in io7_clear_errors()
206 io7_init_hose(struct io7 *io7, int port) in io7_init_hose() argument
211 struct io7_port *io7_port = &io7->ports[port]; in io7_init_hose()
212 io7_ioport_csrs *csrs = IO7_CSRS_KERN(io7->pe, port); in io7_init_hose()
240 hose->dense_mem_base = IO7_MEM_PHYS(io7->pe, port); in io7_init_hose()
241 hose->dense_io_base = IO7_IO_PHYS(io7->pe, port); in io7_init_hose()
246 hose->config_space_base = (unsigned long)IO7_CONF_KERN(io7->pe, port); in io7_init_hose()
248 hose->io_space->start = (unsigned long)IO7_IO_KERN(io7->pe, port); in io7_init_hose()
250 hose->io_space->name = mk_resource_name(io7->pe, port, "IO"); in io7_init_hose()
253 hose->mem_space->start = (unsigned long)IO7_MEM_KERN(io7->pe, port); in io7_init_hose()
255 hose->mem_space->name = mk_resource_name(io7->pe, port, "MEM"); in io7_init_hose()
291 hose->sg_isa = iommu_arena_new_node(marvel_cpuid_to_nid(io7->pe), in io7_init_hose()
309 hose->sg_pci = iommu_arena_new_node(marvel_cpuid_to_nid(io7->pe), in io7_init_hose()
338 marvel_init_io7(struct io7 *io7) in marvel_init_io7() argument
342 printk("Initializing IO7 at PID %d\n", io7->pe); in marvel_init_io7()
347 io7->csrs = IO7_PORT7_CSRS_KERN(io7->pe); in marvel_init_io7()
353 io7_ioport_csrs *csrs = IO7_CSRS_KERN(io7->pe, i); in marvel_init_io7()
355 io7->ports[i].enabled = 1; in marvel_init_io7()
356 io7_init_hose(io7, i); in marvel_init_io7()
385 struct io7 *io7; in marvel_find_console_vga_hose() local
405 if ((io7 = marvel_find_io7(pid))) in marvel_find_console_vga_hose()
406 hose = io7->ports[port].hose; in marvel_find_console_vga_hose()
430 struct io7 *io7; in marvel_specify_io7() local
437 io7 = alloc_io7(pid); in marvel_specify_io7()
438 if (io7) marvel_init_io7(io7); in marvel_specify_io7()
452 struct io7 *io7; in marvel_init_arch() local
465 for (io7 = NULL; NULL != (io7 = marvel_next_io7(io7)); ) in marvel_init_arch()
466 marvel_init_io7(io7); in marvel_init_arch()
962 struct io7 *io7 = ((struct io7_port *)agp->hose->sysdata)->io7; in marvel_agp_configure() local
971 agp_pll = io7->csrs->POx_RST[IO7_AGP_PORT].csr; in marvel_agp_configure()
1075 struct io7 *io7; in marvel_agp_info() local
1084 for (io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; ) { in marvel_agp_info()
1088 if (!io7->ports[IO7_AGP_PORT].enabled) in marvel_agp_info()
1091 h = io7->ports[IO7_AGP_PORT].hose; in marvel_agp_info()