From c25cc11ae32e10a7d0c9f04c29bfb7eca4d9c210 Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Fri, 21 May 2010 14:33:48 +0000 Subject: Use lists instead of arrays for resources in devices to reduce memory usage. Signed-off-by: Myles Watson Acked-by: Patrick Georgi git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5576 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/drivers/ati/ragexl/xlinit.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/ati/ragexl/xlinit.c b/src/drivers/ati/ragexl/xlinit.c index 8b02239833..bcbce6c9b6 100644 --- a/src/drivers/ati/ragexl/xlinit.c +++ b/src/drivers/ati/ragexl/xlinit.c @@ -520,9 +520,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 +532,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 } -- cgit v1.2.3