amd-k7-agp.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. /*
  2. * AMD K7 AGPGART routines.
  3. */
  4. #include <linux/module.h>
  5. #include <linux/pci.h>
  6. #include <linux/init.h>
  7. #include <linux/agp_backend.h>
  8. #include <linux/page-flags.h>
  9. #include <linux/mm.h>
  10. #include <linux/slab.h>
  11. #include "agp.h"
  12. #define AMD_MMBASE 0x14
  13. #define AMD_APSIZE 0xac
  14. #define AMD_MODECNTL 0xb0
  15. #define AMD_MODECNTL2 0xb2
  16. #define AMD_GARTENABLE 0x02 /* In mmio region (16-bit register) */
  17. #define AMD_ATTBASE 0x04 /* In mmio region (32-bit register) */
  18. #define AMD_TLBFLUSH 0x0c /* In mmio region (32-bit register) */
  19. #define AMD_CACHEENTRY 0x10 /* In mmio region (32-bit register) */
  20. static struct pci_device_id agp_amdk7_pci_table[];
  21. struct amd_page_map {
  22. unsigned long *real;
  23. unsigned long __iomem *remapped;
  24. };
  25. static struct _amd_irongate_private {
  26. volatile u8 __iomem *registers;
  27. struct amd_page_map **gatt_pages;
  28. int num_tables;
  29. } amd_irongate_private;
  30. static int amd_create_page_map(struct amd_page_map *page_map)
  31. {
  32. int i;
  33. page_map->real = (unsigned long *) __get_free_page(GFP_KERNEL);
  34. if (page_map->real == NULL)
  35. return -ENOMEM;
  36. #ifndef CONFIG_X86
  37. SetPageReserved(virt_to_page(page_map->real));
  38. global_cache_flush();
  39. page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real),
  40. PAGE_SIZE);
  41. if (page_map->remapped == NULL) {
  42. ClearPageReserved(virt_to_page(page_map->real));
  43. free_page((unsigned long) page_map->real);
  44. page_map->real = NULL;
  45. return -ENOMEM;
  46. }
  47. global_cache_flush();
  48. #else
  49. set_memory_uc((unsigned long)page_map->real, 1);
  50. page_map->remapped = page_map->real;
  51. #endif
  52. for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) {
  53. writel(agp_bridge->scratch_page, page_map->remapped+i);
  54. readl(page_map->remapped+i); /* PCI Posting. */
  55. }
  56. return 0;
  57. }
  58. static void amd_free_page_map(struct amd_page_map *page_map)
  59. {
  60. #ifndef CONFIG_X86
  61. iounmap(page_map->remapped);
  62. ClearPageReserved(virt_to_page(page_map->real));
  63. #else
  64. set_memory_wb((unsigned long)page_map->real, 1);
  65. #endif
  66. free_page((unsigned long) page_map->real);
  67. }
  68. static void amd_free_gatt_pages(void)
  69. {
  70. int i;
  71. struct amd_page_map **tables;
  72. struct amd_page_map *entry;
  73. tables = amd_irongate_private.gatt_pages;
  74. for (i = 0; i < amd_irongate_private.num_tables; i++) {
  75. entry = tables[i];
  76. if (entry != NULL) {
  77. if (entry->real != NULL)
  78. amd_free_page_map(entry);
  79. kfree(entry);
  80. }
  81. }
  82. kfree(tables);
  83. amd_irongate_private.gatt_pages = NULL;
  84. }
  85. static int amd_create_gatt_pages(int nr_tables)
  86. {
  87. struct amd_page_map **tables;
  88. struct amd_page_map *entry;
  89. int retval = 0;
  90. int i;
  91. tables = kzalloc((nr_tables + 1) * sizeof(struct amd_page_map *),GFP_KERNEL);
  92. if (tables == NULL)
  93. return -ENOMEM;
  94. for (i = 0; i < nr_tables; i++) {
  95. entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL);
  96. tables[i] = entry;
  97. if (entry == NULL) {
  98. retval = -ENOMEM;
  99. break;
  100. }
  101. retval = amd_create_page_map(entry);
  102. if (retval != 0)
  103. break;
  104. }
  105. amd_irongate_private.num_tables = i;
  106. amd_irongate_private.gatt_pages = tables;
  107. if (retval != 0)
  108. amd_free_gatt_pages();
  109. return retval;
  110. }
  111. /* Since we don't need contiguous memory we just try
  112. * to get the gatt table once
  113. */
  114. #define GET_PAGE_DIR_OFF(addr) (addr >> 22)
  115. #define GET_PAGE_DIR_IDX(addr) (GET_PAGE_DIR_OFF(addr) - \
  116. GET_PAGE_DIR_OFF(agp_bridge->gart_bus_addr))
  117. #define GET_GATT_OFF(addr) ((addr & 0x003ff000) >> 12)
  118. #define GET_GATT(addr) (amd_irongate_private.gatt_pages[\
  119. GET_PAGE_DIR_IDX(addr)]->remapped)
  120. static int amd_create_gatt_table(struct agp_bridge_data *bridge)
  121. {
  122. struct aper_size_info_lvl2 *value;
  123. struct amd_page_map page_dir;
  124. unsigned long __iomem *cur_gatt;
  125. unsigned long addr;
  126. int retval;
  127. u32 temp;
  128. int i;
  129. value = A_SIZE_LVL2(agp_bridge->current_size);
  130. retval = amd_create_page_map(&page_dir);
  131. if (retval != 0)
  132. return retval;
  133. retval = amd_create_gatt_pages(value->num_entries / 1024);
  134. if (retval != 0) {
  135. amd_free_page_map(&page_dir);
  136. return retval;
  137. }
  138. agp_bridge->gatt_table_real = (u32 *)page_dir.real;
  139. agp_bridge->gatt_table = (u32 __iomem *)page_dir.remapped;
  140. agp_bridge->gatt_bus_addr = virt_to_phys(page_dir.real);
  141. /* Get the address for the gart region.
  142. * This is a bus address even on the alpha, b/c its
  143. * used to program the agp master not the cpu
  144. */
  145. pci_read_config_dword(agp_bridge->dev, AGP_APBASE, &temp);
  146. addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
  147. agp_bridge->gart_bus_addr = addr;
  148. /* Calculate the agp offset */
  149. for (i = 0; i < value->num_entries / 1024; i++, addr += 0x00400000) {
  150. writel(virt_to_phys(amd_irongate_private.gatt_pages[i]->real) | 1,
  151. page_dir.remapped+GET_PAGE_DIR_OFF(addr));
  152. readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */
  153. }
  154. for (i = 0; i < value->num_entries; i++) {
  155. addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr;
  156. cur_gatt = GET_GATT(addr);
  157. writel(agp_bridge->scratch_page, cur_gatt+GET_GATT_OFF(addr));
  158. readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */
  159. }
  160. return 0;
  161. }
  162. static int amd_free_gatt_table(struct agp_bridge_data *bridge)
  163. {
  164. struct amd_page_map page_dir;
  165. page_dir.real = (unsigned long *)agp_bridge->gatt_table_real;
  166. page_dir.remapped = (unsigned long __iomem *)agp_bridge->gatt_table;
  167. amd_free_gatt_pages();
  168. amd_free_page_map(&page_dir);
  169. return 0;
  170. }
  171. static int amd_irongate_fetch_size(void)
  172. {
  173. int i;
  174. u32 temp;
  175. struct aper_size_info_lvl2 *values;
  176. pci_read_config_dword(agp_bridge->dev, AMD_APSIZE, &temp);
  177. temp = (temp & 0x0000000e);
  178. values = A_SIZE_LVL2(agp_bridge->driver->aperture_sizes);
  179. for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) {
  180. if (temp == values[i].size_value) {
  181. agp_bridge->previous_size =
  182. agp_bridge->current_size = (void *) (values + i);
  183. agp_bridge->aperture_size_idx = i;
  184. return values[i].size;
  185. }
  186. }
  187. return 0;
  188. }
  189. static int amd_irongate_configure(void)
  190. {
  191. struct aper_size_info_lvl2 *current_size;
  192. u32 temp;
  193. u16 enable_reg;
  194. current_size = A_SIZE_LVL2(agp_bridge->current_size);
  195. if (!amd_irongate_private.registers) {
  196. /* Get the memory mapped registers */
  197. pci_read_config_dword(agp_bridge->dev, AMD_MMBASE, &temp);
  198. temp = (temp & PCI_BASE_ADDRESS_MEM_MASK);
  199. amd_irongate_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096);
  200. if (!amd_irongate_private.registers)
  201. return -ENOMEM;
  202. }
  203. /* Write out the address of the gatt table */
  204. writel(agp_bridge->gatt_bus_addr, amd_irongate_private.registers+AMD_ATTBASE);
  205. readl(amd_irongate_private.registers+AMD_ATTBASE); /* PCI Posting. */
  206. /* Write the Sync register */
  207. pci_write_config_byte(agp_bridge->dev, AMD_MODECNTL, 0x80);
  208. /* Set indexing mode */
  209. pci_write_config_byte(agp_bridge->dev, AMD_MODECNTL2, 0x00);
  210. /* Write the enable register */
  211. enable_reg = readw(amd_irongate_private.registers+AMD_GARTENABLE);
  212. enable_reg = (enable_reg | 0x0004);
  213. writew(enable_reg, amd_irongate_private.registers+AMD_GARTENABLE);
  214. readw(amd_irongate_private.registers+AMD_GARTENABLE); /* PCI Posting. */
  215. /* Write out the size register */
  216. pci_read_config_dword(agp_bridge->dev, AMD_APSIZE, &temp);
  217. temp = (((temp & ~(0x0000000e)) | current_size->size_value) | 1);
  218. pci_write_config_dword(agp_bridge->dev, AMD_APSIZE, temp);
  219. /* Flush the tlb */
  220. writel(1, amd_irongate_private.registers+AMD_TLBFLUSH);
  221. readl(amd_irongate_private.registers+AMD_TLBFLUSH); /* PCI Posting.*/
  222. return 0;
  223. }
  224. static void amd_irongate_cleanup(void)
  225. {
  226. struct aper_size_info_lvl2 *previous_size;
  227. u32 temp;
  228. u16 enable_reg;
  229. previous_size = A_SIZE_LVL2(agp_bridge->previous_size);
  230. enable_reg = readw(amd_irongate_private.registers+AMD_GARTENABLE);
  231. enable_reg = (enable_reg & ~(0x0004));
  232. writew(enable_reg, amd_irongate_private.registers+AMD_GARTENABLE);
  233. readw(amd_irongate_private.registers+AMD_GARTENABLE); /* PCI Posting. */
  234. /* Write back the previous size and disable gart translation */
  235. pci_read_config_dword(agp_bridge->dev, AMD_APSIZE, &temp);
  236. temp = ((temp & ~(0x0000000f)) | previous_size->size_value);
  237. pci_write_config_dword(agp_bridge->dev, AMD_APSIZE, temp);
  238. iounmap((void __iomem *) amd_irongate_private.registers);
  239. }
  240. /*
  241. * This routine could be implemented by taking the addresses
  242. * written to the GATT, and flushing them individually. However
  243. * currently it just flushes the whole table. Which is probably
  244. * more efficent, since agp_memory blocks can be a large number of
  245. * entries.
  246. */
  247. static void amd_irongate_tlbflush(struct agp_memory *temp)
  248. {
  249. writel(1, amd_irongate_private.registers+AMD_TLBFLUSH);
  250. readl(amd_irongate_private.registers+AMD_TLBFLUSH); /* PCI Posting. */
  251. }
  252. static int amd_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
  253. {
  254. int i, j, num_entries;
  255. unsigned long __iomem *cur_gatt;
  256. unsigned long addr;
  257. num_entries = A_SIZE_LVL2(agp_bridge->current_size)->num_entries;
  258. if (type != mem->type ||
  259. agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type))
  260. return -EINVAL;
  261. if ((pg_start + mem->page_count) > num_entries)
  262. return -EINVAL;
  263. j = pg_start;
  264. while (j < (pg_start + mem->page_count)) {
  265. addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr;
  266. cur_gatt = GET_GATT(addr);
  267. if (!PGE_EMPTY(agp_bridge, readl(cur_gatt+GET_GATT_OFF(addr))))
  268. return -EBUSY;
  269. j++;
  270. }
  271. if (!mem->is_flushed) {
  272. global_cache_flush();
  273. mem->is_flushed = true;
  274. }
  275. for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
  276. addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr;
  277. cur_gatt = GET_GATT(addr);
  278. writel(agp_generic_mask_memory(agp_bridge,
  279. page_to_phys(mem->pages[i]),
  280. mem->type),
  281. cur_gatt+GET_GATT_OFF(addr));
  282. readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */
  283. }
  284. amd_irongate_tlbflush(mem);
  285. return 0;
  286. }
  287. static int amd_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
  288. {
  289. int i;
  290. unsigned long __iomem *cur_gatt;
  291. unsigned long addr;
  292. if (type != mem->type ||
  293. agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type))
  294. return -EINVAL;
  295. for (i = pg_start; i < (mem->page_count + pg_start); i++) {
  296. addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr;
  297. cur_gatt = GET_GATT(addr);
  298. writel(agp_bridge->scratch_page, cur_gatt+GET_GATT_OFF(addr));
  299. readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */
  300. }
  301. amd_irongate_tlbflush(mem);
  302. return 0;
  303. }
  304. static const struct aper_size_info_lvl2 amd_irongate_sizes[7] =
  305. {
  306. {2048, 524288, 0x0000000c},
  307. {1024, 262144, 0x0000000a},
  308. {512, 131072, 0x00000008},
  309. {256, 65536, 0x00000006},
  310. {128, 32768, 0x00000004},
  311. {64, 16384, 0x00000002},
  312. {32, 8192, 0x00000000}
  313. };
  314. static const struct gatt_mask amd_irongate_masks[] =
  315. {
  316. {.mask = 1, .type = 0}
  317. };
  318. static const struct agp_bridge_driver amd_irongate_driver = {
  319. .owner = THIS_MODULE,
  320. .aperture_sizes = amd_irongate_sizes,
  321. .size_type = LVL2_APER_SIZE,
  322. .num_aperture_sizes = 7,
  323. .needs_scratch_page = true,
  324. .configure = amd_irongate_configure,
  325. .fetch_size = amd_irongate_fetch_size,
  326. .cleanup = amd_irongate_cleanup,
  327. .tlb_flush = amd_irongate_tlbflush,
  328. .mask_memory = agp_generic_mask_memory,
  329. .masks = amd_irongate_masks,
  330. .agp_enable = agp_generic_enable,
  331. .cache_flush = global_cache_flush,
  332. .create_gatt_table = amd_create_gatt_table,
  333. .free_gatt_table = amd_free_gatt_table,
  334. .insert_memory = amd_insert_memory,
  335. .remove_memory = amd_remove_memory,
  336. .alloc_by_type = agp_generic_alloc_by_type,
  337. .free_by_type = agp_generic_free_by_type,
  338. .agp_alloc_page = agp_generic_alloc_page,
  339. .agp_alloc_pages = agp_generic_alloc_pages,
  340. .agp_destroy_page = agp_generic_destroy_page,
  341. .agp_destroy_pages = agp_generic_destroy_pages,
  342. .agp_type_to_mask_type = agp_generic_type_to_mask_type,
  343. };
  344. static struct agp_device_ids amd_agp_device_ids[] __devinitdata =
  345. {
  346. {
  347. .device_id = PCI_DEVICE_ID_AMD_FE_GATE_7006,
  348. .chipset_name = "Irongate",
  349. },
  350. {
  351. .device_id = PCI_DEVICE_ID_AMD_FE_GATE_700E,
  352. .chipset_name = "761",
  353. },
  354. {
  355. .device_id = PCI_DEVICE_ID_AMD_FE_GATE_700C,
  356. .chipset_name = "760MP",
  357. },
  358. { }, /* dummy final entry, always present */
  359. };
  360. static int __devinit agp_amdk7_probe(struct pci_dev *pdev,
  361. const struct pci_device_id *ent)
  362. {
  363. struct agp_bridge_data *bridge;
  364. u8 cap_ptr;
  365. int j;
  366. cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
  367. if (!cap_ptr)
  368. return -ENODEV;
  369. j = ent - agp_amdk7_pci_table;
  370. dev_info(&pdev->dev, "AMD %s chipset\n",
  371. amd_agp_device_ids[j].chipset_name);
  372. bridge = agp_alloc_bridge();
  373. if (!bridge)
  374. return -ENOMEM;
  375. bridge->driver = &amd_irongate_driver;
  376. bridge->dev_private_data = &amd_irongate_private,
  377. bridge->dev = pdev;
  378. bridge->capndx = cap_ptr;
  379. /* 751 Errata (22564_B-1.PDF)
  380. erratum 20: strobe glitch with Nvidia NV10 GeForce cards.
  381. system controller may experience noise due to strong drive strengths
  382. */
  383. if (agp_bridge->dev->device == PCI_DEVICE_ID_AMD_FE_GATE_7006) {
  384. struct pci_dev *gfxcard=NULL;
  385. cap_ptr = 0;
  386. while (!cap_ptr) {
  387. gfxcard = pci_get_class(PCI_CLASS_DISPLAY_VGA<<8, gfxcard);
  388. if (!gfxcard) {
  389. dev_info(&pdev->dev, "no AGP VGA controller\n");
  390. return -ENODEV;
  391. }
  392. cap_ptr = pci_find_capability(gfxcard, PCI_CAP_ID_AGP);
  393. }
  394. /* With so many variants of NVidia cards, it's simpler just
  395. to blacklist them all, and then whitelist them as needed
  396. (if necessary at all). */
  397. if (gfxcard->vendor == PCI_VENDOR_ID_NVIDIA) {
  398. agp_bridge->flags |= AGP_ERRATA_1X;
  399. dev_info(&pdev->dev, "AMD 751 chipset with NVidia GeForce; forcing 1X due to errata\n");
  400. }
  401. pci_dev_put(gfxcard);
  402. }
  403. /* 761 Errata (23613_F.pdf)
  404. * Revisions B0/B1 were a disaster.
  405. * erratum 44: SYSCLK/AGPCLK skew causes 2X failures -- Force mode to 1X
  406. * erratum 45: Timing problem prevents fast writes -- Disable fast write.
  407. * erratum 46: Setup violation on AGP SBA pins - Disable side band addressing.
  408. * With this lot disabled, we should prevent lockups. */
  409. if (agp_bridge->dev->device == PCI_DEVICE_ID_AMD_FE_GATE_700E) {
  410. if (pdev->revision == 0x10 || pdev->revision == 0x11) {
  411. agp_bridge->flags = AGP_ERRATA_FASTWRITES;
  412. agp_bridge->flags |= AGP_ERRATA_SBA;
  413. agp_bridge->flags |= AGP_ERRATA_1X;
  414. dev_info(&pdev->dev, "AMD 761 chipset with errata; disabling AGP fast writes & SBA and forcing to 1X\n");
  415. }
  416. }
  417. /* Fill in the mode register */
  418. pci_read_config_dword(pdev,
  419. bridge->capndx+PCI_AGP_STATUS,
  420. &bridge->mode);
  421. pci_set_drvdata(pdev, bridge);
  422. return agp_add_bridge(bridge);
  423. }
  424. static void __devexit agp_amdk7_remove(struct pci_dev *pdev)
  425. {
  426. struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
  427. agp_remove_bridge(bridge);
  428. agp_put_bridge(bridge);
  429. }
  430. #ifdef CONFIG_PM
  431. static int agp_amdk7_suspend(struct pci_dev *pdev, pm_message_t state)
  432. {
  433. pci_save_state(pdev);
  434. pci_set_power_state(pdev, pci_choose_state(pdev, state));
  435. return 0;
  436. }
  437. static int agp_amdk7_resume(struct pci_dev *pdev)
  438. {
  439. pci_set_power_state(pdev, PCI_D0);
  440. pci_restore_state(pdev);
  441. return amd_irongate_driver.configure();
  442. }
  443. #endif /* CONFIG_PM */
  444. /* must be the same order as name table above */
  445. static struct pci_device_id agp_amdk7_pci_table[] = {
  446. {
  447. .class = (PCI_CLASS_BRIDGE_HOST << 8),
  448. .class_mask = ~0,
  449. .vendor = PCI_VENDOR_ID_AMD,
  450. .device = PCI_DEVICE_ID_AMD_FE_GATE_7006,
  451. .subvendor = PCI_ANY_ID,
  452. .subdevice = PCI_ANY_ID,
  453. },
  454. {
  455. .class = (PCI_CLASS_BRIDGE_HOST << 8),
  456. .class_mask = ~0,
  457. .vendor = PCI_VENDOR_ID_AMD,
  458. .device = PCI_DEVICE_ID_AMD_FE_GATE_700E,
  459. .subvendor = PCI_ANY_ID,
  460. .subdevice = PCI_ANY_ID,
  461. },
  462. {
  463. .class = (PCI_CLASS_BRIDGE_HOST << 8),
  464. .class_mask = ~0,
  465. .vendor = PCI_VENDOR_ID_AMD,
  466. .device = PCI_DEVICE_ID_AMD_FE_GATE_700C,
  467. .subvendor = PCI_ANY_ID,
  468. .subdevice = PCI_ANY_ID,
  469. },
  470. { }
  471. };
  472. MODULE_DEVICE_TABLE(pci, agp_amdk7_pci_table);
  473. static struct pci_driver agp_amdk7_pci_driver = {
  474. .name = "agpgart-amdk7",
  475. .id_table = agp_amdk7_pci_table,
  476. .probe = agp_amdk7_probe,
  477. .remove = agp_amdk7_remove,
  478. #ifdef CONFIG_PM
  479. .suspend = agp_amdk7_suspend,
  480. .resume = agp_amdk7_resume,
  481. #endif
  482. };
  483. static int __init agp_amdk7_init(void)
  484. {
  485. if (agp_off)
  486. return -EINVAL;
  487. return pci_register_driver(&agp_amdk7_pci_driver);
  488. }
  489. static void __exit agp_amdk7_cleanup(void)
  490. {
  491. pci_unregister_driver(&agp_amdk7_pci_driver);
  492. }
  493. module_init(agp_amdk7_init);
  494. module_exit(agp_amdk7_cleanup);
  495. MODULE_LICENSE("GPL and additional rights");