diff options
author | Sascha Hauer <sascha@saschahauer.de> | 2006-06-19 10:27:53 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-06-19 10:27:53 -0400 |
commit | bb6d8c8828123e01e2ae6c9d9c4870477889fd94 (patch) | |
tree | 43d7a6ec2cc15f1bf8810a65aa38d508c7fa955a /include/asm-arm | |
parent | 3095faf5295f2da9118469c925d2cfb7775ad287 (diff) |
[ARM] 3567/2: arm: base support for Hilscher netX
Patch from Sascha Hauer
This patch adds the base support for Hilscher's netX network
processors.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/arch-netx/debug-macro.S | 38 | ||||
-rw-r--r-- | include/asm-arm/arch-netx/dma.h | 21 | ||||
-rw-r--r-- | include/asm-arm/arch-netx/entry-macro.S | 35 | ||||
-rw-r--r-- | include/asm-arm/arch-netx/hardware.h | 39 | ||||
-rw-r--r-- | include/asm-arm/arch-netx/io.h | 29 | ||||
-rw-r--r-- | include/asm-arm/arch-netx/irqs.h | 70 | ||||
-rw-r--r-- | include/asm-arm/arch-netx/memory.h | 36 | ||||
-rw-r--r-- | include/asm-arm/arch-netx/param.h | 18 | ||||
-rw-r--r-- | include/asm-arm/arch-netx/system.h | 38 | ||||
-rw-r--r-- | include/asm-arm/arch-netx/timex.h | 20 | ||||
-rw-r--r-- | include/asm-arm/arch-netx/uncompress.h | 76 | ||||
-rw-r--r-- | include/asm-arm/arch-netx/vmalloc.h | 19 |
12 files changed, 439 insertions, 0 deletions
diff --git a/include/asm-arm/arch-netx/debug-macro.S b/include/asm-arm/arch-netx/debug-macro.S new file mode 100644 index 000000000000..a940d0e80cb2 --- /dev/null +++ b/include/asm-arm/arch-netx/debug-macro.S | |||
@@ -0,0 +1,38 @@ | |||
1 | /* linux/include/asm-arm/arch-netx/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #include "hardware.h" | ||
15 | |||
16 | .macro addruart,rx | ||
17 | mrc p15, 0, \rx, c1, c0 | ||
18 | tst \rx, #1 @ MMU enabled? | ||
19 | moveq \rx, #0x00100000 @ physical | ||
20 | movne \rx, #io_p2v(0x00100000) @ virtual | ||
21 | orr \rx, \rx, #0x00000a00 | ||
22 | .endm | ||
23 | |||
24 | .macro senduart,rd,rx | ||
25 | str \rd, [\rx, #0] | ||
26 | .endm | ||
27 | |||
28 | .macro busyuart,rd,rx | ||
29 | 1002: ldr \rd, [\rx, #0x18] | ||
30 | tst \rd, #(1 << 3) | ||
31 | bne 1002b | ||
32 | .endm | ||
33 | |||
34 | .macro waituart,rd,rx | ||
35 | 1001: ldr \rd, [\rx, #0x18] | ||
36 | tst \rd, #(1 << 3) | ||
37 | bne 1001b | ||
38 | .endm | ||
diff --git a/include/asm-arm/arch-netx/dma.h b/include/asm-arm/arch-netx/dma.h new file mode 100644 index 000000000000..4eda5feed81c --- /dev/null +++ b/include/asm-arm/arch-netx/dma.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-netx/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #define MAX_DMA_CHANNELS 0 | ||
21 | #define MAX_DMA_ADDRESS ~0 | ||
diff --git a/include/asm-arm/arch-netx/entry-macro.S b/include/asm-arm/arch-netx/entry-macro.S new file mode 100644 index 000000000000..658df4d60ff3 --- /dev/null +++ b/include/asm-arm/arch-netx/entry-macro.S | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Hilscher netX based platforms | ||
5 | * | ||
6 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 version 2 | ||
10 | * as published by the Free Software Foundation. | ||
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 <asm/hardware.h> | ||
22 | |||
23 | .macro disable_fiq | ||
24 | .endm | ||
25 | |||
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
27 | mov \base, #io_p2v(0x00100000) | ||
28 | add \base, \base, #0x000ff000 | ||
29 | |||
30 | ldr \irqstat, [\base, #0] | ||
31 | clz \irqnr, \irqstat | ||
32 | rsb \irqnr, \irqnr, #31 | ||
33 | cmp \irqstat, #0 | ||
34 | .endm | ||
35 | |||
diff --git a/include/asm-arm/arch-netx/hardware.h b/include/asm-arm/arch-netx/hardware.h new file mode 100644 index 000000000000..7786c45455cd --- /dev/null +++ b/include/asm-arm/arch-netx/hardware.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef __ASM_ARCH_HARDWARE_H | ||
20 | #define __ASM_ARCH_HARDWARE_H | ||
21 | |||
22 | #define NETX_IO_PHYS 0x00100000 | ||
23 | #define NETX_IO_VIRT 0xe0000000 | ||
24 | #define NETX_IO_SIZE 0x00100000 | ||
25 | |||
26 | #define SRAM_INTERNAL_PHYS_0 0x00000 | ||
27 | #define SRAM_INTERNAL_PHYS_1 0x08000 | ||
28 | #define SRAM_INTERNAL_PHYS_2 0x10000 | ||
29 | #define SRAM_INTERNAL_PHYS_3 0x18000 | ||
30 | #define SRAM_INTERNAL_PHYS(no) ((no) * 0x8000) | ||
31 | |||
32 | #define XPEC_MEM_SIZE 0x4000 | ||
33 | #define XMAC_MEM_SIZE 0x1000 | ||
34 | #define SRAM_MEM_SIZE 0x8000 | ||
35 | |||
36 | #define io_p2v(x) ((x) - NETX_IO_PHYS + NETX_IO_VIRT) | ||
37 | #define io_v2p(x) ((x) - NETX_IO_VIRT + NETX_IO_PHYS) | ||
38 | |||
39 | #endif | ||
diff --git a/include/asm-arm/arch-netx/io.h b/include/asm-arm/arch-netx/io.h new file mode 100644 index 000000000000..81b7bc47747e --- /dev/null +++ b/include/asm-arm/arch-netx/io.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-netx/io.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARM_ARCH_IO_H | ||
21 | #define __ASM_ARM_ARCH_IO_H | ||
22 | |||
23 | #define IO_SPACE_LIMIT 0xffffffff | ||
24 | |||
25 | #define __io(a) ((void __iomem *)(a)) | ||
26 | #define __mem_pci(a) (a) | ||
27 | #define __mem_isa(a) (a) | ||
28 | |||
29 | #endif | ||
diff --git a/include/asm-arm/arch-netx/irqs.h b/include/asm-arm/arch-netx/irqs.h new file mode 100644 index 000000000000..a487dc6e2661 --- /dev/null +++ b/include/asm-arm/arch-netx/irqs.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #define NETX_IRQ_VIC_START 0 | ||
21 | #define NETX_IRQ_SOFTINT 0 | ||
22 | #define NETX_IRQ_TIMER0 1 | ||
23 | #define NETX_IRQ_TIMER1 2 | ||
24 | #define NETX_IRQ_TIMER2 3 | ||
25 | #define NETX_IRQ_SYSTIME_NS 4 | ||
26 | #define NETX_IRQ_SYSTIME_S 5 | ||
27 | #define NETX_IRQ_GPIO_15 6 | ||
28 | #define NETX_IRQ_WATCHDOG 7 | ||
29 | #define NETX_IRQ_UART0 8 | ||
30 | #define NETX_IRQ_UART1 9 | ||
31 | #define NETX_IRQ_UART2 10 | ||
32 | #define NETX_IRQ_USB 11 | ||
33 | #define NETX_IRQ_SPI 12 | ||
34 | #define NETX_IRQ_I2C 13 | ||
35 | #define NETX_IRQ_LCD 14 | ||
36 | #define NETX_IRQ_HIF 15 | ||
37 | #define NETX_IRQ_GPIO_0_14 16 | ||
38 | #define NETX_IRQ_XPEC0 17 | ||
39 | #define NETX_IRQ_XPEC1 18 | ||
40 | #define NETX_IRQ_XPEC2 19 | ||
41 | #define NETX_IRQ_XPEC3 20 | ||
42 | #define NETX_IRQ_XPEC(no) (17 + (no)) | ||
43 | #define NETX_IRQ_MSYNC0 21 | ||
44 | #define NETX_IRQ_MSYNC1 22 | ||
45 | #define NETX_IRQ_MSYNC2 23 | ||
46 | #define NETX_IRQ_MSYNC3 24 | ||
47 | #define NETX_IRQ_IRQ_PHY 25 | ||
48 | #define NETX_IRQ_ISO_AREA 26 | ||
49 | /* int 27 is reserved */ | ||
50 | /* int 28 is reserved */ | ||
51 | #define NETX_IRQ_TIMER3 29 | ||
52 | #define NETX_IRQ_TIMER4 30 | ||
53 | /* int 31 is reserved */ | ||
54 | |||
55 | #define NETX_IRQS 32 | ||
56 | |||
57 | /* for multiplexed irqs on gpio 0..14 */ | ||
58 | #define NETX_IRQ_GPIO(x) (NETX_IRQS + (x)) | ||
59 | #define NETX_IRQ_GPIO_LAST NETX_IRQ_GPIO(14) | ||
60 | |||
61 | /* Host interface interrupts */ | ||
62 | #define NETX_IRQ_HIF_CHAINED(x) (NETX_IRQ_GPIO_LAST + 1 + (x)) | ||
63 | #define NETX_IRQ_HIF_PIO35 NETX_IRQ_HIF_CHAINED(0) | ||
64 | #define NETX_IRQ_HIF_PIO36 NETX_IRQ_HIF_CHAINED(1) | ||
65 | #define NETX_IRQ_HIF_PIO40 NETX_IRQ_HIF_CHAINED(2) | ||
66 | #define NETX_IRQ_HIF_PIO47 NETX_IRQ_HIF_CHAINED(3) | ||
67 | #define NETX_IRQ_HIF_PIO72 NETX_IRQ_HIF_CHAINED(4) | ||
68 | #define NETX_IRQ_HIF_LAST NETX_IRQ_HIF_CHAINED(4) | ||
69 | |||
70 | #define NR_IRQS (NETX_IRQ_HIF_LAST + 1) | ||
diff --git a/include/asm-arm/arch-netx/memory.h b/include/asm-arm/arch-netx/memory.h new file mode 100644 index 000000000000..6d8d2df3e99d --- /dev/null +++ b/include/asm-arm/arch-netx/memory.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-netx/memory.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_MEMORY_H | ||
21 | #define __ASM_ARCH_MEMORY_H | ||
22 | |||
23 | #define PHYS_OFFSET UL(0x80000000) | ||
24 | |||
25 | /* | ||
26 | * Virtual view <-> DMA view memory address translations | ||
27 | * virt_to_bus: Used to translate the virtual address to an | ||
28 | * address suitable to be passed to set_dma_addr | ||
29 | * bus_to_virt: Used to convert an address for DMA operations | ||
30 | * to an address that the kernel can use. | ||
31 | */ | ||
32 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
33 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
34 | |||
35 | #endif | ||
36 | |||
diff --git a/include/asm-arm/arch-netx/param.h b/include/asm-arm/arch-netx/param.h new file mode 100644 index 000000000000..7a80c26178a8 --- /dev/null +++ b/include/asm-arm/arch-netx/param.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-netx/param.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
diff --git a/include/asm-arm/arch-netx/system.h b/include/asm-arm/arch-netx/system.h new file mode 100644 index 000000000000..52adf368d765 --- /dev/null +++ b/include/asm-arm/arch-netx/system.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/system.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef __ASM_ARCH_SYSTEM_H | ||
20 | #define __ASM_ARCH_SYSTEM_H | ||
21 | |||
22 | #include <asm/io.h> | ||
23 | #include <asm/hardware.h> | ||
24 | #include "netx-regs.h" | ||
25 | |||
26 | static inline void arch_idle(void) | ||
27 | { | ||
28 | cpu_do_idle(); | ||
29 | } | ||
30 | |||
31 | static inline void arch_reset(char mode) | ||
32 | { | ||
33 | writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES, | ||
34 | NETX_SYSTEM_RES_CR); | ||
35 | } | ||
36 | |||
37 | #endif | ||
38 | |||
diff --git a/include/asm-arm/arch-netx/timex.h b/include/asm-arm/arch-netx/timex.h new file mode 100644 index 000000000000..7fdb42da0b40 --- /dev/null +++ b/include/asm-arm/arch-netx/timex.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/timex.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #define CLOCK_TICK_RATE 100000000 | ||
diff --git a/include/asm-arm/arch-netx/uncompress.h b/include/asm-arm/arch-netx/uncompress.h new file mode 100644 index 000000000000..f89434547102 --- /dev/null +++ b/include/asm-arm/arch-netx/uncompress.h | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | /* | ||
21 | * The following code assumes the serial port has already been | ||
22 | * initialized by the bootloader. We search for the first enabled | ||
23 | * port in the most probable order. If you didn't setup a port in | ||
24 | * your bootloader then nothing will appear (which might be desired). | ||
25 | * | ||
26 | * This does not append a newline | ||
27 | */ | ||
28 | |||
29 | #define REG(x) (*(volatile unsigned long *)(x)) | ||
30 | |||
31 | #define UART1_BASE 0x100a00 | ||
32 | #define UART2_BASE 0x100a80 | ||
33 | |||
34 | #define UART_DR 0x0 | ||
35 | |||
36 | #define UART_CR 0x14 | ||
37 | #define CR_UART_EN (1<<0) | ||
38 | |||
39 | #define UART_FR 0x18 | ||
40 | #define FR_BUSY (1<<3) | ||
41 | #define FR_TXFF (1<<5) | ||
42 | |||
43 | static void putc(char c) | ||
44 | { | ||
45 | unsigned long base; | ||
46 | |||
47 | if (REG(UART1_BASE + UART_CR) & CR_UART_EN) | ||
48 | base = UART1_BASE; | ||
49 | else if (REG(UART2_BASE + UART_CR) & CR_UART_EN) | ||
50 | base = UART2_BASE; | ||
51 | else | ||
52 | return; | ||
53 | |||
54 | while (REG(base + UART_FR) & FR_TXFF); | ||
55 | REG(base + UART_DR) = c; | ||
56 | } | ||
57 | |||
58 | static inline void flush(void) | ||
59 | { | ||
60 | unsigned long base; | ||
61 | |||
62 | if (REG(UART1_BASE + UART_CR) & CR_UART_EN) | ||
63 | base = UART1_BASE; | ||
64 | else if (REG(UART2_BASE + UART_CR) & CR_UART_EN) | ||
65 | base = UART2_BASE; | ||
66 | else | ||
67 | return; | ||
68 | |||
69 | while (REG(base + UART_FR) & FR_BUSY); | ||
70 | } | ||
71 | |||
72 | /* | ||
73 | * nothing to do | ||
74 | */ | ||
75 | #define arch_decomp_setup() | ||
76 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-netx/vmalloc.h b/include/asm-arm/arch-netx/vmalloc.h new file mode 100644 index 000000000000..da2da5a595da --- /dev/null +++ b/include/asm-arm/arch-netx/vmalloc.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-netx/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #define VMALLOC_END (PAGE_OFFSET + 0x10000000) | ||