diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/arm/mach-epxa10db |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/arm/mach-epxa10db')
-rw-r--r-- | arch/arm/mach-epxa10db/Kconfig | 23 | ||||
-rw-r--r-- | arch/arm/mach-epxa10db/Makefile | 11 | ||||
-rw-r--r-- | arch/arm/mach-epxa10db/Makefile.boot | 2 | ||||
-rw-r--r-- | arch/arm/mach-epxa10db/arch.c | 72 | ||||
-rw-r--r-- | arch/arm/mach-epxa10db/dma.c | 28 | ||||
-rw-r--r-- | arch/arm/mach-epxa10db/irq.c | 82 | ||||
-rw-r--r-- | arch/arm/mach-epxa10db/mm.c | 45 | ||||
-rw-r--r-- | arch/arm/mach-epxa10db/time.c | 78 |
8 files changed, 341 insertions, 0 deletions
diff --git a/arch/arm/mach-epxa10db/Kconfig b/arch/arm/mach-epxa10db/Kconfig new file mode 100644 index 000000000000..55d896dd4950 --- /dev/null +++ b/arch/arm/mach-epxa10db/Kconfig | |||
@@ -0,0 +1,23 @@ | |||
1 | if ARCH_CAMELOT | ||
2 | |||
3 | menu "Epxa10db" | ||
4 | |||
5 | comment "PLD hotswap support" | ||
6 | |||
7 | config PLD | ||
8 | bool | ||
9 | default y | ||
10 | |||
11 | config PLD_HOTSWAP | ||
12 | bool "Support for PLD device hotplugging (experimental)" | ||
13 | depends on EXPERIMENTAL | ||
14 | help | ||
15 | This enables support for the dynamic loading and configuration of | ||
16 | compatible drivers when the contents of the PLD are changed. This | ||
17 | is still experimental and requires configuration tools which are | ||
18 | not yet generally available. Say N here. You must enable the kernel | ||
19 | module loader for this feature to work. | ||
20 | |||
21 | endmenu | ||
22 | |||
23 | endif | ||
diff --git a/arch/arm/mach-epxa10db/Makefile b/arch/arm/mach-epxa10db/Makefile new file mode 100644 index 000000000000..24fbd7d3a3c1 --- /dev/null +++ b/arch/arm/mach-epxa10db/Makefile | |||
@@ -0,0 +1,11 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Object file lists. | ||
6 | |||
7 | obj-y := arch.o irq.o mm.o time.o | ||
8 | obj-m := | ||
9 | obj-n := | ||
10 | obj- := | ||
11 | |||
diff --git a/arch/arm/mach-epxa10db/Makefile.boot b/arch/arm/mach-epxa10db/Makefile.boot new file mode 100644 index 000000000000..28bec7d3fc88 --- /dev/null +++ b/arch/arm/mach-epxa10db/Makefile.boot | |||
@@ -0,0 +1,2 @@ | |||
1 | zreladdr-y := 0x00008000 | ||
2 | |||
diff --git a/arch/arm/mach-epxa10db/arch.c b/arch/arm/mach-epxa10db/arch.c new file mode 100644 index 000000000000..1b40340e8a21 --- /dev/null +++ b/arch/arm/mach-epxa10db/arch.c | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-epxa10db/arch.c | ||
3 | * | ||
4 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
5 | * Copyright (C) 2001 Altera Corporation | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #include <linux/types.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/serial_8250.h> | ||
24 | |||
25 | #include <asm/hardware.h> | ||
26 | #include <asm/setup.h> | ||
27 | #include <asm/mach-types.h> | ||
28 | |||
29 | #include <asm/mach/arch.h> | ||
30 | |||
31 | static struct plat_serial8250_port serial_platform_data[] = { | ||
32 | { | ||
33 | .iobase = 0x3f8, | ||
34 | .irq = IRQ_UARTINT0, | ||
35 | #error FIXME | ||
36 | .uartclk = 0, | ||
37 | .regshift = 0, | ||
38 | .iotype = UPIO_PORT, | ||
39 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
40 | }, | ||
41 | { | ||
42 | .iobase = 0x2f8, | ||
43 | .irq = IRQ_UARTINT1, | ||
44 | #error FIXME | ||
45 | .uartclk = 0, | ||
46 | .regshift = 0, | ||
47 | .iotype = UPIO_PORT, | ||
48 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
49 | }, | ||
50 | { }, | ||
51 | }; | ||
52 | |||
53 | static struct platform_device serial_device = { | ||
54 | .name = "serial8250", | ||
55 | .id = 0, | ||
56 | .dev = { | ||
57 | .platform_data = serial_platform_data, | ||
58 | }, | ||
59 | }; | ||
60 | |||
61 | extern void epxa10db_map_io(void); | ||
62 | extern void epxa10db_init_irq(void); | ||
63 | extern struct sys_timer epxa10db_timer; | ||
64 | |||
65 | MACHINE_START(CAMELOT, "Altera Epxa10db") | ||
66 | MAINTAINER("Altera Corporation") | ||
67 | BOOT_MEM(0x00000000, 0x7fffc000, 0xffffc000) | ||
68 | MAPIO(epxa10db_map_io) | ||
69 | INITIRQ(epxa10db_init_irq) | ||
70 | .timer = &epxa10db_timer, | ||
71 | MACHINE_END | ||
72 | |||
diff --git a/arch/arm/mach-epxa10db/dma.c b/arch/arm/mach-epxa10db/dma.c new file mode 100644 index 000000000000..0151e9f1c066 --- /dev/null +++ b/arch/arm/mach-epxa10db/dma.c | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-epxa10db/dma.c | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #include <linux/init.h> | ||
22 | |||
23 | #include <asm/dma.h> | ||
24 | #include <asm/mach/dma.h> | ||
25 | |||
26 | void __init arch_dma_init(dma_t *dma) | ||
27 | { | ||
28 | } | ||
diff --git a/arch/arm/mach-epxa10db/irq.c b/arch/arm/mach-epxa10db/irq.c new file mode 100644 index 000000000000..9bf927e13309 --- /dev/null +++ b/arch/arm/mach-epxa10db/irq.c | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-epxa10db/irq.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Altera Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/ioport.h> | ||
22 | #include <linux/stddef.h> | ||
23 | #include <linux/timer.h> | ||
24 | #include <linux/list.h> | ||
25 | #include <asm/io.h> | ||
26 | #include <asm/hardware.h> | ||
27 | #include <asm/irq.h> | ||
28 | #include <asm/mach/irq.h> | ||
29 | #include <asm/arch/platform.h> | ||
30 | #include <asm/arch/int_ctrl00.h> | ||
31 | |||
32 | |||
33 | static void epxa_mask_irq(unsigned int irq) | ||
34 | { | ||
35 | writel(1 << irq, INT_MC(IO_ADDRESS(EXC_INT_CTRL00_BASE))); | ||
36 | } | ||
37 | |||
38 | static void epxa_unmask_irq(unsigned int irq) | ||
39 | { | ||
40 | writel(1 << irq, INT_MS(IO_ADDRESS(EXC_INT_CTRL00_BASE))); | ||
41 | } | ||
42 | |||
43 | |||
44 | static struct irqchip epxa_irq_chip = { | ||
45 | .ack = epxa_mask_irq, | ||
46 | .mask = epxa_mask_irq, | ||
47 | .unmask = epxa_unmask_irq, | ||
48 | }; | ||
49 | |||
50 | static struct resource irq_resource = { | ||
51 | .name = "irq_handler", | ||
52 | .start = IO_ADDRESS(EXC_INT_CTRL00_BASE), | ||
53 | .end = IO_ADDRESS(INT_PRIORITY_FC(EXC_INT_CTRL00_BASE))+4, | ||
54 | }; | ||
55 | |||
56 | void __init epxa10db_init_irq(void) | ||
57 | { | ||
58 | unsigned int i; | ||
59 | |||
60 | request_resource(&iomem_resource, &irq_resource); | ||
61 | |||
62 | /* | ||
63 | * This bit sets up the interrupt controller using | ||
64 | * the 6 PLD interrupts mode (the default) each | ||
65 | * irqs is assigned a priority which is the same | ||
66 | * as its interrupt number. This scheme is used because | ||
67 | * its easy, but you may want to change it depending | ||
68 | * on the contents of your PLD | ||
69 | */ | ||
70 | |||
71 | writel(3,INT_MODE(IO_ADDRESS(EXC_INT_CTRL00_BASE))); | ||
72 | for (i = 0; i < NR_IRQS; i++){ | ||
73 | writel(i+1, INT_PRIORITY_P0(IO_ADDRESS(EXC_INT_CTRL00_BASE)) + (4*i)); | ||
74 | set_irq_chip(i,&epxa_irq_chip); | ||
75 | set_irq_handler(i,do_level_IRQ); | ||
76 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | ||
77 | } | ||
78 | |||
79 | /* Disable all interrupts */ | ||
80 | writel(-1,INT_MC(IO_ADDRESS(EXC_INT_CTRL00_BASE))); | ||
81 | |||
82 | } | ||
diff --git a/arch/arm/mach-epxa10db/mm.c b/arch/arm/mach-epxa10db/mm.c new file mode 100644 index 000000000000..2aa57fa46da3 --- /dev/null +++ b/arch/arm/mach-epxa10db/mm.c | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-epxa10db/mm.c | ||
3 | * | ||
4 | * MM routines for Altera'a Epxa10db board | ||
5 | * | ||
6 | * Copyright (C) 2001 Altera Corporation | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/init.h> | ||
24 | |||
25 | #include <asm/hardware.h> | ||
26 | #include <asm/io.h> | ||
27 | #include <asm/sizes.h> | ||
28 | |||
29 | #include <asm/mach/map.h> | ||
30 | |||
31 | /* Page table mapping for I/O region */ | ||
32 | |||
33 | static struct map_desc epxa10db_io_desc[] __initdata = { | ||
34 | { IO_ADDRESS(EXC_REGISTERS_BASE), EXC_REGISTERS_BASE, SZ_16K, MT_DEVICE }, | ||
35 | { IO_ADDRESS(EXC_PLD_BLOCK0_BASE), EXC_PLD_BLOCK0_BASE, SZ_16K, MT_DEVICE }, | ||
36 | { IO_ADDRESS(EXC_PLD_BLOCK1_BASE), EXC_PLD_BLOCK1_BASE, SZ_16K, MT_DEVICE }, | ||
37 | { IO_ADDRESS(EXC_PLD_BLOCK2_BASE), EXC_PLD_BLOCK2_BASE, SZ_16K, MT_DEVICE }, | ||
38 | { IO_ADDRESS(EXC_PLD_BLOCK3_BASE), EXC_PLD_BLOCK3_BASE, SZ_16K, MT_DEVICE }, | ||
39 | { FLASH_VADDR(EXC_EBI_BLOCK0_BASE), EXC_EBI_BLOCK0_BASE, SZ_16M, MT_DEVICE } | ||
40 | }; | ||
41 | |||
42 | void __init epxa10db_map_io(void) | ||
43 | { | ||
44 | iotable_init(epxa10db_io_desc, ARRAY_SIZE(epxa10db_io_desc)); | ||
45 | } | ||
diff --git a/arch/arm/mach-epxa10db/time.c b/arch/arm/mach-epxa10db/time.c new file mode 100644 index 000000000000..1b991f3cc3c6 --- /dev/null +++ b/arch/arm/mach-epxa10db/time.c | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-epxa10db/time.c | ||
3 | * | ||
4 | * Copyright (C) 2000 Deep Blue Solutions | ||
5 | * Copyright (C) 2001 Altera Corporation | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/sched.h> | ||
15 | |||
16 | #include <asm/hardware.h> | ||
17 | #include <asm/system.h> | ||
18 | #include <asm/leds.h> | ||
19 | |||
20 | #include <asm/mach/time.h> | ||
21 | |||
22 | #define TIMER00_TYPE (volatile unsigned int*) | ||
23 | #include <asm/arch/timer00.h> | ||
24 | |||
25 | static int epxa10db_set_rtc(void) | ||
26 | { | ||
27 | return 1; | ||
28 | } | ||
29 | |||
30 | static int epxa10db_rtc_init(void) | ||
31 | { | ||
32 | set_rtc = epxa10db_set_rtc; | ||
33 | |||
34 | return 0; | ||
35 | } | ||
36 | |||
37 | __initcall(epxa10db_rtc_init); | ||
38 | |||
39 | |||
40 | /* | ||
41 | * IRQ handler for the timer | ||
42 | */ | ||
43 | static irqreturn_t | ||
44 | epxa10db_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
45 | { | ||
46 | write_seqlock(&xtime_lock); | ||
47 | |||
48 | // ...clear the interrupt | ||
49 | *TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))|=TIMER0_CR_CI_MSK; | ||
50 | |||
51 | timer_tick(regs); | ||
52 | write_sequnlock(&xtime_lock); | ||
53 | |||
54 | return IRQ_HANDLED; | ||
55 | } | ||
56 | |||
57 | static struct irqaction epxa10db_timer_irq = { | ||
58 | .name = "Excalibur Timer Tick", | ||
59 | .flags = SA_INTERRUPT, | ||
60 | .handler = epxa10db_timer_interrupt | ||
61 | }; | ||
62 | |||
63 | /* | ||
64 | * Set up timer interrupt, and return the current time in seconds. | ||
65 | */ | ||
66 | static void __init epxa10db_timer_init(void) | ||
67 | { | ||
68 | /* Start the timer */ | ||
69 | *TIMER0_LIMIT(IO_ADDRESS(EXC_TIMER00_BASE))=(unsigned int)(EXC_AHB2_CLK_FREQUENCY/200); | ||
70 | *TIMER0_PRESCALE(IO_ADDRESS(EXC_TIMER00_BASE))=1; | ||
71 | *TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))=TIMER0_CR_IE_MSK | TIMER0_CR_S_MSK; | ||
72 | |||
73 | setup_irq(IRQ_TIMER0, &epxa10db_timer_irq); | ||
74 | } | ||
75 | |||
76 | struct sys_timer epxa10db_timer = { | ||
77 | .init = epxa10db_timer_init, | ||
78 | }; | ||