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) ...@@ -194,27 +194,20 @@ eiger_swizzle(struct pci_dev *dev, u8 *pinp)
case 0x0f: bridge_count = 4; break; /* 4 */ case 0x0f: bridge_count = 4; break; /* 4 */
}; };
/* Check first for the built-in bridges on hose 0. */ slot = PCI_SLOT(dev->devfn);
if (hose->index == 0 while (dev->bus->self) {
&& PCI_SLOT(dev->bus->self->devfn) > 20-bridge_count) { /* Check for built-in bridges on hose 0. */
slot = PCI_SLOT(dev->devfn); if (hose->index == 0
} else { && (PCI_SLOT(dev->bus->self->devfn)
/* Must be a card-based bridge. */ > 20 - bridge_count)) {
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); 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; *pinp = pin;
return slot; return slot;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/core_cia.h> #include <asm/core_cia.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/8253pit.h>
#include "proto.h" #include "proto.h"
#include "irq_impl.h" #include "irq_impl.h"
...@@ -64,6 +65,8 @@ ruffian_init_irq(void) ...@@ -64,6 +65,8 @@ ruffian_init_irq(void)
common_init_isa_dma(); common_init_isa_dma();
} }
#define RUFFIAN_LATCH ((PIT_TICK_RATE + HZ / 2) / HZ)
static void __init static void __init
ruffian_init_rtc(void) ruffian_init_rtc(void)
{ {
...@@ -72,8 +75,8 @@ ruffian_init_rtc(void) ...@@ -72,8 +75,8 @@ ruffian_init_rtc(void)
/* Setup interval timer. */ /* Setup interval timer. */
outb(0x34, 0x43); /* binary, mode 2, LSB/MSB, ch 0 */ outb(0x34, 0x43); /* binary, mode 2, LSB/MSB, ch 0 */
outb(LATCH & 0xff, 0x40); /* LSB */ outb(RUFFIAN_LATCH & 0xff, 0x40); /* LSB */
outb(LATCH >> 8, 0x40); /* MSB */ outb(RUFFIAN_LATCH >> 8, 0x40); /* MSB */
outb(0xb6, 0x43); /* pit counter 2: speaker */ outb(0xb6, 0x43); /* pit counter 2: speaker */
outb(0x31, 0x42); outb(0x31, 0x42);
......
...@@ -231,8 +231,12 @@ takara_swizzle(struct pci_dev *dev, u8 *pinp) ...@@ -231,8 +231,12 @@ takara_swizzle(struct pci_dev *dev, u8 *pinp)
int slot = PCI_SLOT(dev->devfn); int slot = PCI_SLOT(dev->devfn);
int pin = *pinp; int pin = *pinp;
unsigned int ctlreg = inl(0x500); 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. */ /* Check for built-in bridges. */
if (dev->bus->number != 0 if (dev->bus->number != 0
&& busslot > 16 && busslot > 16
......
...@@ -117,7 +117,7 @@ show_mem(void) ...@@ -117,7 +117,7 @@ show_mem(void)
else if (!page_count(mem_map+i)) else if (!page_count(mem_map+i))
free++; free++;
else 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 pages of RAM\n",total);
printk("%ld free pages\n",free); printk("%ld free pages\n",free);
......
...@@ -384,7 +384,7 @@ show_mem(void) ...@@ -384,7 +384,7 @@ show_mem(void)
else if (!page_count(lmem_map+i)) else if (!page_count(lmem_map+i))
free++; free++;
else else
shared += atomic_read(&lmem_map[i].count) - 1; shared += page_count(lmem_map + i) - 1;
} }
} }
printk("%ld pages of RAM\n",total); 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