Lines Matching refs:bridge
226 static void uninorth_agp_enable(struct agp_bridge_data *bridge, u32 mode) in uninorth_agp_enable() argument
231 pci_read_config_dword(bridge->dev, in uninorth_agp_enable()
232 bridge->capndx + PCI_AGP_STATUS, in uninorth_agp_enable()
235 command = agp_collect_device_status(bridge, mode, status); in uninorth_agp_enable()
260 pci_write_config_dword(bridge->dev, in uninorth_agp_enable()
261 bridge->capndx + PCI_AGP_COMMAND, in uninorth_agp_enable()
263 pci_read_config_dword(bridge->dev, in uninorth_agp_enable()
264 bridge->capndx + PCI_AGP_COMMAND, in uninorth_agp_enable()
268 dev_err(&bridge->dev->dev, "can't write UniNorth AGP " in uninorth_agp_enable()
290 struct agp_bridge_data *bridge; in agp_uninorth_suspend() local
295 bridge = agp_find_bridge(pdev); in agp_uninorth_suspend()
296 if (bridge == NULL) in agp_uninorth_suspend()
300 if (bridge->dev_private_data) in agp_uninorth_suspend()
331 bridge->dev_private_data = (void *)(long)cmd; in agp_uninorth_suspend()
345 struct agp_bridge_data *bridge; in agp_uninorth_resume() local
348 bridge = agp_find_bridge(pdev); in agp_uninorth_resume()
349 if (bridge == NULL) in agp_uninorth_resume()
352 command = (long)bridge->dev_private_data; in agp_uninorth_resume()
353 bridge->dev_private_data = NULL; in agp_uninorth_resume()
357 uninorth_agp_enable(bridge, command); in agp_uninorth_resume()
367 static int uninorth_create_gatt_table(struct agp_bridge_data *bridge) in uninorth_create_gatt_table() argument
379 if (bridge->driver->size_type == LVL2_APER_SIZE) in uninorth_create_gatt_table()
383 i = bridge->aperture_size_idx; in uninorth_create_gatt_table()
384 temp = bridge->current_size; in uninorth_create_gatt_table()
396 bridge->current_size = A_IDX32(bridge); in uninorth_create_gatt_table()
398 bridge->aperture_size_idx = i; in uninorth_create_gatt_table()
400 } while (!table && (i < bridge->driver->num_aperture_sizes)); in uninorth_create_gatt_table()
417 bridge->gatt_table_real = (u32 *) table; in uninorth_create_gatt_table()
421 bridge->gatt_table = vmap(uninorth_priv.pages_arr, (1 << page_order), 0, PAGE_KERNEL_NCG); in uninorth_create_gatt_table()
423 if (bridge->gatt_table == NULL) in uninorth_create_gatt_table()
426 bridge->gatt_bus_addr = virt_to_phys(table); in uninorth_create_gatt_table()
434 bridge->gatt_table[i] = scratch_value; in uninorth_create_gatt_table()
445 static int uninorth_free_gatt_table(struct agp_bridge_data *bridge) in uninorth_free_gatt_table() argument
452 temp = bridge->current_size; in uninorth_free_gatt_table()
460 vunmap(bridge->gatt_table); in uninorth_free_gatt_table()
462 table = (char *) bridge->gatt_table_real; in uninorth_free_gatt_table()
468 free_pages((unsigned long) bridge->gatt_table_real, page_order); in uninorth_free_gatt_table()
602 struct agp_bridge_data *bridge; in agp_uninorth_probe() local
649 bridge = agp_alloc_bridge(); in agp_uninorth_probe()
650 if (!bridge) in agp_uninorth_probe()
654 bridge->driver = &u3_agp_driver; in agp_uninorth_probe()
656 bridge->driver = &uninorth_agp_driver; in agp_uninorth_probe()
658 bridge->dev = pdev; in agp_uninorth_probe()
659 bridge->capndx = cap_ptr; in agp_uninorth_probe()
660 bridge->flags = AGP_ERRATA_FASTWRITES; in agp_uninorth_probe()
663 pci_read_config_dword(pdev, cap_ptr+PCI_AGP_STATUS, &bridge->mode); in agp_uninorth_probe()
665 pci_set_drvdata(pdev, bridge); in agp_uninorth_probe()
666 return agp_add_bridge(bridge); in agp_uninorth_probe()
671 struct agp_bridge_data *bridge = pci_get_drvdata(pdev); in agp_uninorth_remove() local
678 agp_remove_bridge(bridge); in agp_uninorth_remove()
679 agp_put_bridge(bridge); in agp_uninorth_remove()