Lines Matching +full:real +full:-
33 unsigned long *real; member
52 page_map->real = (unsigned long *) __get_free_page(GFP_KERNEL); in serverworks_create_page_map()
53 if (page_map->real == NULL) { in serverworks_create_page_map()
54 return -ENOMEM; in serverworks_create_page_map()
57 set_memory_uc((unsigned long)page_map->real, 1); in serverworks_create_page_map()
58 page_map->remapped = page_map->real; in serverworks_create_page_map()
61 writel(agp_bridge->scratch_page, page_map->remapped+i); in serverworks_create_page_map()
69 set_memory_wb((unsigned long)page_map->real, 1); in serverworks_free_page_map()
70 free_page((unsigned long) page_map->real); in serverworks_free_page_map()
83 if (entry->real != NULL) { in serverworks_free_gatt_pages()
102 return -ENOMEM; in serverworks_create_gatt_pages()
107 retval = -ENOMEM; in serverworks_create_gatt_pages()
123 GET_PAGE_DIR_IDX(addr)]->remapped)
130 #define GET_PAGE_DIR_IDX(addr) (GET_PAGE_DIR_OFF(addr) - \
131 GET_PAGE_DIR_OFF(agp_bridge->gart_bus_addr))
146 value = A_SIZE_LVL2(agp_bridge->current_size); in serverworks_create_gatt_table()
158 writel(agp_bridge->scratch_page, serverworks_private.scratch_dir.remapped+i); in serverworks_create_gatt_table()
159 writel(virt_to_phys(serverworks_private.scratch_dir.real) | 1, page_dir.remapped+i); in serverworks_create_gatt_table()
162 retval = serverworks_create_gatt_pages(value->num_entries / 1024); in serverworks_create_gatt_table()
169 agp_bridge->gatt_table_real = (u32 *)page_dir.real; in serverworks_create_gatt_table()
170 agp_bridge->gatt_table = (u32 __iomem *)page_dir.remapped; in serverworks_create_gatt_table()
171 agp_bridge->gatt_bus_addr = virt_to_phys(page_dir.real); in serverworks_create_gatt_table()
178 pci_read_config_dword(agp_bridge->dev,serverworks_private.gart_addr_ofs,&temp); in serverworks_create_gatt_table()
179 agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); in serverworks_create_gatt_table()
182 for (i = 0; i < value->num_entries / 1024; i++) in serverworks_create_gatt_table()
183 writel(virt_to_phys(serverworks_private.gatt_pages[i]->real)|1, page_dir.remapped+i); in serverworks_create_gatt_table()
192 page_dir.real = (unsigned long *)agp_bridge->gatt_table_real; in serverworks_free_gatt_table()
193 page_dir.remapped = (unsigned long __iomem *)agp_bridge->gatt_table; in serverworks_free_gatt_table()
208 values = A_SIZE_LVL2(agp_bridge->driver->aperture_sizes); in serverworks_fetch_size()
209 pci_read_config_dword(agp_bridge->dev,serverworks_private.gart_addr_ofs,&temp); in serverworks_fetch_size()
210 pci_write_config_dword(agp_bridge->dev,serverworks_private.gart_addr_ofs, in serverworks_fetch_size()
212 pci_read_config_dword(agp_bridge->dev,serverworks_private.gart_addr_ofs,&temp2); in serverworks_fetch_size()
213 pci_write_config_dword(agp_bridge->dev,serverworks_private.gart_addr_ofs,temp); in serverworks_fetch_size()
216 for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) { in serverworks_fetch_size()
218 agp_bridge->previous_size = in serverworks_fetch_size()
219 agp_bridge->current_size = (void *) (values + i); in serverworks_fetch_size()
221 agp_bridge->aperture_size_idx = i; in serverworks_fetch_size()
245 dev_err(&serverworks_private.svrwrks_dev->dev, in serverworks_tlbflush()
256 dev_err(&serverworks_private.svrwrks_dev->dev, in serverworks_tlbflush()
270 pci_read_config_dword(agp_bridge->dev, serverworks_private.mm_addr_ofs, &temp); in serverworks_configure()
274 dev_err(&agp_bridge->dev->dev, "can't ioremap(%#x)\n", temp); in serverworks_configure()
275 return -ENOMEM; in serverworks_configure()
281 writel(agp_bridge->gatt_bus_addr, serverworks_private.registers+SVWRKS_GATTBASE); in serverworks_configure()
295 agp_bridge->capndx = pci_find_capability(serverworks_private.svrwrks_dev, PCI_CAP_ID_AGP); in serverworks_configure()
299 agp_bridge->capndx+PCI_AGP_STATUS, &agp_bridge->mode); in serverworks_configure()
301 pci_read_config_byte(agp_bridge->dev, SVWRKS_CACHING, &enable_reg); in serverworks_configure()
303 pci_write_config_byte(agp_bridge->dev, SVWRKS_CACHING, enable_reg); in serverworks_configure()
305 pci_read_config_byte(agp_bridge->dev, SVWRKS_FEATURE, &enable_reg); in serverworks_configure()
307 pci_write_config_byte(agp_bridge->dev,SVWRKS_FEATURE, enable_reg); in serverworks_configure()
324 num_entries = A_SIZE_LVL2(agp_bridge->current_size)->num_entries; in serverworks_insert_memory()
326 if (type != 0 || mem->type != 0) { in serverworks_insert_memory()
327 return -EINVAL; in serverworks_insert_memory()
329 if ((pg_start + mem->page_count) > num_entries) { in serverworks_insert_memory()
330 return -EINVAL; in serverworks_insert_memory()
334 while (j < (pg_start + mem->page_count)) { in serverworks_insert_memory()
335 addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr; in serverworks_insert_memory()
338 return -EBUSY; in serverworks_insert_memory()
342 if (!mem->is_flushed) { in serverworks_insert_memory()
344 mem->is_flushed = true; in serverworks_insert_memory()
347 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in serverworks_insert_memory()
348 addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr; in serverworks_insert_memory()
350 writel(agp_bridge->driver->mask_memory(agp_bridge, in serverworks_insert_memory()
351 page_to_phys(mem->pages[i]), mem->type), in serverworks_insert_memory()
365 if (type != 0 || mem->type != 0) { in serverworks_remove_memory()
366 return -EINVAL; in serverworks_remove_memory()
372 for (i = pg_start; i < (mem->page_count + pg_start); i++) { in serverworks_remove_memory()
373 addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr; in serverworks_remove_memory()
375 writel(agp_bridge->scratch_page, cur_gatt+GET_GATT_OFF(addr)); in serverworks_remove_memory()
403 bridge->capndx + PCI_AGP_STATUS, in serverworks_agp_enable()
414 bridge->capndx + PCI_AGP_COMMAND, in serverworks_agp_enable()
456 switch (pdev->device) { in agp_serverworks_probe()
458 dev_err(&pdev->dev, "ServerWorks CNB20HE is unsupported due to lack of documentation\n"); in agp_serverworks_probe()
459 return -ENODEV; in agp_serverworks_probe()
468 dev_err(&pdev->dev, "unsupported Serverworks chipset " in agp_serverworks_probe()
469 "[%04x/%04x]\n", pdev->vendor, pdev->device); in agp_serverworks_probe()
470 return -ENODEV; in agp_serverworks_probe()
474 bridge_dev = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus), in agp_serverworks_probe()
475 (unsigned int)pdev->bus->number, in agp_serverworks_probe()
478 dev_info(&pdev->dev, "can't find secondary device\n"); in agp_serverworks_probe()
479 return -ENODEV; in agp_serverworks_probe()
489 dev_info(&pdev->dev, "64 bit aperture address, " in agp_serverworks_probe()
491 return -ENODEV; in agp_serverworks_probe()
502 dev_info(&pdev->dev, "64 bit MMIO address, but top " in agp_serverworks_probe()
504 return -ENODEV; in agp_serverworks_probe()
510 return -ENOMEM; in agp_serverworks_probe()
512 bridge->driver = &sworks_driver; in agp_serverworks_probe()
513 bridge->dev_private_data = &serverworks_private; in agp_serverworks_probe()
514 bridge->dev = pci_dev_get(pdev); in agp_serverworks_probe()
524 pci_dev_put(bridge->dev); in agp_serverworks_remove()
546 .name = "agpgart-serverworks",
555 return -EINVAL; in agp_serverworks_init()