Commit 30eced59 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://are.twiddle.net/axp-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents d831e5a2 7c5488f0
......@@ -194,27 +194,20 @@ eiger_swizzle(struct pci_dev *dev, u8 *pinp)
case 0x0f: bridge_count = 4; break; /* 4 */
};
/* Check first for the built-in bridges on hose 0. */
if (hose->index == 0
&& PCI_SLOT(dev->bus->self->devfn) > 20-bridge_count) {
slot = PCI_SLOT(dev->devfn);
} else {
/* Must be a card-based bridge. */
do {
/* Check for built-in bridges on hose 0. */
if (hose->index == 0
&& (PCI_SLOT(dev->bus->self->devfn)
> 20 - bridge_count)) {
slot = PCI_SLOT(dev->devfn);
break;
}
pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));
/* Move up the chain of bridges. */
dev = dev->bus->self;
/* Slot of the next bridge. */
slot = PCI_SLOT(dev->devfn);
while (dev->bus->self) {
/* Check for built-in bridges on hose 0. */
if (hose->index == 0
&& (PCI_SLOT(dev->bus->self->devfn)
> 20 - bridge_count)) {
slot = PCI_SLOT(dev->devfn);
} while (dev->bus->self);
break;
}
/* Must be a card-based bridge. */
pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));
/* Move up the chain of bridges. */
dev = dev->bus->self;
}
*pinp = pin;
return slot;
......
......@@ -25,6 +25,7 @@
#include <asm/pgtable.h>
#include <asm/core_cia.h>
#include <asm/tlbflush.h>
#include <asm/8253pit.h>
#include "proto.h"
#include "irq_impl.h"
......@@ -64,6 +65,8 @@ ruffian_init_irq(void)
common_init_isa_dma();
}
#define RUFFIAN_LATCH ((PIT_TICK_RATE + HZ / 2) / HZ)
static void __init
ruffian_init_rtc(void)
{
......@@ -72,8 +75,8 @@ ruffian_init_rtc(void)
/* Setup interval timer. */
outb(0x34, 0x43); /* binary, mode 2, LSB/MSB, ch 0 */
outb(LATCH & 0xff, 0x40); /* LSB */
outb(LATCH >> 8, 0x40); /* MSB */
outb(RUFFIAN_LATCH & 0xff, 0x40); /* LSB */
outb(RUFFIAN_LATCH >> 8, 0x40); /* MSB */
outb(0xb6, 0x43); /* pit counter 2: speaker */
outb(0x31, 0x42);
......
......@@ -231,8 +231,12 @@ takara_swizzle(struct pci_dev *dev, u8 *pinp)
int slot = PCI_SLOT(dev->devfn);
int pin = *pinp;
unsigned int ctlreg = inl(0x500);
unsigned int busslot = PCI_SLOT(dev->bus->self->devfn);
unsigned int busslot;
if (!dev->bus->self)
return slot;
busslot = PCI_SLOT(dev->bus->self->devfn);
/* Check for built-in bridges. */
if (dev->bus->number != 0
&& busslot > 16
......
......@@ -117,7 +117,7 @@ show_mem(void)
else if (!page_count(mem_map+i))
free++;
else
shared += atomic_read(&mem_map[i].count) - 1;
shared += page_count(mem_map + i) - 1;
}
printk("%ld pages of RAM\n",total);
printk("%ld free pages\n",free);
......
......@@ -384,7 +384,7 @@ show_mem(void)
else if (!page_count(lmem_map+i))
free++;
else
shared += atomic_read(&lmem_map[i].count) - 1;
shared += page_count(lmem_map + i) - 1;
}
}
printk("%ld pages of RAM\n",total);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment