summaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/sys_takara.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/kernel/sys_takara.c')
-rw-r--r--arch/alpha/kernel/sys_takara.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/arch/alpha/kernel/sys_takara.c b/arch/alpha/kernel/sys_takara.c
index c554a9fa1..c592ee65e 100644
--- a/arch/alpha/kernel/sys_takara.c
+++ b/arch/alpha/kernel/sys_takara.c
@@ -25,9 +25,9 @@
#include <asm/core_cia.h>
#include "proto.h"
-#include "irq.h"
-#include "bios32.h"
-#include "machvec.h"
+#include "irq_impl.h"
+#include "pci_impl.h"
+#include "machvec_impl.h"
static void
@@ -127,7 +127,7 @@ takara_init_irq(void)
*/
static int __init
-takara_map_irq(struct pci_dev *dev, int slot, int pin)
+takara_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
static char irq_tab[15][5] __initlocaldata = {
{ 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */
@@ -150,16 +150,18 @@ takara_map_irq(struct pci_dev *dev, int slot, int pin)
return COMMON_TABLE_LOOKUP;
}
-static int __init
-takara_swizzle(struct pci_dev *dev, int *pinp)
+static u8 __init
+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);
- /* Check first for built-in bridges. */
- if (busslot > 16 && ((1<<(36-busslot)) & ctlreg)) {
+ /* Check for built-in bridges. */
+ if (dev->bus->number != 0
+ && busslot > 16
+ && ((1<<(36-busslot)) & ctlreg)) {
if (pin == 1)
pin += (20 - busslot);
else {
@@ -174,11 +176,10 @@ takara_swizzle(struct pci_dev *dev, int *pinp)
}
static void __init
-takara_pci_fixup(void)
+takara_init_pci(void)
{
- layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
- common_pci_fixup(takara_map_irq, takara_swizzle);
- /* enable_ide(0x26e); */
+ common_init_pci();
+ /* ns87312_enable_ide(0x26e); */
}
@@ -194,17 +195,21 @@ struct alpha_machine_vector takara_mv __initmv = {
DO_CIA_BUS,
machine_check: cia_machine_check,
max_dma_address: ALPHA_MAX_DMA_ADDRESS,
+ min_io_address: DEFAULT_IO_BASE,
+ min_mem_address: CIA_DEFAULT_MEM_BASE,
nr_irqs: 20,
irq_probe_mask: _PROBE_MASK(20),
update_irq_hw: takara_update_irq_hw,
- ack_irq: generic_ack_irq,
+ ack_irq: common_ack_irq,
device_interrupt: takara_device_interrupt,
init_arch: cia_init_arch,
init_irq: takara_init_irq,
- init_pit: generic_init_pit,
- pci_fixup: takara_pci_fixup,
- kill_arch: generic_kill_arch,
+ init_pit: common_init_pit,
+ init_pci: takara_init_pci,
+ kill_arch: common_kill_arch,
+ pci_map_irq: takara_map_irq,
+ pci_swizzle: takara_swizzle,
};
ALIAS_MV(takara)