remove trailing whitespace
[coreboot.git] / src / drivers / ati / ragexl / xlinit.c
index 8b0223983396d24c63dfdaf6fa72d8de92d4d344..747b343cc880587d44ccd120b6ae9b7d547c41d0 100644 (file)
 #include <device/pci_ids.h>
 #include <device/pci_ops.h>
 
+// FIXME BTEXT console within coreboot has been obsoleted
+// and will go away. The BTEXT code in this file should be
+// fixed to export a framebuffer console through the coreboot
+// table (and possibly make it available for bootsplash use)
+// Hence do only remove this if you fix the code.
+#define CONFIG_CONSOLE_BTEXT 0
+
 #if CONFIG_CONSOLE_BTEXT==1
 
 #define PLL_CRTC_DECODE 0
@@ -520,9 +527,9 @@ static void ati_ragexl_init(device_t dev)
 #define USE_AUX_REG 1
 
 
-       res = &dev->resource[0];
+       res = dev->resource_list;
        if(res->flags & IORESOURCE_IO) {
-               res = &dev->resource[1];
+               res = res->next;
        }
 
 #if CONFIG_CONSOLE_BTEXT==1
@@ -532,7 +539,9 @@ static void ati_ragexl_init(device_t dev)
 #if USE_AUX_REG==0
         info->ati_regbase = res->base+0x7ff000+0xc00;
 #else
-        res = &dev->resource[2];
+       /* Fix this to look for the correct index. */
+       //if (dev->resource_list && dev->resource_list->next)
+        res = dev->resource_list->next->next;
         if(res->flags & IORESOURCE_MEM) {
                 info->ati_regbase = res->base+0x400; //using auxiliary register
         }