U3 G5 AGP support patch (v4)
    Christoph Hellwig 
    hch at lst.de
       
    Mon Jan 10 03:06:14 EST 2005
    
    
  
+static struct device_node* uninorth_node __pmacdata;
+static u32 __iomem * uninorth_base __pmacdata;
static struct device_node *uninorth_node __pmacdata;
static u32 __iomem *uninorth_base __pmacdata;
+	if(uninorth_rev == 0x21) {
	if (uninorth_rev == 0x21) {
+	if((uninorth_rev >= 0x30) && (uninorth_rev <= 0x33)) {
	if ((uninorth_rev >= 0x30) && (uninorth_rev <= 0x33)) {
+	if (agp_bridge->dev->device == PCI_DEVICE_ID_APPLE_U3_AGP) {
+			/* This is an AGP V3 */
+			agp_device_command(command, TRUE);
+	} else {
+			/* AGP V2 */
+			agp_device_command(command, FALSE);
+	}
double-indentation, also please use 1/0 instead of TRUE/FALSE.
+static struct aper_size_info_32 u3_sizes[8] =
+{
+/*
+ * Not sure that uninorth3 supports that high aperture sizes but it
+ * would strange if it did not :)
+ */
comment before the struct declearation, please, aka
/*
 * Not sure that uninorth3 supports that high aperture sizes but it
 * would strange if it did not :)
 */
static struct aper_size_info_32 u3_sizes[8] = {
+	uninorth_node = of_find_node_by_name(NULL, "uni-n");
+	/* Locate G5 u3 */
+	if (uninorth_node == NULL) {
+		uninorth_node = of_find_node_by_name(NULL, "u3");
+	}
	/* Locate G5 u3 */
	uninorth_node = of_find_node_by_name(NULL, "uni-n");
	if (!uninorth_node)
		uninorth_node = of_find_node_by_name(NULL, "u3");
+	/*
+	 * Set specific functions & values for agp3 controller.
+	 */
+	if (pdev->device == PCI_DEVICE_ID_APPLE_U3_AGP) {
+		uninorth_agp_driver.insert_memory  = uninorth3_insert_memory;
+		uninorth_agp_driver.aperture_sizes = (void *)u3_sizes;
+		uninorth_agp_driver.num_aperture_sizes = 8;
Please delcare separate driver instance instead of overriding.
And asm-ppc64 is still missing an agp.h, no?
    
    
More information about the Linuxppc-dev
mailing list