Lines Matching refs:io7
48 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(sizeof(*io7), SMP_CACHE_BYTES); in alloc_io7()
123 if (!io7) in alloc_io7()
125 sizeof(*io7)); in alloc_io7()
126 io7->pe = pe; in alloc_io7()
127 raw_spin_lock_init(&io7->irq_lock); in alloc_io7()
130 io7->ports[h].io7 = io7; in alloc_io7()
131 io7->ports[h].port = h; in alloc_io7()
132 io7->ports[h].enabled = 0; /* default to disabled */ in alloc_io7()
139 io7_head = io7; in alloc_io7()
140 else if (io7_head->pe > io7->pe) { /* insert at head */ in alloc_io7()
141 io7->next = io7_head; in alloc_io7()
142 io7_head = io7; in alloc_io7()
145 if (insp->pe == io7->pe) { in alloc_io7()
147 io7->pe); in alloc_io7()
152 insp->next->pe > io7->pe) { /* insert here */ in alloc_io7()
153 io7->next = insp->next; in alloc_io7()
154 insp->next = io7; in alloc_io7()
161 " - adding at head of list\n", io7->pe); in alloc_io7()
162 io7->next = io7_head; in alloc_io7()
163 io7_head = io7; in alloc_io7()
167 return io7; in alloc_io7()
171 io7_clear_errors(struct io7 *io7) in io7_clear_errors() argument
182 csrs = IO7_CSRS_KERN(io7->pe, port); in io7_clear_errors()
193 p7csrs = IO7_PORT7_CSRS_KERN(io7->pe); in io7_clear_errors()
205 io7_init_hose(struct io7 *io7, int port) in io7_init_hose() argument
210 struct io7_port *io7_port = &io7->ports[port]; in io7_init_hose()
211 io7_ioport_csrs *csrs = IO7_CSRS_KERN(io7->pe, port); in io7_init_hose()
239 hose->dense_mem_base = IO7_MEM_PHYS(io7->pe, port); in io7_init_hose()
240 hose->dense_io_base = IO7_IO_PHYS(io7->pe, port); in io7_init_hose()
245 hose->config_space_base = (unsigned long)IO7_CONF_KERN(io7->pe, port); in io7_init_hose()
247 hose->io_space->start = (unsigned long)IO7_IO_KERN(io7->pe, port); in io7_init_hose()
249 hose->io_space->name = mk_resource_name(io7->pe, port, "IO"); in io7_init_hose()
252 hose->mem_space->start = (unsigned long)IO7_MEM_KERN(io7->pe, port); in io7_init_hose()
254 hose->mem_space->name = mk_resource_name(io7->pe, port, "MEM"); in io7_init_hose()
335 marvel_init_io7(struct io7 *io7) in marvel_init_io7() argument
339 printk("Initializing IO7 at PID %d\n", io7->pe); in marvel_init_io7()
344 io7->csrs = IO7_PORT7_CSRS_KERN(io7->pe); in marvel_init_io7()
350 io7_ioport_csrs *csrs = IO7_CSRS_KERN(io7->pe, i); in marvel_init_io7()
352 io7->ports[i].enabled = 1; in marvel_init_io7()
353 io7_init_hose(io7, i); in marvel_init_io7()
382 struct io7 *io7; in marvel_find_console_vga_hose() local
402 if ((io7 = marvel_find_io7(pid))) in marvel_find_console_vga_hose()
403 hose = io7->ports[port].hose; in marvel_find_console_vga_hose()
427 struct io7 *io7; in marvel_specify_io7() local
434 io7 = alloc_io7(pid); in marvel_specify_io7()
435 if (io7) marvel_init_io7(io7); in marvel_specify_io7()
449 struct io7 *io7; in marvel_init_arch() local
462 for (io7 = NULL; NULL != (io7 = marvel_next_io7(io7)); ) in marvel_init_arch()
463 marvel_init_io7(io7); in marvel_init_arch()
914 struct io7 *io7 = ((struct io7_port *)agp->hose->sysdata)->io7; in marvel_agp_configure() local
923 agp_pll = io7->csrs->POx_RST[IO7_AGP_PORT].csr; in marvel_agp_configure()
1027 struct io7 *io7; in marvel_agp_info() local
1036 for (io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; ) { in marvel_agp_info()
1040 if (!io7->ports[IO7_AGP_PORT].enabled) in marvel_agp_info()
1043 h = io7->ports[IO7_AGP_PORT].hose; in marvel_agp_info()