Lines Matching refs:io7

49 static struct io7 *io7_head = NULL;
91 inline struct io7 *
92 marvel_next_io7(struct io7 *prev) in marvel_next_io7()
97 struct io7 *
100 struct io7 *io7; in marvel_find_io7() local
102 for (io7 = io7_head; io7 && io7->pe != pe; io7 = io7->next) in marvel_find_io7()
105 return io7; in marvel_find_io7()
108 static struct io7 * __init
111 struct io7 *io7; in alloc_io7() local
112 struct io7 *insp; in alloc_io7()
120 io7 = alloc_bootmem(sizeof(*io7)); in alloc_io7()
121 io7->pe = pe; in alloc_io7()
122 spin_lock_init(&io7->irq_lock); in alloc_io7()
125 io7->ports[h].io7 = io7; in alloc_io7()
126 io7->ports[h].port = h; in alloc_io7()
127 io7->ports[h].enabled = 0; /* default to disabled */ in alloc_io7()
134 io7_head = io7; in alloc_io7()
135 else if (io7_head->pe > io7->pe) { /* insert at head */ in alloc_io7()
136 io7->next = io7_head; in alloc_io7()
137 io7_head = io7; in alloc_io7()
140 if (insp->pe == io7->pe) { in alloc_io7()
142 io7->pe); in alloc_io7()
147 insp->next->pe > io7->pe) { /* insert here */ in alloc_io7()
148 io7->next = insp->next; in alloc_io7()
149 insp->next = io7; in alloc_io7()
156 " - adding at head of list\n", io7->pe); in alloc_io7()
157 io7->next = io7_head; in alloc_io7()
158 io7_head = io7; in alloc_io7()
162 return io7; in alloc_io7()
166 io7_clear_errors(struct io7 *io7) in io7_clear_errors() argument
177 csrs = IO7_CSRS_KERN(io7->pe, port); in io7_clear_errors()
188 p7csrs = IO7_PORT7_CSRS_KERN(io7->pe); in io7_clear_errors()
200 io7_init_hose(struct io7 *io7, int port) in io7_init_hose() argument
205 struct io7_port *io7_port = &io7->ports[port]; in io7_init_hose()
206 io7_ioport_csrs *csrs = IO7_CSRS_KERN(io7->pe, port); in io7_init_hose()
234 hose->dense_mem_base = IO7_MEM_PHYS(io7->pe, port); in io7_init_hose()
235 hose->dense_io_base = IO7_IO_PHYS(io7->pe, port); in io7_init_hose()
240 hose->config_space_base = (unsigned long)IO7_CONF_KERN(io7->pe, port); in io7_init_hose()
242 hose->io_space->start = (unsigned long)IO7_IO_KERN(io7->pe, port); in io7_init_hose()
244 hose->io_space->name = mk_resource_name(io7->pe, port, "IO"); in io7_init_hose()
247 hose->mem_space->start = (unsigned long)IO7_MEM_KERN(io7->pe, port); in io7_init_hose()
249 hose->mem_space->name = mk_resource_name(io7->pe, port, "MEM"); in io7_init_hose()
285 hose->sg_isa = iommu_arena_new_node(marvel_cpuid_to_nid(io7->pe), in io7_init_hose()
303 hose->sg_pci = iommu_arena_new_node(marvel_cpuid_to_nid(io7->pe), in io7_init_hose()
332 marvel_init_io7(struct io7 *io7) in marvel_init_io7() argument
336 printk("Initializing IO7 at PID %d\n", io7->pe); in marvel_init_io7()
341 io7->csrs = IO7_PORT7_CSRS_KERN(io7->pe); in marvel_init_io7()
347 io7_ioport_csrs *csrs = IO7_CSRS_KERN(io7->pe, i); in marvel_init_io7()
349 io7->ports[i].enabled = 1; in marvel_init_io7()
350 io7_init_hose(io7, i); in marvel_init_io7()
378 struct io7 *io7; in marvel_find_console_vga_hose() local
398 if ((io7 = marvel_find_io7(pid))) in marvel_find_console_vga_hose()
399 hose = io7->ports[port].hose; in marvel_find_console_vga_hose()
422 struct io7 *io7; in marvel_specify_io7() local
429 io7 = alloc_io7(pid); in marvel_specify_io7()
430 if (io7) marvel_init_io7(io7); in marvel_specify_io7()
444 struct io7 *io7; in marvel_init_arch() local
457 for (io7 = NULL; NULL != (io7 = marvel_next_io7(io7)); ) in marvel_init_arch()
458 marvel_init_io7(io7); in marvel_init_arch()
954 struct io7 *io7 = ((struct io7_port *)agp->hose->sysdata)->io7; in marvel_agp_configure() local
963 agp_pll = io7->csrs->POx_RST[IO7_AGP_PORT].csr; in marvel_agp_configure()
1067 struct io7 *io7; in marvel_agp_info() local
1076 for (io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; ) { in marvel_agp_info()
1080 if (!io7->ports[IO7_AGP_PORT].enabled) in marvel_agp_info()
1083 h = io7->ports[IO7_AGP_PORT].hose; in marvel_agp_info()