Trivial white space fixes so that the next patches are easier to read.
Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4268 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
7c29dada3e
commit
032a9653a6
|
@ -104,11 +104,11 @@ static void pci_domain_set_resources(device_t dev)
|
||||||
/* Compute the top of Low memory */
|
/* Compute the top of Low memory */
|
||||||
tolmk = pci_tolm >> 10;
|
tolmk = pci_tolm >> 10;
|
||||||
if (tolmk >= tomk) {
|
if (tolmk >= tomk) {
|
||||||
/* The PCI hole does not overlap memory.
|
/* The PCI hole does not overlap the memory. */
|
||||||
*/
|
|
||||||
tolmk = tomk;
|
tolmk = tomk;
|
||||||
}
|
}
|
||||||
/* Report the memory regions */
|
|
||||||
|
/* Report the memory regions. */
|
||||||
idx = 10;
|
idx = 10;
|
||||||
ram_resource(dev, idx++, 0, tolmk);
|
ram_resource(dev, idx++, 0, tolmk);
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,14 +194,13 @@ static void pick_largest_resource(void *gp,
|
||||||
state->seen_last = 1;
|
state->seen_last = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (resource->flags & IORESOURCE_FIXED ) return; //skip it
|
if (resource->flags & IORESOURCE_FIXED)
|
||||||
if (last && (
|
return; // Skip it.
|
||||||
(last->align < resource->align) ||
|
if (last && ((last->align < resource->align) ||
|
||||||
((last->align == resource->align) &&
|
((last->align == resource->align) &&
|
||||||
(last->size < resource->size)) ||
|
(last->size < resource->size)) ||
|
||||||
((last->align == resource->align) &&
|
((last->align == resource->align) &&
|
||||||
(last->size == resource->size) &&
|
(last->size == resource->size) && (!state->seen_last)))) {
|
||||||
(!state->seen_last)))) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!state->result ||
|
if (!state->result ||
|
||||||
|
@ -224,7 +223,8 @@ static struct device *largest_resource(struct bus *bus, struct resource **result
|
||||||
state.result = 0;
|
state.result = 0;
|
||||||
state.seen_last = 0;
|
state.seen_last = 0;
|
||||||
|
|
||||||
search_bus_resources(bus, type_mask, type, pick_largest_resource, &state);
|
search_bus_resources(bus, type_mask, type, pick_largest_resource,
|
||||||
|
&state);
|
||||||
|
|
||||||
*result_res = state.result;
|
*result_res = state.result;
|
||||||
return state.result_dev;
|
return state.result_dev;
|
||||||
|
@ -385,8 +385,6 @@ void compute_allocate_resource(
|
||||||
(bridge->flags & IORESOURCE_IO)? "io":
|
(bridge->flags & IORESOURCE_IO)? "io":
|
||||||
(bridge->flags & IORESOURCE_PREFETCH)? "prefmem" : "mem",
|
(bridge->flags & IORESOURCE_PREFETCH)? "prefmem" : "mem",
|
||||||
base, bridge->size, bridge->align, bridge->gran);
|
base, bridge->size, bridge->align, bridge->gran);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_VGA == 1
|
#if CONFIG_CONSOLE_VGA == 1
|
||||||
|
|
|
@ -39,15 +39,14 @@ static const struct pci_driver northbridge_driver __pci_driver = {
|
||||||
static void pci_domain_read_resources(device_t dev)
|
static void pci_domain_read_resources(device_t dev)
|
||||||
{
|
{
|
||||||
struct resource *resource;
|
struct resource *resource;
|
||||||
unsigned reg;
|
|
||||||
|
|
||||||
/* Initialize the system wide io space constraints */
|
/* Initialize the system wide io space constraints */
|
||||||
resource = new_resource(dev, IOINDEX_SUBTRACTIVE(0, 0));
|
resource = new_resource(dev, IOINDEX_SUBTRACTIVE(0,0));
|
||||||
resource->limit = 0xffffUL;
|
resource->limit = 0xffffUL;
|
||||||
resource->flags = IORESOURCE_IO | IORESOURCE_SUBTRACTIVE | IORESOURCE_ASSIGNED;
|
resource->flags = IORESOURCE_IO | IORESOURCE_SUBTRACTIVE | IORESOURCE_ASSIGNED;
|
||||||
|
|
||||||
/* Initialize the system wide memory resources constraints */
|
/* Initialize the system wide memory resources constraints */
|
||||||
resource = new_resource(dev, IOINDEX_SUBTRACTIVE(1, 0));
|
resource = new_resource(dev, IOINDEX_SUBTRACTIVE(1,0));
|
||||||
resource->limit = 0xffffffffULL;
|
resource->limit = 0xffffffffULL;
|
||||||
resource->flags = IORESOURCE_MEM | IORESOURCE_SUBTRACTIVE | IORESOURCE_ASSIGNED;
|
resource->flags = IORESOURCE_MEM | IORESOURCE_SUBTRACTIVE | IORESOURCE_ASSIGNED;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +94,7 @@ static uint32_t find_pci_tolm(struct bus *bus)
|
||||||
#define HIGH_TABLES_SIZE 64 // maximum size of high tables in KB
|
#define HIGH_TABLES_SIZE 64 // maximum size of high tables in KB
|
||||||
extern uint64_t high_tables_base, high_tables_size;
|
extern uint64_t high_tables_base, high_tables_size;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void pci_domain_set_resources(device_t dev)
|
static void pci_domain_set_resources(device_t dev)
|
||||||
{
|
{
|
||||||
device_t mc_dev;
|
device_t mc_dev;
|
||||||
|
@ -102,7 +102,6 @@ static void pci_domain_set_resources(device_t dev)
|
||||||
|
|
||||||
pci_tolm = find_pci_tolm(&dev->link[0]);
|
pci_tolm = find_pci_tolm(&dev->link[0]);
|
||||||
mc_dev = dev->link[0].children;
|
mc_dev = dev->link[0].children;
|
||||||
|
|
||||||
if (mc_dev) {
|
if (mc_dev) {
|
||||||
uint16_t tolm_r;
|
uint16_t tolm_r;
|
||||||
unsigned long tomk, tolmk;
|
unsigned long tomk, tolmk;
|
||||||
|
@ -123,7 +122,7 @@ static void pci_domain_set_resources(device_t dev)
|
||||||
tolmk = pci_tolm / 1024;
|
tolmk = pci_tolm / 1024;
|
||||||
|
|
||||||
if (tolmk >= tomk) {
|
if (tolmk >= tomk) {
|
||||||
/* The PCI hole does does not overlap the memory. */
|
/* The PCI hole does not overlap the memory. */
|
||||||
tolmk = tomk;
|
tolmk = tomk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +137,6 @@ static void pci_domain_set_resources(device_t dev)
|
||||||
high_tables_size = HIGH_TABLES_SIZE * 1024;
|
high_tables_size = HIGH_TABLES_SIZE * 1024;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
assign_resources(&dev->link[0]);
|
assign_resources(&dev->link[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,8 +173,6 @@ static struct device_operations cpu_bus_ops = {
|
||||||
|
|
||||||
static void enable_dev(struct device *dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
struct device_path path;
|
|
||||||
|
|
||||||
/* Set the operations if it is a special bus type */
|
/* Set the operations if it is a special bus type */
|
||||||
if (dev->path.type == DEVICE_PATH_PCI_DOMAIN) {
|
if (dev->path.type == DEVICE_PATH_PCI_DOMAIN) {
|
||||||
dev->ops = &pci_domain_ops;
|
dev->ops = &pci_domain_ops;
|
||||||
|
|
Loading…
Reference in New Issue