Commit 63098c73 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[AGPGART] Make alpha AGP work again.

From Jeff Wiedemeier and Richard Henderson
parent 459bf5a9
...@@ -1075,7 +1075,6 @@ marvel_agp_info(void) ...@@ -1075,7 +1075,6 @@ marvel_agp_info(void)
/* /*
* Fill it in. * Fill it in.
*/ */
agp->type = ALPHA_CORE_AGP;
agp->hose = hose; agp->hose = hose;
agp->private = NULL; agp->private = NULL;
agp->ops = &marvel_agp_ops; agp->ops = &marvel_agp_ops;
......
...@@ -763,7 +763,6 @@ titan_agp_info(void) ...@@ -763,7 +763,6 @@ titan_agp_info(void)
/* /*
* Fill it in. * Fill it in.
*/ */
agp->type = ALPHA_CORE_AGP;
agp->hose = hose; agp->hose = hose;
agp->private = port; agp->private = port;
agp->ops = &titan_agp_ops; agp->ops = &titan_agp_ops;
......
...@@ -117,17 +117,18 @@ static int alpha_core_agp_remove_memory(struct agp_memory *mem, off_t pg_start, ...@@ -117,17 +117,18 @@ static int alpha_core_agp_remove_memory(struct agp_memory *mem, off_t pg_start,
struct agp_bridge_driver alpha_core_agp_driver = { struct agp_bridge_driver alpha_core_agp_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.aperture_sizes = aper_size, .aperture_sizes = alpha_core_agp_sizes,
.current_size = aper_size, /* only one entry */
.size_type = FIXED_APER_SIZE,
.num_aperture_sizes = 1, .num_aperture_sizes = 1,
.configure = alpha_core_agp_configure, .size_type = FIXED_APER_SIZE,
.cant_use_aperture = 1,
.masks = NULL,
.fetch_size = alpha_core_agp_fetch_size, .fetch_size = alpha_core_agp_fetch_size,
.configure = alpha_core_agp_configure,
.agp_enable = alpha_core_agp_enable,
.cleanup = alpha_core_agp_cleanup, .cleanup = alpha_core_agp_cleanup,
.tlb_flush = alpha_core_agp_tlbflush, .tlb_flush = alpha_core_agp_tlbflush,
.mask_memory = agp_generic_mask_memory, .mask_memory = agp_generic_mask_memory,
.masks = NULL,
.agp_enable = alpha_core_agp_enable,
.cache_flush = global_cache_flush, .cache_flush = global_cache_flush,
.create_gatt_table = alpha_core_agp_nop, .create_gatt_table = alpha_core_agp_nop,
.free_gatt_table = alpha_core_agp_nop, .free_gatt_table = alpha_core_agp_nop,
...@@ -137,9 +138,6 @@ struct agp_bridge_driver alpha_core_agp_driver = { ...@@ -137,9 +138,6 @@ struct agp_bridge_driver alpha_core_agp_driver = {
.free_by_type = agp_generic_free_by_type, .free_by_type = agp_generic_free_by_type,
.agp_alloc_page = agp_generic_alloc_page, .agp_alloc_page = agp_generic_alloc_page,
.agp_destroy_page = agp_generic_destroy_page, .agp_destroy_page = agp_generic_destroy_page,
.mode = agp->capability.lw,
.cant_use_aperture = 1,
.vm_ops = &alpha_core_agp_vm_ops,
}; };
struct agp_bridge_data *alpha_bridge; struct agp_bridge_data *alpha_bridge;
...@@ -160,11 +158,9 @@ alpha_core_agp_setup(void) ...@@ -160,11 +158,9 @@ alpha_core_agp_setup(void)
* Build the aperture size descriptor * Build the aperture size descriptor
*/ */
aper_size = alpha_core_agp_sizes; aper_size = alpha_core_agp_sizes;
if (!aper_size)
return -ENOMEM;
aper_size->size = agp->aperture.size / (1024 * 1024); aper_size->size = agp->aperture.size / (1024 * 1024);
aper_size->num_entries = agp->aperture.size / PAGE_SIZE; aper_size->num_entries = agp->aperture.size / PAGE_SIZE;
aper_size->page_order = ffs(aper_size->num_entries / 1024) - 1; aper_size->page_order = __ffs(aper_size->num_entries / 1024);
/* /*
* Build a fake pci_dev struct * Build a fake pci_dev struct
...@@ -181,8 +177,11 @@ alpha_core_agp_setup(void) ...@@ -181,8 +177,11 @@ alpha_core_agp_setup(void)
goto fail; goto fail;
alpha_bridge->driver = &alpha_core_agp_driver; alpha_bridge->driver = &alpha_core_agp_driver;
alpha_bridge->vm_ops = &alpha_core_agp_vm_ops;
alpha_bridge->current_size = aper_size; /* only 1 size */
alpha_bridge->dev_private_data = agp; alpha_bridge->dev_private_data = agp;
alpha_bridge->dev = pdev; alpha_bridge->dev = pdev;
alpha_bridge->mode = agp->capability.lw;
printk(KERN_INFO "Detected AGP on hose %d\n", agp->hose->index); printk(KERN_INFO "Detected AGP on hose %d\n", agp->hose->index);
return agp_add_bridge(alpha_bridge); return agp_add_bridge(alpha_bridge);
......
...@@ -17,7 +17,6 @@ typedef union _alpha_agp_mode { ...@@ -17,7 +17,6 @@ typedef union _alpha_agp_mode {
} alpha_agp_mode; } alpha_agp_mode;
typedef struct _alpha_agp_info { typedef struct _alpha_agp_info {
enum chipset_type type;
struct pci_controller *hose; struct pci_controller *hose;
struct { struct {
dma_addr_t bus_base; dma_addr_t bus_base;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment