Lines Matching refs:io7

49 static struct io7 *io7_head = NULL;
93 inline struct io7 *
94 marvel_next_io7(struct io7 *prev) in marvel_next_io7()
99 struct io7 *
102 struct io7 *io7; in marvel_find_io7() local
104 for (io7 = io7_head; io7 && io7->pe != pe; io7 = io7->next) in marvel_find_io7()
107 return io7; in marvel_find_io7()
110 static struct io7 * __init
113 struct io7 *io7; in alloc_io7() local
114 struct io7 *insp; in alloc_io7()
122 io7 = memblock_alloc_or_panic(sizeof(*io7), SMP_CACHE_BYTES); in alloc_io7()
123 io7->pe = pe; in alloc_io7()
124 raw_spin_lock_init(&io7->irq_lock); in alloc_io7()
127 io7->ports[h].io7 = io7; in alloc_io7()
128 io7->ports[h].port = h; in alloc_io7()
129 io7->ports[h].enabled = 0; /* default to disabled */ in alloc_io7()
136 io7_head = io7; in alloc_io7()
137 else if (io7_head->pe > io7->pe) { /* insert at head */ in alloc_io7()
138 io7->next = io7_head; in alloc_io7()
139 io7_head = io7; in alloc_io7()
142 if (insp->pe == io7->pe) { in alloc_io7()
144 io7->pe); in alloc_io7()
149 insp->next->pe > io7->pe) { /* insert here */ in alloc_io7()
150 io7->next = insp->next; in alloc_io7()
151 insp->next = io7; in alloc_io7()
158 " - adding at head of list\n", io7->pe); in alloc_io7()
159 io7->next = io7_head; in alloc_io7()
160 io7_head = io7; in alloc_io7()
164 return io7; in alloc_io7()
168 io7_clear_errors(struct io7 *io7) in io7_clear_errors() argument
179 csrs = IO7_CSRS_KERN(io7->pe, port); in io7_clear_errors()
190 p7csrs = IO7_PORT7_CSRS_KERN(io7->pe); in io7_clear_errors()
202 io7_init_hose(struct io7 *io7, int port) in io7_init_hose() argument
207 struct io7_port *io7_port = &io7->ports[port]; in io7_init_hose()
208 io7_ioport_csrs *csrs = IO7_CSRS_KERN(io7->pe, port); in io7_init_hose()
236 hose->dense_mem_base = IO7_MEM_PHYS(io7->pe, port); in io7_init_hose()
237 hose->dense_io_base = IO7_IO_PHYS(io7->pe, port); in io7_init_hose()
242 hose->config_space_base = (unsigned long)IO7_CONF_KERN(io7->pe, port); in io7_init_hose()
244 hose->io_space->start = (unsigned long)IO7_IO_KERN(io7->pe, port); in io7_init_hose()
246 hose->io_space->name = mk_resource_name(io7->pe, port, "IO"); in io7_init_hose()
249 hose->mem_space->start = (unsigned long)IO7_MEM_KERN(io7->pe, port); in io7_init_hose()
251 hose->mem_space->name = mk_resource_name(io7->pe, port, "MEM"); 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()
379 struct io7 *io7; in marvel_find_console_vga_hose() local
399 if ((io7 = marvel_find_io7(pid))) in marvel_find_console_vga_hose()
400 hose = io7->ports[port].hose; in marvel_find_console_vga_hose()
424 struct io7 *io7; in marvel_specify_io7() local
431 io7 = alloc_io7(pid); in marvel_specify_io7()
432 if (io7) marvel_init_io7(io7); in marvel_specify_io7()
446 struct io7 *io7; in marvel_init_arch() local
459 for (io7 = NULL; NULL != (io7 = marvel_next_io7(io7)); ) in marvel_init_arch()
460 marvel_init_io7(io7); in marvel_init_arch()
911 struct io7 *io7 = ((struct io7_port *)agp->hose->sysdata)->io7; in marvel_agp_configure() local
920 agp_pll = io7->csrs->POx_RST[IO7_AGP_PORT].csr; in marvel_agp_configure()
1024 struct io7 *io7; in marvel_agp_info() local
1033 for (io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; ) { in marvel_agp_info()
1037 if (!io7->ports[IO7_AGP_PORT].enabled) in marvel_agp_info()
1040 h = io7->ports[IO7_AGP_PORT].hose; in marvel_agp_info()