2 * linux/arch/arm/mach-ftvpci/core.c
4 * Architecture specific fixups.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
11 #include <linux/kernel.h>
13 #include <linux/init.h>
15 #include <asm/setup.h>
16 #include <asm/mach-types.h>
18 #include <asm/mach/arch.h>
19 #include <asm/mach/map.h>
22 #include <asm/pgtable.h>
25 extern unsigned long soft_irq_mask;
27 static const unsigned char irq_cmd[] =
38 static void ftvpci_mask_irq(unsigned int irq)
40 __raw_writel(irq_cmd[irq], INTCONT_BASE);
41 soft_irq_mask &= ~(1<<irq);
44 static void ftvpci_unmask_irq(unsigned int irq)
46 soft_irq_mask |= (1<<irq);
47 __raw_writel(irq_cmd[irq] | 1, INTCONT_BASE);
50 static void __init ftvpci_init_irq(void)
55 __raw_writel(INTCONT_FIQ_PLX, INTCONT_BASE);
56 __raw_writel(INTCONT_FIQ_D, INTCONT_BASE);
57 __raw_writel(INTCONT_FIQ_C, INTCONT_BASE);
58 __raw_writel(INTCONT_FIQ_B, INTCONT_BASE);
59 __raw_writel(INTCONT_FIQ_A, INTCONT_BASE);
60 __raw_writel(INTCONT_FIQ_SYSERR, INTCONT_BASE);
62 /* Disable all interrupts initially. */
63 for (i = 0; i < NR_IRQS; i++) {
64 if (i >= FIRST_IRQ && i <= LAST_IRQ) {
65 irq_desc[i].valid = 1;
66 irq_desc[i].probe_ok = 1;
67 irq_desc[i].mask_ack = ftvpci_mask_irq;
68 irq_desc[i].mask = ftvpci_mask_irq;
69 irq_desc[i].unmask = ftvpci_unmask_irq;
72 irq_desc[i].valid = 0;
73 irq_desc[i].probe_ok = 0;
78 static struct map_desc ftvpci_io_desc[] __initdata = {
79 { INTCONT_BASE, INTCONT_START, 0x00001000, MT_DEVICE },
80 { PLX_BASE, PLX_START, 0x00001000, MT_DEVICE },
81 { PCIO_BASE, PLX_IO_START, 0x00100000, MT_DEVICE },
82 { DUART_BASE, DUART_START, 0x00001000, MT_DEVICE },
83 { STATUS_BASE, STATUS_START, 0x00001000, MT_DEVICE }
86 static void __init ftvpci_map_io(void)
88 iotable_init(ftvpci_io_desc, ARRAY_SIZE(ftvpci_io_desc));
91 MACHINE_START(NEXUSPCI, "FTV/PCI")
92 MAINTAINER("Philip Blundell")
93 BOOT_MEM(0x40000000, 0x10000000, 0xe0000000)
95 INITIRQ(ftvpci_init_irq)