diff -Nur linux-2.4.21.org/drivers/char/agp/agp.h linux-2.4.21/drivers/char/agp/agp.h --- linux-2.4.21.org/drivers/char/agp/agp.h 2003-06-13 23:51:32.000000000 +0900 +++ linux-2.4.21/drivers/char/agp/agp.h 2003-07-21 11:44:30.000000000 +0900 @@ -199,6 +199,9 @@ #ifndef PCI_DEVICE_ID_INTEL_850_0 #define PCI_DEVICE_ID_INTEL_850_0 0x2530 #endif +#ifndef PCI_DEVICE_ID_INTEL_855PM_0 +#define PCI_DEVICE_ID_INTEL_855PM_0 0x3340 +#endif #ifndef PCI_DEVICE_ID_INTEL_860_0 #define PCI_DEVICE_ID_INTEL_860_0 0x2531 #endif @@ -319,6 +322,10 @@ #define INTEL_I850_MCHCFG 0x50 #define INTEL_I850_ERRSTS 0xc8 +/* intel i855pm registers */ +#define INTEL_I855PM_MCHCFG 0x50 +#define INTEL_I855PM_ERRSTS 0xc8 + /* intel i860 registers */ #define INTEL_I860_MCHCFG 0x50 #define INTEL_I860_ERRSTS 0xc8 diff -Nur linux-2.4.21.org/drivers/char/agp/agpgart_be.c linux-2.4.21/drivers/char/agp/agpgart_be.c --- linux-2.4.21.org/drivers/char/agp/agpgart_be.c 2003-06-13 23:51:32.000000000 +0900 +++ linux-2.4.21/drivers/char/agp/agpgart_be.c 2003-07-21 11:44:40.000000000 +0900 @@ -381,7 +381,7 @@ /* * Driver routines - start * Currently this module supports the following chipsets: - * i810, i815, 440lx, 440bx, 440gx, i830, i840, i845, i850, i860, via vp3, + * i810, i815, 440lx, 440bx, 440gx, i830, i840, i845, i850, i855pm, i860, via vp3, * via mvp3, via kx133, via kt133, amd irongate, amd 761, amd 762, ALi M1541, * and generic support for the SiS chipsets. */ @@ -1738,6 +1738,38 @@ return 0; } +static int intel_855pm_configure(void) +{ + u32 temp; + u16 temp2; + aper_size_info_8 *current_size; + + current_size = A_SIZE_8(agp_bridge.current_size); + + /* aperture size */ + pci_write_config_byte(agp_bridge.dev, INTEL_APSIZE, + current_size->size_value); + + /* address to map to */ + pci_read_config_dword(agp_bridge.dev, INTEL_APBASE, &temp); + agp_bridge.gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); + + /* attbase - aperture base */ + pci_write_config_dword(agp_bridge.dev, INTEL_ATTBASE, + agp_bridge.gatt_bus_addr); + + /* agpctrl */ + pci_write_config_dword(agp_bridge.dev, INTEL_AGPCTRL, 0x0000); + + /* mcgcfg */ + pci_read_config_word(agp_bridge.dev, INTEL_I855PM_MCHCFG, &temp2); + pci_write_config_word(agp_bridge.dev, INTEL_I855PM_MCHCFG, + temp2 | (1 << 9)); + /* clear any possible AGP-related error conditions */ + pci_write_config_word(agp_bridge.dev, INTEL_I855PM_ERRSTS, 0xf700); + return 0; +} + static int intel_860_configure(void) { u32 temp; @@ -2048,6 +2080,38 @@ (void) pdev; /* unused */ } +static int __init intel_855pm_setup (struct pci_dev *pdev) +{ + agp_bridge.masks = intel_generic_masks; + agp_bridge.aperture_sizes = (void *) intel_8xx_sizes; + agp_bridge.size_type = U8_APER_SIZE; + agp_bridge.num_aperture_sizes = 7; + agp_bridge.dev_private_data = NULL; + agp_bridge.needs_scratch_page = FALSE; + agp_bridge.configure = intel_855pm_configure; + agp_bridge.fetch_size = intel_8xx_fetch_size; + agp_bridge.cleanup = intel_8xx_cleanup; + agp_bridge.tlb_flush = intel_8xx_tlbflush; + agp_bridge.mask_memory = intel_mask_memory; + agp_bridge.agp_enable = agp_generic_agp_enable; + agp_bridge.cache_flush = global_cache_flush; + agp_bridge.create_gatt_table = agp_generic_create_gatt_table; + agp_bridge.free_gatt_table = agp_generic_free_gatt_table; + agp_bridge.insert_memory = agp_generic_insert_memory; + agp_bridge.remove_memory = agp_generic_remove_memory; + agp_bridge.alloc_by_type = agp_generic_alloc_by_type; + agp_bridge.free_by_type = agp_generic_free_by_type; + agp_bridge.agp_alloc_page = agp_generic_alloc_page; + agp_bridge.agp_destroy_page = agp_generic_destroy_page; + agp_bridge.suspend = agp_generic_suspend; + agp_bridge.resume = agp_generic_resume; + agp_bridge.cant_use_aperture = 0; + + return 0; + + (void) pdev; /* unused */ +} + static int __init intel_860_setup (struct pci_dev *pdev) { agp_bridge.masks = intel_generic_masks; @@ -4543,6 +4607,12 @@ "Intel", "i850", intel_850_setup }, + { PCI_DEVICE_ID_INTEL_855PM_0, + PCI_VENDOR_ID_INTEL, + INTEL_I855PM, + "Intel", + "i855pm", + intel_855pm_setup }, { PCI_DEVICE_ID_INTEL_860_0, PCI_VENDOR_ID_INTEL, INTEL_I860, diff -Nur linux-2.4.21.org/include/linux/agp_backend.h linux-2.4.21/include/linux/agp_backend.h --- linux-2.4.21.org/include/linux/agp_backend.h 2003-06-13 23:51:38.000000000 +0900 +++ linux-2.4.21/include/linux/agp_backend.h 2003-07-21 11:45:36.000000000 +0900 @@ -52,6 +52,7 @@ INTEL_I840, INTEL_I845, INTEL_I850, + INTEL_I855PM, INTEL_I860, VIA_GENERIC, VIA_VP3,