Lines Matching refs:io7

48 static struct io7 *io7_head = NULL;
90 inline struct io7 *
91 marvel_next_io7(struct io7 *prev) in marvel_next_io7()
96 struct io7 *
99 struct io7 *io7; in marvel_find_io7() local
101 for (io7 = io7_head; io7 && io7->pe != pe; io7 = io7->next) in marvel_find_io7()
104 return io7; in marvel_find_io7()
107 static struct io7 * __init
110 struct io7 *io7; in alloc_io7() local
111 struct io7 *insp; in alloc_io7()
119 io7 = memblock_alloc_or_panic(sizeof(*io7), SMP_CACHE_BYTES); in alloc_io7()
120 io7->pe = pe; in alloc_io7()
121 raw_spin_lock_init(&io7->irq_lock); in alloc_io7()
124 io7->ports[h].io7 = io7; in alloc_io7()
125 io7->ports[h].port = h; in alloc_io7()
126 io7->ports[h].enabled = 0; /* default to disabled */ in alloc_io7()
133 io7_head = io7; in alloc_io7()
134 else if (io7_head->pe > io7->pe) { /* insert at head */ in alloc_io7()
135 io7->next = io7_head; in alloc_io7()
136 io7_head = io7; in alloc_io7()
139 if (insp->pe == io7->pe) { in alloc_io7()
141 io7->pe); in alloc_io7()
146 insp->next->pe > io7->pe) { /* insert here */ in alloc_io7()
147 io7->next = insp->next; in alloc_io7()
148 insp->next = io7; in alloc_io7()
155 " - adding at head of list\n", io7->pe); in alloc_io7()
156 io7->next = io7_head; in alloc_io7()
157 io7_head = io7; in alloc_io7()
161 return io7; in alloc_io7()
165 io7_clear_errors(struct io7 *io7) in io7_clear_errors() argument
176 csrs = IO7_CSRS_KERN(io7->pe, port); in io7_clear_errors()
187 p7csrs = IO7_PORT7_CSRS_KERN(io7->pe); in io7_clear_errors()
199 io7_init_hose(struct io7 *io7, int port) in io7_init_hose() argument
204 struct io7_port *io7_port = &io7->ports[port]; in io7_init_hose()
205 io7_ioport_csrs *csrs = IO7_CSRS_KERN(io7->pe, port); in io7_init_hose()
233 hose->dense_mem_base = IO7_MEM_PHYS(io7->pe, port); in io7_init_hose()
234 hose->dense_io_base = IO7_IO_PHYS(io7->pe, port); in io7_init_hose()
239 hose->config_space_base = (unsigned long)IO7_CONF_KERN(io7->pe, port); in io7_init_hose()
241 hose->io_space->start = (unsigned long)IO7_IO_KERN(io7->pe, port); in io7_init_hose()
243 hose->io_space->name = mk_resource_name(io7->pe, port, "IO"); in io7_init_hose()
246 hose->mem_space->start = (unsigned long)IO7_MEM_KERN(io7->pe, port); in io7_init_hose()
248 hose->mem_space->name = mk_resource_name(io7->pe, port, "MEM"); in io7_init_hose()
329 marvel_init_io7(struct io7 *io7) in marvel_init_io7() argument
333 printk("Initializing IO7 at PID %d\n", io7->pe); in marvel_init_io7()
338 io7->csrs = IO7_PORT7_CSRS_KERN(io7->pe); in marvel_init_io7()
344 io7_ioport_csrs *csrs = IO7_CSRS_KERN(io7->pe, i); in marvel_init_io7()
346 io7->ports[i].enabled = 1; in marvel_init_io7()
347 io7_init_hose(io7, i); in marvel_init_io7()
376 struct io7 *io7; in marvel_find_console_vga_hose() local
396 if ((io7 = marvel_find_io7(pid))) in marvel_find_console_vga_hose()
397 hose = io7->ports[port].hose; in marvel_find_console_vga_hose()
421 struct io7 *io7; in marvel_specify_io7() local
428 io7 = alloc_io7(pid); in marvel_specify_io7()
429 if (io7) marvel_init_io7(io7); in marvel_specify_io7()
443 struct io7 *io7; in marvel_init_arch() local
456 for (io7 = NULL; NULL != (io7 = marvel_next_io7(io7)); ) in marvel_init_arch()
457 marvel_init_io7(io7); in marvel_init_arch()
908 struct io7 *io7 = ((struct io7_port *)agp->hose->sysdata)->io7; in marvel_agp_configure() local
917 agp_pll = io7->csrs->POx_RST[IO7_AGP_PORT].csr; in marvel_agp_configure()
1021 struct io7 *io7; in marvel_agp_info() local
1030 for (io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; ) { in marvel_agp_info()
1034 if (!io7->ports[IO7_AGP_PORT].enabled) in marvel_agp_info()
1037 h = io7->ports[IO7_AGP_PORT].hose; in marvel_agp_info()