Exemple #1
0
static void amdfam12_link_read_bases(device_t dev, u32 nodeid, u32 link)
{
    struct resource *resource;

    printk(BIOS_DEBUG, "\nFam12h - northbridge.c - amdfam12_link_read_bases - Start.\n");
    /* Initialize the io space constraints on the current bus */
    resource = amdfam12_find_iopair(dev, nodeid, link);
    if (resource) {
        u32 align;
#if CONFIG_EXT_CONF_SUPPORT == 1
        if((resource->index & 0x1fff) == 0x1110) { // ext
            align = 8;
        }
        else
#endif
            align = log2(HT_IO_HOST_ALIGN);
        resource->base  = 0;
        resource->size  = 0;
        resource->align = align;
        resource->gran  = align;
        resource->limit = 0xffffUL;
        resource->flags = IORESOURCE_IO | IORESOURCE_BRIDGE;
    }

    /* Initialize the prefetchable memory constraints on the current bus */
    resource = amdfam12_find_mempair(dev, nodeid, link);
    if (resource) {
        resource->base = 0;
        resource->size = 0;
        resource->align = log2(HT_MEM_HOST_ALIGN);
        resource->gran = log2(HT_MEM_HOST_ALIGN);
        resource->limit = 0xffffffffffULL;
        resource->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
        resource->flags |= IORESOURCE_BRIDGE;

#if CONFIG_EXT_CONF_SUPPORT == 1
        if((resource->index & 0x1fff) == 0x1110) { // ext
            normalize_resource(resource);
        }
#endif

    }

    /* Initialize the memory constraints on the current bus */
    resource = amdfam12_find_mempair(dev, nodeid, link);
    if (resource) {
        resource->base = 0;
        resource->size = 0;
        resource->align = log2(HT_MEM_HOST_ALIGN);
        resource->gran = log2(HT_MEM_HOST_ALIGN);
        resource->limit = 0xffffffffffULL;
        resource->flags = IORESOURCE_MEM | IORESOURCE_BRIDGE;
#if CONFIG_EXT_CONF_SUPPORT == 1
        if((resource->index & 0x1fff) == 0x1110) { // ext
            normalize_resource(resource);
        }
#endif
    }
    printk(BIOS_DEBUG, "Fam12h - northbridge.c - amdfam12_link_read_bases - End.\n");
}
Exemple #2
0
static void amdfam12_link_read_bases(device_t dev, u32 nodeid, u32 link)
{
	struct resource *resource;

	printk(BIOS_DEBUG, "\nFam12h - northbridge.c - %s - Start.\n",__func__);
	/* Initialize the io space constraints on the current bus */
	resource = amdfam12_find_iopair(dev, nodeid, link);
	if (resource) {
		u32 align;
		align = log2(HT_IO_HOST_ALIGN);
		resource->base  = 0;
		resource->size  = 0;
		resource->align = align;
		resource->gran  = align;
		resource->limit = 0xffffUL;
		resource->flags = IORESOURCE_IO | IORESOURCE_BRIDGE;
	}

	/* Initialize the prefetchable memory constraints on the current bus */
	resource = amdfam12_find_mempair(dev, nodeid, link);
	if (resource) {
		resource->base = 0;
		resource->size = 0;
		resource->align = log2(HT_MEM_HOST_ALIGN);
		resource->gran = log2(HT_MEM_HOST_ALIGN);
		resource->limit = 0xffffffffffULL;
		resource->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
		resource->flags |= IORESOURCE_BRIDGE;
	}

	/* Initialize the memory constraints on the current bus */
	resource = amdfam12_find_mempair(dev, nodeid, link);
	if (resource) {
		resource->base = 0;
		resource->size = 0;
		resource->align = log2(HT_MEM_HOST_ALIGN);
		resource->gran = log2(HT_MEM_HOST_ALIGN);
		resource->limit = 0xffffffffffULL;
		resource->flags = IORESOURCE_MEM | IORESOURCE_BRIDGE;
	}
	printk(BIOS_DEBUG, "Fam12h - northbridge.c - %s - End.\n",__func__);
}