]> pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/arm/mach-l7200/core.c
Merge branch 'scsi-scan'
[linux-2.6-omap-h63xx.git] / arch / arm / mach-l7200 / core.c
1 /*
2  *  linux/arch/arm/mm/mm-lusl7200.c
3  *
4  *  Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5  *
6  *  Extra MM routines for L7200 architecture
7  */
8 #include <linux/kernel.h>
9 #include <linux/init.h>
10
11 #include <asm/hardware.h>
12 #include <asm/page.h>
13
14 #include <asm/mach/map.h>
15
16 /*
17  * IRQ base register
18  */
19 #define IRQ_BASE        (IO_BASE_2 + 0x1000)
20
21 /* 
22  * Normal IRQ registers
23  */
24 #define IRQ_STATUS      (*(volatile unsigned long *) (IRQ_BASE + 0x000))
25 #define IRQ_RAWSTATUS   (*(volatile unsigned long *) (IRQ_BASE + 0x004))
26 #define IRQ_ENABLE      (*(volatile unsigned long *) (IRQ_BASE + 0x008))
27 #define IRQ_ENABLECLEAR (*(volatile unsigned long *) (IRQ_BASE + 0x00c))
28 #define IRQ_SOFT        (*(volatile unsigned long *) (IRQ_BASE + 0x010))
29 #define IRQ_SOURCESEL   (*(volatile unsigned long *) (IRQ_BASE + 0x018))
30
31 /* 
32  * Fast IRQ registers
33  */
34 #define FIQ_STATUS      (*(volatile unsigned long *) (IRQ_BASE + 0x100))
35 #define FIQ_RAWSTATUS   (*(volatile unsigned long *) (IRQ_BASE + 0x104))
36 #define FIQ_ENABLE      (*(volatile unsigned long *) (IRQ_BASE + 0x108))
37 #define FIQ_ENABLECLEAR (*(volatile unsigned long *) (IRQ_BASE + 0x10c))
38 #define FIQ_SOFT        (*(volatile unsigned long *) (IRQ_BASE + 0x110))
39 #define FIQ_SOURCESEL   (*(volatile unsigned long *) (IRQ_BASE + 0x118))
40
41 static void l7200_mask_irq(unsigned int irq)
42 {
43         IRQ_ENABLECLEAR = 1 << irq;
44 }
45
46 static void l7200_unmask_irq(unsigned int irq)
47 {
48         IRQ_ENABLE = 1 << irq;
49 }
50  
51 static void __init l7200_init_irq(void)
52 {
53         int irq;
54
55         IRQ_ENABLECLEAR = 0xffffffff;   /* clear all interrupt enables */
56         FIQ_ENABLECLEAR = 0xffffffff;   /* clear all fast interrupt enables */
57
58         for (irq = 0; irq < NR_IRQS; irq++) {
59                 irq_desc[irq].valid     = 1;
60                 irq_desc[irq].probe_ok  = 1;
61                 irq_desc[irq].mask_ack  = l7200_mask_irq;
62                 irq_desc[irq].mask      = l7200_mask_irq;
63                 irq_desc[irq].unmask    = l7200_unmask_irq;
64         }
65
66         init_FIQ();
67 }
68
69 static struct map_desc l7200_io_desc[] __initdata = {
70         { IO_BASE,      IO_START,       IO_SIZE,        MT_DEVICE },
71         { IO_BASE_2,    IO_START_2,     IO_SIZE_2,      MT_DEVICE },
72         { AUX_BASE,     AUX_START,      AUX_SIZE,       MT_DEVICE },
73         { FLASH1_BASE,  FLASH1_START,   FLASH1_SIZE,    MT_DEVICE },
74         { FLASH2_BASE,  FLASH2_START,   FLASH2_SIZE,    MT_DEVICE }
75 };
76
77 static void __init l7200_map_io(void)
78 {
79         iotable_init(l7200_io_desc, ARRAY_SIZE(l7200_io_desc));
80 }
81
82 MACHINE_START(L7200, "LinkUp Systems L7200")
83         /* Maintainer: Steve Hill / Scott McConnell */
84         .phys_ram       = 0xf0000000,
85         .phys_io        = 0x80040000,
86         .io_pg_offst    = ((0xd0000000) >> 18) & 0xfffc,
87         .map_io         = l7200_map_io,
88         .init_irq       = l7200_init_irq,
89 MACHINE_END
90