amd/agesa/family12/northbridge.c: Indent (tab) fix
Trivial; Use tab over space for indent. Change-Id: Iba0e006197a020157b11746dd4999d87a8ca8d97 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/8015 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
parent
f4ef77e844
commit
6d28b91d38
|
@ -67,45 +67,40 @@ static void get_fx_devs(void)
|
|||
if (__f0_dev[i] != NULL && __f1_dev[i] != NULL)
|
||||
fx_devs = i+1;
|
||||
}
|
||||
if (__f1_dev[0] == NULL || __f0_dev[0] == NULL || fx_devs == 0) {
|
||||
die("Cannot find 0:0x18.[0|1]\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (__f1_dev[0] == NULL || __f0_dev[0] == NULL || fx_devs == 0)
|
||||
die("Cannot find 0:0x18.[0|1]\n");
|
||||
}
|
||||
|
||||
static u32 f1_read_config32(unsigned reg)
|
||||
{
|
||||
if (fx_devs == 0)
|
||||
get_fx_devs();
|
||||
|
||||
return pci_read_config32(__f1_dev[0], reg);
|
||||
}
|
||||
|
||||
|
||||
static void f1_write_config32(unsigned reg, u32 value)
|
||||
{
|
||||
int i;
|
||||
if (fx_devs == 0)
|
||||
get_fx_devs();
|
||||
for(i = 0; i < fx_devs; i++) {
|
||||
device_t dev;
|
||||
dev = __f1_dev[i];
|
||||
device_t dev = __f1_dev[i];
|
||||
if (dev && dev->enabled) {
|
||||
pci_write_config32(dev, reg, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static u32 amdfam12_nodeid(device_t dev)
|
||||
{
|
||||
printk(BIOS_DEBUG, "Fam12h - northbridge.c - %s\n",__func__);
|
||||
return (dev->path.pci.devfn >> 3) - CONFIG_CDB;
|
||||
}
|
||||
|
||||
|
||||
#include "amdfam12_conf.c"
|
||||
|
||||
|
||||
static void northbridge_init(device_t dev)
|
||||
{
|
||||
printk(BIOS_DEBUG, "Northbridge init\n");
|
||||
|
@ -135,8 +130,7 @@ static int reg_useable(unsigned reg, device_t goal_dev, unsigned goal_nodeid,
|
|||
printk(BIOS_DEBUG, "\nFam12h - northbridge.c - %s - Start.\n",__func__);
|
||||
res = 0;
|
||||
for(nodeid = 0; !res && (nodeid < fx_devs); nodeid++) {
|
||||
device_t dev;
|
||||
dev = __f0_dev[nodeid];
|
||||
device_t dev = __f0_dev[nodeid];
|
||||
if (!dev)
|
||||
continue;
|
||||
for(link = 0; !res && (link < 8); link++) {
|
||||
|
@ -209,8 +203,8 @@ static struct resource *amdfam12_find_mempair(device_t dev, u32 nodeid, u32 link
|
|||
// same link can have multi range
|
||||
u32 index = get_mmio_addr_index(nodeid, link);
|
||||
reg = 0x110+ (index<<24) + (6<<20); // index could be 0, 63
|
||||
|
||||
}
|
||||
|
||||
resource = new_resource(dev, IOINDEX(0x1000 + reg, link));
|
||||
return resource;
|
||||
}
|
||||
|
@ -340,8 +334,7 @@ static void read_resources(device_t dev)
|
|||
}
|
||||
|
||||
|
||||
static void set_resource(device_t dev, struct resource *resource,
|
||||
u32 nodeid)
|
||||
static void set_resource(device_t dev, struct resource *resource, u32 nodeid)
|
||||
{
|
||||
resource_t rbase, rend;
|
||||
unsigned reg, link_num;
|
||||
|
@ -381,11 +374,10 @@ static void set_resource(device_t dev, struct resource *resource,
|
|||
set_io_addr_reg(dev, nodeid, link_num, reg, rbase>>8, rend>>8);
|
||||
}
|
||||
else if (resource->flags & IORESOURCE_MEM) {
|
||||
set_mmio_addr_reg(nodeid, link_num, reg, (resource->index >>24), rbase>>8, rend>>8, 1) ;// [39:8]
|
||||
set_mmio_addr_reg(nodeid, link_num, reg, (resource->index >>24), rbase>>8, rend>>8, 1); // [39:8]
|
||||
}
|
||||
resource->flags |= IORESOURCE_STORED;
|
||||
snprintf(buf, sizeof (buf), " <node %x link %x>",
|
||||
nodeid, link_num);
|
||||
snprintf(buf, sizeof (buf), " <node %x link %x>", nodeid, link_num);
|
||||
report_resource_stored(dev, resource, buf);
|
||||
printk(BIOS_DEBUG, "Fam12h - northbridge.c - %s - End.\n",__func__);
|
||||
}
|
||||
|
@ -397,9 +389,9 @@ extern device_t vga_pri; // the primary vga device, defined in device.c
|
|||
|
||||
static void create_vga_resource(device_t dev, unsigned nodeid)
|
||||
{
|
||||
struct bus *link;
|
||||
struct bus *link;
|
||||
|
||||
printk(BIOS_DEBUG, "\nFam12h - northbridge.c - %s - Start.\n",__func__);
|
||||
printk(BIOS_DEBUG, "\nFam12h - northbridge.c - %s - Start.\n",__func__);
|
||||
|
||||
/* find out which link the VGA card is connected,
|
||||
* we only deal with the 'first' vga card */
|
||||
|
@ -410,10 +402,9 @@ static void create_vga_resource(device_t dev, unsigned nodeid)
|
|||
link->secondary,link->subordinate);
|
||||
/* We need to make sure the vga_pri is under the link */
|
||||
if((vga_pri->bus->secondary >= link->secondary ) &&
|
||||
(vga_pri->bus->secondary <= link->subordinate )
|
||||
)
|
||||
(vga_pri->bus->secondary <= link->subordinate ))
|
||||
#endif
|
||||
break;
|
||||
break; // XXX this break looks questionable
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -446,10 +437,9 @@ static void set_resources(device_t dev)
|
|||
}
|
||||
|
||||
for(bus = dev->link_list; bus; bus = bus->next) {
|
||||
if (bus->children) {
|
||||
if (bus->children)
|
||||
assign_resources(bus);
|
||||
}
|
||||
}
|
||||
printk(BIOS_DEBUG, "Fam12h - northbridge.c - %s - End.\n",__func__);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue